-
Notifications
You must be signed in to change notification settings - Fork 3k
ci: retry merge-ref checkout to fix transient "not our ref" failures #5732
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
Changes from all commits
fd992cf
53fd5e1
c72db9d
53249d2
8dbdd95
d6f72b6
209301a
9330bc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -107,7 +107,22 @@ jobs: | |||||||||||
| if: "${{ !cancelled() && needs.classify_pr.outputs.skip_ci != 'true' }}" | ||||||||||||
| runs-on: "${{ fromJSON(needs.classify_pr.outputs.ubuntu_runner || '[\"ubuntu-latest\"]') }}" | ||||||||||||
| steps: | ||||||||||||
| # On PRs github.ref is the merge ref (refs/pull/N/merge), so the required | ||||||||||||
| # checks validate the merge result, not just the PR tip. GitHub builds that | ||||||||||||
| # ref asynchronously and it can briefly 404 right after a push, so on | ||||||||||||
| # failure we back off and retry the same ref once. | ||||||||||||
| - name: 'Checkout' | ||||||||||||
| id: 'checkout' | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| continue-on-error: true | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.branch_ref || github.ref }}' | ||||||||||||
| fetch-depth: 0 | ||||||||||||
| - name: 'Back off for the merge ref to build' | ||||||||||||
| if: "${{ steps.checkout.outcome == 'failure' }}" | ||||||||||||
| run: 'sleep 10' | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The backoff step is
Suggested change
— qwen3.7-max via Qwen Code /review |
||||||||||||
| - name: 'Checkout (retry on transient ref lag)' | ||||||||||||
| if: "${{ steps.checkout.outcome == 'failure' }}" | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.branch_ref || github.ref }}' | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The Lint job's initial checkout (line 120) specifies
Suggested change
— qwen3.7-max via Qwen Code /review |
||||||||||||
|
|
@@ -211,9 +226,22 @@ jobs: | |||||||||||
| node-version: '22.x' | ||||||||||||
| upload-coverage: 'false' | ||||||||||||
| steps: | ||||||||||||
| # See the Lint job's checkout: merge ref on PRs, back off and retry once on transient lag. | ||||||||||||
| - name: 'Checkout' | ||||||||||||
| id: 'checkout' | ||||||||||||
| if: "${{ needs.classify_pr.outputs.skip_ci != 'true' }}" | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| continue-on-error: true | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.branch_ref || github.ref }}' | ||||||||||||
| - name: 'Back off for the merge ref to build' | ||||||||||||
| if: "${{ needs.classify_pr.outputs.skip_ci != 'true' && steps.checkout.outcome == 'failure' }}" | ||||||||||||
| run: 'sleep 10' | ||||||||||||
| - name: 'Checkout (retry on transient ref lag)' | ||||||||||||
| if: "${{ needs.classify_pr.outputs.skip_ci != 'true' && steps.checkout.outcome == 'failure' }}" | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.branch_ref || github.ref }}' | ||||||||||||
|
|
||||||||||||
| # Self-hosted can't reach nodejs.org reliably; reuse the machine's Node. | ||||||||||||
| - name: 'Set up Node.js ${{ matrix.node-version }} (hosted)' | ||||||||||||
|
|
@@ -288,9 +316,10 @@ jobs: | |||||||||||
| needs: | ||||||||||||
| - 'classify_pr' | ||||||||||||
| - 'test' | ||||||||||||
| # !cancelled() not always(): don't let a cancelled run hold the concurrency slot here. | ||||||||||||
| if: |- | ||||||||||||
| ${{ | ||||||||||||
| always() && | ||||||||||||
| !cancelled() && | ||||||||||||
| needs.classify_pr.outputs.skip_ci != 'true' && | ||||||||||||
| github.event_name == 'pull_request' && | ||||||||||||
| github.event.pull_request.head.repo.full_name == github.repository | ||||||||||||
|
|
||||||||||||
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.
[Suggestion] The
continue-on-error: trueon this checkout is a load-bearing part of the retry mechanism — without it, a checkout failure immediately fails the job and the retry step is never reached. There's no comment explaining this dependency, so a future maintainer could reasonably remove it as defensive clutter, silently killing the retry. A one-line comment prevents this.(Same applies to the Test job's
continue-on-erroron line 233.)— qwen3.7-max via Qwen Code /review