Skip to content

Commit bfb393b

Browse files
authored
ci: disable cancellation of duplicate CI runs to fix PR status reporting (#518)
# Fix CI workflow to prevent false failure status on PR stacks This PR modifies the GitHub Actions workflow configuration to address an issue with Graphite PR stacks. When using `gt restack && gt submit`, GitHub often triggers duplicate workflow runs for the same commit, and with `cancel-in-progress: true`, one run gets cancelled but GitHub shows the status from the higher run number (which may be the cancelled one). Changes: - Set `cancel-in-progress: false` in the concurrency settings to allow duplicate runs to complete - Added detailed comments explaining the rationale and trade-offs of this approach - Reformatted the `needs` arrays in the deploy jobs for better readability This change ensures that PRs will correctly display successful status when tests pass, even during bulk stack operations with Graphite.
1 parent 49ca86f commit bfb393b

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@ on:
33
workflow_dispatch:
44
pull_request:
55

6+
# Prevent duplicate runs for the same branch, but do NOT cancel in-progress runs.
7+
# Why: When using Graphite's `gt restack && gt submit` on a PR stack, GitHub often
8+
# triggers two workflow runs simultaneously for the same commit (duplicate webhook events).
9+
# With `cancel-in-progress: true`, one run gets cancelled - but GitHub shows check status
10+
# from the higher run_number, which may be the cancelled one. This causes PRs to show
11+
# "failed" status even when the other run succeeds. Setting to false lets both complete,
12+
# ensuring the PR displays the successful status.
13+
# Trade-off: Occasional duplicate CI runs during bulk stack operations.
14+
# See: https://github.com/orgs/community/discussions/27174
615
concurrency:
716
group: ${{ github.workflow }}-${{ github.ref }}
8-
cancel-in-progress: true
17+
cancel-in-progress: false
918

1019
permissions:
1120
contents: read
@@ -274,7 +283,15 @@ jobs:
274283
# ────────────────────────────────── 3. DEPLOY WEBSITE (PREVIEW) ───────────────────────────
275284
deploy-website:
276285
if: github.event_name == 'pull_request'
277-
needs: [build-and-test, edge-worker-e2e, edge-worker-integration, cli-e2e, client-e2e, core-pgtap]
286+
needs:
287+
[
288+
build-and-test,
289+
edge-worker-e2e,
290+
edge-worker-integration,
291+
cli-e2e,
292+
client-e2e,
293+
core-pgtap,
294+
]
278295
runs-on: ubuntu-latest
279296
environment: preview
280297
env:
@@ -316,7 +333,15 @@ jobs:
316333
# ────────────────────────────────── 4. DEPLOY DEMO ───────────────────────────
317334
deploy-demo:
318335
if: false # temporarily disabled
319-
needs: [build-and-test, edge-worker-e2e, edge-worker-integration, cli-e2e, client-e2e, core-pgtap]
336+
needs:
337+
[
338+
build-and-test,
339+
edge-worker-e2e,
340+
edge-worker-integration,
341+
cli-e2e,
342+
client-e2e,
343+
core-pgtap,
344+
]
320345
runs-on: ubuntu-latest
321346
environment: ${{ github.event_name == 'pull_request' && 'preview' || 'production' }}
322347
env:

0 commit comments

Comments
 (0)