CNTRLPLANE-3329: Extend EFS-backed build cache to lint, verify, and envtest workflows#8495
Conversation
…test Add conditional EFS cache warming step to lint, verify, envtest-ocp, and envtest-kube workflows. Each job copies /cache/go-build to a local tmpdir when available, falling back gracefully when the mount is absent. Part-of: CNTRLPLANE-3329
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
|
@vismishr: This pull request references CNTRLPLANE-3329 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughA new composite action Sequence Diagram(s)sequenceDiagram
participant Runner
participant Checkout
participant Warm
participant Cache
participant Build
Runner->>Checkout: actions/checkout
Runner->>Warm: run warm-go-cache
Warm->>Cache: check /cache/go-build
alt cache exists
Cache-->>Warm: cached files
Warm->>Warm: copy files to /tmp/go-build-cache
else no cache
Cache-->>Warm: no cache
Warm-->>Warm: continue with warning
end
Runner->>Build: run make test / lint / verify (uses GOCACHE)
Build-->>Runner: results
Possibly related PRs
🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vismishr The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Use cp -a /cache/go-build/. to copy the contents of the cache directory rather than the directory itself. This prevents a nested go-build subdirectory if /tmp/go-build-cache already exists.
|
I now have the complete picture. Here is the final report: Test Failure Analysis CompleteJob Information
Test Failure AnalysisErrorSummaryAll 8 e2e tests (public, private, OAuth LB) passed successfully in 35 seconds. The job failure is entirely caused by a CI infrastructure issue in the post phase: the Root CauseThe root cause is a CI infrastructure problem on node
The failing step is This is a flaky CI infrastructure failure — the node had connectivity or runtime issues that prevented container image pulls from the CI registry proxy. Recommendations
Evidence
|
…ndling Extract the EFS cache-warm block into a reusable composite action at .github/actions/warm-go-cache/action.yaml. This adds graceful error handling so copy failures log a warning instead of failing the job, and sets GOCACHE via GITHUB_ENV to eliminate job-level env vars. Commit-Message-Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/actions/warm-go-cache/action.yaml (1)
12-12: ⚡ Quick winUse a GitHub warning annotation for copy failures.
Plain
echois easy to miss in logs;::warning::makes this visible in the Checks UI.Proposed change
- echo "Warning: failed to copy EFS cache, proceeding without cache" + echo "::warning::Failed to copy EFS cache; continuing without warmed cache"🤖 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 @.github/actions/warm-go-cache/action.yaml at line 12, Replace the plain echo warning used when EFS cache copy fails (the line containing echo "Warning: failed to copy EFS cache, proceeding without cache") with a GitHub Actions log annotation using the ::warning:: prefix so the message surfaces in the Checks UI; keep the same message text but emit it as ::warning::Warning: failed to copy EFS cache, proceeding without cache so failures become visible in the workflow annotations.
🤖 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.
Nitpick comments:
In @.github/actions/warm-go-cache/action.yaml:
- Line 12: Replace the plain echo warning used when EFS cache copy fails (the
line containing echo "Warning: failed to copy EFS cache, proceeding without
cache") with a GitHub Actions log annotation using the ::warning:: prefix so the
message surfaces in the Checks UI; keep the same message text but emit it as
::warning::Warning: failed to copy EFS cache, proceeding without cache so
failures become visible in the workflow annotations.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 565e34dc-771c-44da-bb89-840ed9f31415
📒 Files selected for processing (5)
.github/actions/warm-go-cache/action.yaml.github/workflows/envtest-kube-reusable.yaml.github/workflows/envtest-ocp-reusable.yaml.github/workflows/lint-reusable.yaml.github/workflows/verify-reusable.yaml
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
/area ci-tooling |
|
@vismishr: all tests passed! 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. |
What this PR does / why we need it:
Extends the EFS-backed Go build cache to all Go-based CI workflows beyond
unit tests. Each workflow now includes a conditional step that copies the
shared cache from
/cache/go-buildto a local tmpdir, settingGOCACHEto use it. This eliminates cold compilation overhead across all CI jobs.
Workflows updated:
lint-reusable.yamlverify-reusable.yamlenvtest-ocp-reusable.yamlenvtest-kube-reusable.yamlIf the EFS mount is not present, the step silently skips and CI runs
without a cache — no functional change from today's behavior.
Which issue(s) this PR fixes:
Fixes https://redhat.atlassian.net/browse/CNTRLPLANE-3329
Special notes for your reviewer:
PR CNTRLPLANE-3329: Replace actions/cache with EFS-backed build cache in unit tests #8494 (unit test workflow update). Can be merged in any order due
to the conditional cache step.
docs-build-reusable.yamlis not included — it uses Python/mkdocsand does not benefit from Go build cache.
if [ -d /cache/go-build ]) is usedconsistently across all workflows.
Checklist:
Summary by CodeRabbit