Skip to content

fix: replace abandoned golangci-lint install script in builder image#972

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
MitaliBhalla:fix/golangci-lint-install-script
Jul 13, 2026
Merged

fix: replace abandoned golangci-lint install script in builder image#972
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
MitaliBhalla:fix/golangci-lint-install-script

Conversation

@MitaliBhalla

@MitaliBhalla MitaliBhalla commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switch make.Dockerfile from the abandoned master branch install.sh (checksum failures) to the official https://golangci-lint.run/install.sh.
  • Re-declare GOLANGCI_LINT_VERSION after FROM so the pinned version is actually available in the builder stage.

Test plan

  • make build-image succeeds
  • make lint-in-container / make test-in-container succeed

Made with Cursor

Summary by CodeRabbit

  • Chores
    • Updated the development build process to install golangci-lint from its official source.
    • Added configurable version selection for golangci-lint installations.

The master-branch install.sh fails checksum verification; use the
official golangci-lint.run URL and redeclare the version ARG after FROM.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Walkthrough

The Dockerfile adds a GOLANGCI_LINT_VERSION build argument and changes golangci-lint installation to use the official installer script URL while retaining version argument passing and binary placement.

Changes

golangci-lint installation

Layer / File(s) Summary
Configure the golangci-lint installer
make.Dockerfile
Adds a version build argument, switches the installer source to golangci-lint.run, and documents the prior source change.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: replacing the abandoned golangci-lint install script in the builder image.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@make.Dockerfile`:
- Line 7: Update the yum installation RUN command to clean yum metadata and
remove remaining package-manager caches in the same image layer after installing
ca-certificates, git, go-toolset, and make. Keep the existing package
installation behavior unchanged while ensuring no yum cache remains in the
resulting image.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 98e9d35a-c8fd-412b-a68f-582dc7c06804

📥 Commits

Reviewing files that changed from the base of the PR and between 2c8810b and 737cbf8.

📒 Files selected for processing (1)
  • make.Dockerfile

Comment thread make.Dockerfile

ARG GOLANGCI_LINT_VERSION

RUN yum install -y ca-certificates git go-toolset make

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

Clean yum metadata after installation.

Add yum clean all (and remove the remaining cache) in the same layer to avoid unnecessarily inflating the containerized lint/test image.

Proposed fix
-RUN yum install -y ca-certificates git go-toolset make
+RUN yum install -y ca-certificates git go-toolset make \
+    && yum clean all \
+    && rm -rf /var/cache/yum
📝 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.

Suggested change
RUN yum install -y ca-certificates git go-toolset make
RUN yum install -y ca-certificates git go-toolset make \
&& yum clean all \
&& rm -rf /var/cache/yum
🧰 Tools
🪛 Trivy (0.69.3)

[error] 7-7: 'yum clean all' missing

'yum clean all' is missed: yum install -y ca-certificates git go-toolset make

Rule: DS-0015

Learn more

(IaC/Dockerfile)

🤖 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 `@make.Dockerfile` at line 7, Update the yum installation RUN command to clean
yum metadata and remove remaining package-manager caches in the same image layer
after installing ca-certificates, git, go-toolset, and make. Keep the existing
package installation behavior unchanged while ensuring no yum cache remains in
the resulting image.

Source: Linters/SAST tools

@openshift-ci

openshift-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@MitaliBhalla: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.54%. Comparing base (2c8810b) to head (737cbf8).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #972      +/-   ##
==========================================
- Coverage   54.58%   54.54%   -0.04%     
==========================================
  Files          82       82              
  Lines        6308     6308              
==========================================
- Hits         3443     3441       -2     
- Misses       2416     2417       +1     
- Partials      449      450       +1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samanthajayasinghe

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2026
@openshift-ci

openshift-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MitaliBhalla, samanthajayasinghe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [MitaliBhalla,samanthajayasinghe]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit 609ce43 into openshift:main Jul 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants