Skip to content

[no-ci] ci: align pre-commit checkout with its workflow revision - #3141

Merged
rwgk merged 1 commit into
mainfrom
rwgk/pre-commit-checkout-merge-revision
Oct 16, 2026
Merged

rwgk merged 1 commit into
mainfrom
rwgk/pre-commit-checkout-merge-revision

Conversation

@rwgk

@rwgk rwgk commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

A PR can pick up a newer pre-commit workflow from its merge revision while the checkout override still selects the older PR head. This caused the checks on #3139 to run #3135's smoke steps against source that lacked ci/tools/smoke_test_lychee_precommit.py.

Restore actions/checkout's default event revision. For PRs, the workflow, helper scripts, hook configuration, and source then use the same merge commit. Push and manual runs retain their event revision.

Updating #3139 with main restored its checks. Keeping the workflow and checkout aligned prevents this mismatch for other existing PRs when CI gains new helpers, without requiring branch updates solely to obtain those helpers.

Validation

  • Full local pre-commit run --all-files --show-diff-on-failure passed, including workflow linting.
  • Hosted pre-commit passed on Linux and Windows. Both jobs checked out the PR merge commit and passed the offline Lychee checks in all four OS/shell combinations.

CI scope: [no-ci] skips the CUDA build and GPU test matrix. This PR changes only pre-commit's checkout, which the Linux and Windows pre-commit jobs exercise directly.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
@rwgk rwgk added this to the cuda.bindings next milestone Oct 16, 2026 — with ChatGPT Codex Connector
@rwgk rwgk added bug Something isn't working CI/CD CI/CD infrastructure labels Oct 16, 2026 — with ChatGPT Codex Connector
@rwgk rwgk self-assigned this Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: c0caaa8c-d750-4085-8375-b3c54d91094d
📥 Commits

Reviewing files that changed from the base of the PR and between e8dacbc and ecace7a.

📒 Files selected for processing: 1
  • .github/workflows/pre-commit.yml

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

📝 Summary

Summary by CodeRabbit

  • Chores
    • Updated the pre-commit workflow to check the combined pull request revision.

The pre-commit workflow now uses the default actions/checkout revision. Its comment states that pull request workflows use the merge revision.

Changes: Pre-commit checkout

Layer / File(s) Summary
Default checkout revision
.github/workflows/pre-commit.yml
The checkout step no longer sets an explicit ref to the pull request head SHA or github.sha. The comment now states that pull request workflows use the merge revision.

Suggested reviewers: juenglin

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ecace

No merge-blocking issue was identified in this workflow-only change.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@rwgk
rwgk requested a review from juenglin October 16, 2026 22:52
@rwgk
rwgk enabled auto-merge (squash) October 16, 2026 22:53
@rwgk
rwgk merged commit 2b394fb into main Oct 16, 2026
35 checks passed
@rwgk
rwgk deleted the rwgk/pre-commit-checkout-merge-revision branch October 16, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD CI/CD infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants