Skip to content

ROX-36480: retry go mod download before controller-gen - #22817

Open
porridge wants to merge 1 commit into
masterfrom
porridge/retry-go-mod-download-chart
Open

porridge wants to merge 1 commit into
masterfrom
porridge/retry-go-mod-download-chart

Conversation

@porridge

Copy link
Copy Markdown
Contributor

Description

  • Add retried go mod download before running controller-gen to prevent failures on transient network issues
  • For now, also run it when preparing a helm chart for an old version which does not have this target.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • not modified existing tests, build code only change

How I validated my change

CI should be enough.

@porridge
porridge requested a review from a team as a code owner September 14, 2026 08:30
@porridge
porridge requested review from GrimmiMeloni and removed request for a team September 14, 2026 08:30
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: f298114a-824a-4597-b454-474a713be56e

📥 Commits

Reviewing files that changed from the base of the PR and between b625dd4 and 9351ef5.

📒 Files selected for processing (2)
  • operator/Makefile
  • operator/hack/generate-and-install-chart.sh

Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Chores
    • Improved reliability of manifest generation and chart installation by preloading required Go modules.
    • Added automatic retries for module downloads to better handle temporary network or dependency-fetching issues.

Walkthrough

The change adds retrying Go module downloads before controller generation and chart deployment. The Makefile targets depend on a new go-mod-download target. The chart installation script performs the same three-attempt download step.

Changes

Go module cache warm-up

Layer / File(s) Summary
Download modules before generation and deployment
operator/Makefile, operator/hack/generate-and-install-chart.sh
The Makefile adds a phony go-mod-download target and makes manifests and generate depend on it. The installation script retries go mod download up to three times before chart deployment.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 9351e

The change safely retries module downloads and stops when all attempts fail; no merge-blocking risk is established.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: retrying go mod download before controller-gen.
Description check ✅ Passed The description explains the change, documents user-facing documentation decisions, states that tests were not modified, and provides the validation approach. The CI inspection checkbox is not checked…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch porridge/retry-go-mod-download-chart

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

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Build Images Ready

Images are ready for commit 9351ef5. To use with deploy scripts:

export MAIN_IMAGE_TAG=5.0.x-272-g9351ef5fef

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.78%. Comparing base (d15e3d0) to head (9351ef5).
⚠️ Report is 20 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #22817      +/-   ##
==========================================
- Coverage   51.80%   51.78%   -0.02%     
==========================================
  Files        2896     2901       +5     
  Lines      182642   182788     +146     
==========================================
+ Hits        94611    94654      +43     
- Misses      79739    79825      +86     
- Partials     8292     8309      +17     
Flag Coverage Δ
go-unit-tests 51.78% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@openshift-ci

openshift-ci Bot commented Sep 14, 2026

Copy link
Copy Markdown

@porridge: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocp-4-22-nongroovy-e2e-tests 9351ef5 link false /test ocp-4-22-nongroovy-e2e-tests
ci/prow/ocp-4-22-scanner-v4-install-tests 9351ef5 link false /test ocp-4-22-scanner-v4-install-tests
ci/prow/ocp-4-12-operator-e2e-tests 9351ef5 link false /test ocp-4-12-operator-e2e-tests
ci/prow/ocp-4-22-operator-e2e-tests 9351ef5 link false /test ocp-4-22-operator-e2e-tests
ci/prow/ocp-4-22-qa-e2e-tests 9351ef5 link false /test ocp-4-22-qa-e2e-tests
ci/prow/ocp-4-12-nongroovy-e2e-tests 9351ef5 link false /test ocp-4-12-nongroovy-e2e-tests
ci/prow/ocp-4-12-qa-e2e-tests 9351ef5 link false /test ocp-4-12-qa-e2e-tests
ci/prow/ocp-4-12-scanner-v4-install-tests 9351ef5 link false /test ocp-4-12-scanner-v4-install-tests
ci/prow/gke-qa-e2e-tests 9351ef5 link false /test gke-qa-e2e-tests

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants