chore: use sha instead of ref checkout action#4952
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates CI workflows to use commit SHAs instead of branch references for checkout operations to prevent merge queue failures. The changes ensure that GitHub Actions workflows check out specific commits rather than potentially ephemeral branch references.
- Adds explicit
ref: ${{ github.sha }}andfetch-depth: 0to allactions/checkout@v4steps - Updates the
ui-testworkflow to receive commit SHA instead of branch reference - Removes various explanatory comments throughout the workflow file
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Coverage Report
File CoverageNo changed files found. |
Not ultra clear what the bug hypothesis is. Sounds like |
Description
Merge Queue runs are failing to fetch the references for the branches.
What usually causes this
1. Workflow not triggered on merge_group: If checks only run on pull_request or push, they won’t see the merge-queue ref GitHub creates.
2. actions/checkout not checking out the queue ref: If we don’t pass ref: ${{ github.ref }} (and sometimes need fetch-depth: 0), checkout may try to fetch a default ref and then explicitly fetch the queue ref, which 404s because it was never requested (or already GC’d).
3. Your job pushes/updates the ref: The gh-readonly-queue ref is read-only and ephemeral. Any step trying to push back to it (e.g., “update branch,” “commit changes,” codegen, etc.) will fail or race the ref disappearing.
Changes
•
actions/checkout@v4now usesref: ${{ github.sha }}withfetch-depth: 0in all jobs.• The
ui-testworkflow now receives the commit SHA instead of the ephemeralgh-readonly-queue/...ref.Type of change
Associated Issues
Closes APKT-3638