NO-ISSUE: Update linter version#10509
Conversation
|
@pastequo: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughTwo independent changes: golangci-lint is bumped from v2.11.4 to v2.12.2 in both Changesgolangci-lint version bump
reflect.Ptr → reflect.Pointer alias update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pastequo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci-images/Dockerfile.lint`:
- Line 3: The golangci-lint installer in Dockerfile.lint is pulling install.sh
from the mutable main branch, which can change independently of this image
build. Update the curl source used by the RUN step to reference the same
immutable v2.12.2 tag as the installed version so the build is reproducible;
keep the existing install.sh invocation and pin the script URL consistently.
In `@Dockerfile.assisted-service-build`:
- Line 3: The golangci-lint installer in Dockerfile.assisted-service-build is
fetched from a moving branch reference, which can change unexpectedly; update
the curl source in the RUN step to use an immutable release/tagged ref matching
v2.12.2 or vendor the installer script locally. Keep the fix in the same
Dockerfile line that invokes install.sh so the build always uses a pinned,
reproducible installer version.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 51413ba7-4502-4b2e-a0cc-f174c89d1df9
📒 Files selected for processing (4)
Dockerfile.assisted-service-buildci-images/Dockerfile.lintinternal/common/common.gopkg/secretdump/struct.go
| FROM base | ||
|
|
||
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b /usr/bin v2.11.4 | ||
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b /usr/bin v2.12.2 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
git ls-files ci-images/Dockerfile.lint
echo '---'
cat -n ci-images/Dockerfile.lint | sed -n '1,40p'Repository: openshift/assisted-service
Length of output: 389
🏁 Script executed:
#!/bin/bash
set -euo pipefail
git ls-files ci-images/Dockerfile.lint
echo '---'
cat -n ci-images/Dockerfile.lint | sed -n '1,40p'Repository: openshift/assisted-service
Length of output: 389
Pin the installer script to an immutable tag.
Line 3 pulls install.sh from main, so the build can pick up changes outside this Dockerfile. Use the v2.12.2 tag in the script URL too.
Proposed fix
-RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b /usr/bin v2.12.2
+RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.12.2/install.sh | sh -s -- -b /usr/bin v2.12.2📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b /usr/bin v2.12.2 | |
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.12.2/install.sh | sh -s -- -b /usr/bin v2.12.2 |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ci-images/Dockerfile.lint` at line 3, The golangci-lint installer in
Dockerfile.lint is pulling install.sh from the mutable main branch, which can
change independently of this image build. Update the curl source used by the RUN
step to reference the same immutable v2.12.2 tag as the installed version so the
build is reproducible; keep the existing install.sh invocation and pin the
script URL consistently.
| FROM registry.access.redhat.com/ubi9/go-toolset:1.26 AS golang | ||
|
|
||
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.11.4 | ||
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.12.2 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
git ls-files | rg '(^|/)Dockerfile\.assisted-service-build$'
printf '\n--- file with line numbers ---\n'
cat -n Dockerfile.assisted-service-build | sed -n '1,40p'Repository: openshift/assisted-service
Length of output: 2109
Pin the installer script URL to an immutable ref.
Line 3 pulls install.sh from main, so the build can pick up upstream changes unexpectedly. Use the release tag matching v2.12.2 or vendor the script instead.
Proposed fix
-RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.12.2
+RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.12.2/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.12.2📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.12.2 | |
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.12.2/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.12.2 |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Dockerfile.assisted-service-build` at line 3, The golangci-lint installer in
Dockerfile.assisted-service-build is fetched from a moving branch reference,
which can change unexpectedly; update the curl source in the RUN step to use an
immutable release/tagged ref matching v2.12.2 or vendor the installer script
locally. Keep the fix in the same Dockerfile line that invokes install.sh so the
build always uses a pinned, reproducible installer version.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10509 +/- ##
==========================================
- Coverage 44.33% 44.33% -0.01%
==========================================
Files 423 423
Lines 73512 73512
==========================================
- Hits 32595 32594 -1
- Misses 37985 37986 +1
Partials 2932 2932
🚀 New features to boost your workflow:
|
|
/retest |
|
/test e2e-agent-compact-ipv4-iso-no-registry |
|
@pastequo: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs, README, etc)Reviewers Checklist
Summary by CodeRabbit
Bug Fixes
Chores