-
Notifications
You must be signed in to change notification settings - Fork 8.4k
chore(ci): upgrade checkout to v5 #9357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughAll modified GitHub Actions workflows update the checkout action from actions/checkout@v4 to actions/checkout@v5 across multiple steps and jobs. No other steps, inputs, logic, or control flow were changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (14)
.github/workflows/fetch_docs_notion.yml (1)
20-20: Consider pinning the action version for supply-chain safetyPin to an immutable version (v5.0.0 or full commit SHA) to avoid unexpected changes from future v5 releases.
Apply this diff in this file:
- uses: actions/checkout@v5 + uses: actions/[email protected].github/workflows/release.yml (2)
67-67: Pin action to an immutable versionRecommend pinning to v5.0.0 (or a commit SHA) to reduce supply-chain risk.
- uses: actions/checkout@v5 + uses: actions/[email protected]
135-135: Pin action to an immutable versionSame recommendation here as well.
- uses: actions/checkout@v5 + uses: actions/[email protected].github/workflows/lint-py.yml (1)
28-28: Optional hard pin of action versionPrefer pinning to a fixed version for reproducibility and security.
- uses: actions/checkout@v5 + uses: actions/[email protected].github/workflows/docs_test.yml (1)
22-22: Pin to a specific versionRecommend pinning to v5.0.0 (or commit SHA).
- uses: actions/checkout@v5 + uses: actions/[email protected].github/workflows/store_pytest_durations.yml (1)
24-24: Optional: pin to v5.0.0 (or SHA)Improves determinism of scheduled workflow runs.
- - uses: actions/checkout@v5 + - uses: actions/[email protected].github/workflows/lint-js.yml (1)
25-25: Consider pinning to a fixed versionPin to v5.0.0 (or SHA) for stability.
- uses: actions/checkout@v5 + uses: actions/[email protected].github/workflows/jest_test.yml (1)
33-33: Optional: pin to v5.0.0 (or SHA)Prevents unintentional changes impacting CI signal.
- uses: actions/checkout@v5 + uses: actions/[email protected].github/workflows/release_nightly.yml (4)
72-72: Pin action version for reproducibilityNightly builds benefit from deterministic inputs; pin to v5.0.0 or SHA.
- uses: actions/checkout@v5 + uses: actions/[email protected]
149-149: Pin version suggestionSame pinning recommendation here.
- uses: actions/checkout@v5 + uses: actions/[email protected]
225-225: Pin to a fixed versionConsistent with other jobs.
- uses: actions/checkout@v5 + uses: actions/[email protected]
250-250: Optional pinning to v5.0.0 (or SHA)Keeps nightly publishing stable.
- uses: actions/checkout@v5 + uses: actions/[email protected].github/workflows/nightly_build.yml (1)
28-31: Optional hardening: disable credential persistence where not needed; consider pinning to a commit SHA
- For the “Checkout main nightly tag” step (Line 98), no pushes occur afterwards. You can disable credential persistence for defense-in-depth.
- For the initial checkout (Line 28), you push tags later, so keeping credentials is appropriate.
- If your org requires supply chain hardening, consider pinning actions to a full-length commit SHA instead of a floating major tag.
Proposed tweak for the “Checkout main nightly tag” step:
- - name: Checkout main nightly tag - uses: actions/checkout@v5 - with: - ref: ${{ steps.generate_main_tag.outputs.main_tag }} + - name: Checkout main nightly tag + uses: actions/checkout@v5 + with: + ref: ${{ steps.generate_main_tag.outputs.main_tag }} + persist-credentials: falseIf adopting SHA pinning (example only; replace with the actual v5 commit SHA you trust):
- uses: actions/checkout@v5 + uses: actions/checkout@<COMMIT_SHA_FOR_V5>Also applies to: 98-101
.github/workflows/typescript_test.yml (1)
69-73: Optional security hardening: disable credential persistence; consider pinning to a commit SHAThese jobs don’t push to the repo. You can disable credential persistence to reduce token exposure. Also consider pinning actions to a full-length commit SHA if that aligns with your security policy.
Suggested diffs:
- determine-test-suite:
- - uses: actions/checkout@v5 + - uses: actions/checkout@v5 with: ref: ${{ inputs.ref || github.ref }} fetch-depth: 0 + persist-credentials: false
- setup-and-test:
- - name: Checkout Repository - uses: actions/checkout@v5 + - name: Checkout Repository + uses: actions/checkout@v5 with: ref: ${{ inputs.ref || github.ref }} + persist-credentials: false
- merge-reports:
- - name: Checkout code - if: ${{ steps.should_merge_reports.outputs.should_merge_reports == 'true' }} - uses: actions/checkout@v5 + - name: Checkout code + if: ${{ steps.should_merge_reports.outputs.should_merge_reports == 'true' }} + uses: actions/checkout@v5 + with: + persist-credentials: falseIf adopting SHA pinning (example only; replace with the actual v5 commit SHA you trust):
-uses: actions/checkout@v5 +uses: actions/checkout@<COMMIT_SHA_FOR_V5>Also applies to: 268-271, 361-362
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (26)
.github/workflows/ci.yml(2 hunks).github/workflows/codeflash.yml(1 hunks).github/workflows/codeql.yml(1 hunks).github/workflows/cross-platform-test.yml(1 hunks).github/workflows/deploy-docs-draft.yml(1 hunks).github/workflows/deploy_gh-pages.yml(1 hunks).github/workflows/docker-build.yml(4 hunks).github/workflows/docker_test.yml(1 hunks).github/workflows/docs-update-openapi.yml(1 hunks).github/workflows/docs_test.yml(1 hunks).github/workflows/fetch_docs_notion.yml(1 hunks).github/workflows/integration_tests.yml(1 hunks).github/workflows/jest_test.yml(1 hunks).github/workflows/js_autofix.yml(1 hunks).github/workflows/lint-js.yml(1 hunks).github/workflows/lint-py.yml(1 hunks).github/workflows/nightly_build.yml(2 hunks).github/workflows/py_autofix.yml(2 hunks).github/workflows/python_test.yml(3 hunks).github/workflows/release.yml(2 hunks).github/workflows/release_nightly.yml(4 hunks).github/workflows/smoke-tests.yml(1 hunks).github/workflows/store_pytest_durations.yml(1 hunks).github/workflows/style-check-py.yml(1 hunks).github/workflows/template-tests.yml(1 hunks).github/workflows/typescript_test.yml(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test-starter-projects
🔇 Additional comments (41)
.github/workflows/js_autofix.yml (1)
18-18: Upgrade to actions/checkout@v5 looks goodNo changes in inputs/behavior here; step should continue to work as before.
.github/workflows/codeql.yml (1)
33-33: LGTM: Checkout bumped to v5Safe upgrade; CodeQL steps are unaffected by this change.
.github/workflows/py_autofix.yml (2)
15-15: LGTM: Checkout bumped to v5 (lint job)No other step/config changes; expected to be a no-op aside from runtime alignment.
32-32: LGTM: Checkout bumped to v5 (update-starter-projects job)Consistent with the rest of the repo updates.
.github/workflows/deploy-docs-draft.yml (1)
21-21: LGTM: Checkout bumped to v5No functional changes to the deploy process. Proceed.
.github/workflows/cross-platform-test.yml (1)
32-32: LGTM: Checkout bumped to v5Build step should behave identically with the new major version.
.github/workflows/docs-update-openapi.yml (1)
18-18: LGTM: Checkout bumped to v5No other modifications; works with current runner stacks.
.github/workflows/style-check-py.yml (1)
19-19: LGTM: Checkout bumped to v5No additional changes required.
.github/workflows/python_test.yml (2)
116-119: LGTM: Checkout bumped to v5 (integration-tests job)No functional changes; consistent with the rest of the workflows.
142-145: LGTM: Checkout bumped to v5 (test-cli job)No additional adjustments needed.
.github/workflows/integration_tests.yml (2)
43-43: Checkout v5 bump looks good.No behavioral changes in this step. The ref input and the rest of the job remain compatible.
43-46: actions/checkout Migration VerifiedAll workflows now reference actions/checkout@v5 – no @v4 remains. The only breaking change in v5 is the runtime bump to Node.js 24; checkout inputs/behavior (submodules, fetch-depth, token handling) are unchanged.
• Scanned 29 workflow files under .github/workflows – only
actions/checkout@v5found
• No lingeringactions/checkout@v4references
• v5 uses Node 24: confirm any custom JS/composite actions and self-hosted runners support Node 24 (GitHub-hosted runners already include it).github/workflows/docker-build.yml (4)
71-75: Checkout v5 in get-version job: OK.Inputs and persist-credentials usage remain valid.
190-194: Checkout v5 in build job: OK.No changes needed; ref and persist-credentials are intact.
285-288: Checkout v5 in build_components job: OK.Matches the pattern used elsewhere in the workflow.
342-345: Checkout v5 in restart-space job: OK.No compatibility concerns spotted.
.github/workflows/codeflash.yml (1)
22-24: Checkout v5 bump looks good.fetch-depth: 0 remains appropriate for PR context.
.github/workflows/smoke-tests.yml (1)
17-19: Checkout v5 upgrade: LGTM.No other step depends on deprecated v4 behavior.
.github/workflows/template-tests.yml (1)
22-23: Checkout v5 bump looks good.No changes required elsewhere in the job.
.github/workflows/docker_test.yml (1)
30-31: Checkout v5 usage is correct.The subsequent docker build/test steps are unaffected.
.github/workflows/ci.yml (2)
153-156: Checkout v5 in path-filter job: OK.ref input is preserved; paths-filter step remains unaffected.
215-218: Checkout v5 in test-templates job: OK.No issues detected.
.github/workflows/deploy_gh-pages.yml (1)
17-18: Checkout v5 upgrade: LGTM.The gh-pages deployment flow and tokens are unchanged and compatible.
.github/workflows/fetch_docs_notion.yml (2)
20-20: Checkout bump to v5 looks goodNo logic changes; aligns with runner Node 24 stack. Safe maintenance update.
20-20: All workflows updated to actions/checkout@v5
No occurrences ofactions/checkout@v4were found in.github/workflows/. You’re good to merge..github/workflows/release.yml (2)
67-67: Build-base: checkout bumped to v5 — OKMatches the PR intent; no other step inputs affected.
135-135: Build-main: checkout bumped to v5 — OKChange is isolated and non-breaking.
.github/workflows/lint-py.yml (1)
28-28: Checkout bump to v5 looks goodInputs (ref, persist-credentials) remain compatible.
.github/workflows/docs_test.yml (1)
22-22: Checkout bump to v5 looks goodNo behavioral changes to the docs build flow.
.github/workflows/store_pytest_durations.yml (1)
24-24: Checkout bump to v5 looks goodNo impact on permissions or subsequent steps.
.github/workflows/lint-js.yml (1)
25-25: Checkout bump to v5 looks goodFrontend lint flow remains unchanged.
.github/workflows/jest_test.yml (1)
33-33: Checkout bump to v5 looks goodNo changes to caching or test steps; safe update.
.github/workflows/release_nightly.yml (4)
72-72: build-nightly-base: checkout bumped to v5 — OKInputs (ref, persist-credentials) unchanged and compatible.
149-149: build-nightly-main: checkout bumped to v5 — OKNo behavioral change expected.
225-225: publish-nightly-base: checkout bumped to v5 — OKThis job reads artifacts; checkout v5 has no adverse impact.
250-250: publish-nightly-main: checkout bumped to v5 — OKNo issues spotted.
.github/workflows/nightly_build.yml (2)
28-31: Upgrade to actions/checkout v5: LGTMThe step cleanly bumps to v5 with no other logic changes. No functional concerns.
98-101: Second checkout bumped to v5: LGTMConsistent with the PR objective; no behavioral changes expected here.
.github/workflows/typescript_test.yml (3)
69-73: Checkout v5 in determine-test-suite: LGTMMatches the repo-wide upgrade; fetch-depth: 0 remains intact for history-dependent logic.
268-271: Checkout v5 in setup-and-test: LGTMNo side effects expected; step behavior should be identical.
361-362: Checkout v5 in merge-reports: LGTMConsistent with the PR scope.
| - uses: actions/checkout@v5 | ||
| with: | ||
| ref: ${{ inputs.ref || github.ref }} | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Optional: Pin checkout to a fixed version (or commit SHA) for supply-chain hardening
Using a floating major tag tracks silent patch updates. Consider pinning to v5.0.0 (or a commit SHA) to reduce supply-chain risk. If you prefer automatic patches, keep as-is.
To locate all occurrences for potential pinning:
If you opt to pin here, apply:
- - uses: actions/checkout@v5
+ - uses: actions/[email protected]
with:
ref: ${{ inputs.ref || github.ref }}🏁 Script executed:
#!/bin/bash
# List all uses of actions/checkout@v5 across the repo
rg -n $'uses:\\s*actions/checkout@v5' -SLength of output: 40
🏁 Script executed:
#!/bin/bash
# Confirm occurrences of actions/checkout usage in workflow files
rg -n 'actions/checkout@' .github/workflowsLength of output: 2935
Pin actions/checkout to a fixed patch version for supply-chain hardening
We’ve identified 26 workflow files still using the floating major tag @v5. To lock in patches and reduce risk, replace each occurrence with a fixed patch version (for example, @v5.0.0) or a specific commit SHA:
Workflows requiring updates:
- .github/workflows/ci.yml
- .github/workflows/codeflash.yml
- .github/workflows/codeql.yml
- .github/workflows/cross-platform-test.yml
- .github/workflows/deploy-docs-draft.yml
- .github/workflows/deploy_gh-pages.yml
- .github/workflows/docker-build.yml
- .github/workflows/docker_test.yml
- .github/workflows/docs-update-openapi.yml
- .github/workflows/docs_test.yml
- .github/workflows/fetch_docs_notion.yml
- .github/workflows/integration_tests.yml
- .github/workflows/jest_test.yml
- .github/workflows/js_autofix.yml
- .github/workflows/lint-js.yml
- .github/workflows/lint-py.yml
- .github/workflows/nightly_build.yml
- .github/workflows/python_test.yml
- .github/workflows/py_autofix.yml
- .github/workflows/release.yml
- .github/workflows/release_nightly.yml
- .github/workflows/smoke-tests.yml
- .github/workflows/standard-tests.yml (template-tests.yml)
- .github/workflows/store_pytest_durations.yml
- .github/workflows/style-check-py.yml
- .github/workflows/typescript_test.yml
Example change:
- - uses: actions/checkout@v5
+ - uses: actions/[email protected]🤖 Prompt for AI Agents
In .github/workflows/python_test.yml around lines 52 to 55 the workflow uses the
floating tag actions/checkout@v5; replace that with a fixed patch or commit
(e.g., actions/[email protected] or a specific SHA) to pin the dependency, update
the with: ref input unchanged, and repeat the same replacement for all other
listed workflow files to eliminate use of the floating @v5 tag for supply-chain
hardening.
|
@coderabbitai Please review for potential issues if any with the v5 checkout. suggest the Pro and cons of this upgrade. |
|
@rejected-l Thanks for the PR |
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainI'll research the changes between actions/checkout@v4 and v5 to provide you with a comprehensive analysis of potential issues and the pros and cons of this upgrade. Based on my research, here's a comprehensive analysis of upgrading to actions/checkout@v5: Pros of Upgrading to v5:✅ Node.js 20 Compatibility: v5 runs on Node.js 20, which is the current LTS version, providing better performance and security updates ✅ Future-Proofing: Ensures compatibility with GitHub's runner environment evolution (Node 24 mentioned in PR) ✅ Security Improvements: Newer versions typically include security patches and vulnerability fixes ✅ Maintenance Alignment: Keeps workflows up-to-date with GitHub's recommended practices ✅ Performance: Node.js 20 offers better performance compared to older versions used by v4 Cons and Potential Issues:
Assessment of Your Current Usage:From analyzing your workflows, I can see you're using standard checkout patterns with common parameters like:
These standard use cases should work seamlessly with v5. Recommendation:✅ This upgrade appears safe for your repository because:
Testing Strategy:I recommend monitoring the first few workflow runs after merge to ensure:
The upgrade looks well-executed and should provide benefits without significant risks given your current usage patterns. 🏁 Script executed: Length of output: 3605 🌐 Web query: 💡 Result: Short answer — the v5 release does not change action inputs/outputs, but it does introduce a runtime and runner requirement that can break older environments:
What the release notes do NOT list as breaking:
Migration checklist (recommended)
Most important (load-bearing) facts — quick bullets with sources
If you want, I can:
Citations:
🌐 Web query: 💡 Result: Short answer
Important details and what to check
Concrete checklist (what to do now)
If you want, I can
References (key sources used)
Would you like me to inspect a specific workflow or your self‑hosted runner details (runner version, distro, git and glibc versions)? I can then give a precise recommendation (upgrade to v5, stay on v4, or apply a workaround). Citations:
@edwinjosechittilappilly Based on my analysis of your workflows and research into the v5 changes, here's a comprehensive review: ✅ Analysis: This Upgrade is Safe for Your RepositoryYour workflows use standard checkout patterns that are fully compatible with v5:
Detailed Pros and Cons:✅ Pros:
|



Maintenance update to actions/checkout@v5 to align with the current runner stack (Node 24); nothing else modified.
Release notes: https://github.com/actions/checkout/releases/tag/v5.0.0
Summary by CodeRabbit