Skip to content

Commit c8dc37d

Browse files
Rafaelclaude
andcommitted
ci(migration): close the tracking issue only on the default branch (#1145)
`Close issue on success` fired on any green run, from any ref. So a `workflow_dispatch` on a branch closed the issue that tracks a bug still present on `main`. Observed, not hypothesised: run #116 failed and opened #1143; run #117 was dispatched on `fix/issue-1143-playground-reply-stream-race`, passed, and closed #1143 at 17:29:23 — while the fix was unmerged and `main` still carried the racy assertion. Nothing in the tracker recorded that the closure came from a branch. What makes this worse than untidy: dispatching on a branch is the recommended way to prove changes to this workflow — #1139, #1141 and #1143 could only be proven that way. The practice that produces the best evidence was also the one that silently wrote to the tracker. Both jobs (`migration-test`, `migration-test-compose`) now guard the close with `github.ref == 'refs/heads/main'`. Scheduled runs are unaffected: they run on the default branch, verified against run 30530547302 (`event=schedule`, `head_branch=main`). The failure path is deliberately NOT scoped. A red branch run is worth filing — that is exactly how #1143 was found. Instead both failure bodies now name the ref and the event, so a reader can tell a branch experiment from a `main` failure rather than assuming the latter. Same family as #1120, #1141 and #1143: one signal read as proof of a different claim. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 1906d09 commit c8dc37d

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/migration-test.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,16 @@ jobs:
299299
/tmp/latest-digest.txt
300300
/tmp/nightly-digest.txt
301301
302+
# Scoped to the default branch (#1145). This step used to fire on ANY green
303+
# run, so a `workflow_dispatch` on a branch closed the issue that tracks a bug
304+
# still present on `main`. It happened for real: run #117, dispatched on the
305+
# #1143 fix branch, closed #1143 while the fix was still unmerged and `main`
306+
# still carried the racy assertion. Dispatching on a branch is the recommended
307+
# way to prove changes to this workflow — #1139, #1141 and #1143 could only be
308+
# proven that way — so the practice that produces the best evidence must not
309+
# silently write to the tracker.
302310
- name: Close issue on success
303-
if: success()
311+
if: success() && github.ref == 'refs/heads/main'
304312
uses: actions/github-script@v9
305313
with:
306314
script: |
@@ -332,6 +340,10 @@ jobs:
332340
});
333341
}
334342
343+
# Deliberately NOT scoped to the default branch (#1145): a red branch run is
344+
# worth filing — that is exactly how #1143 was found, by dispatching on a
345+
# branch. The body names the ref and the event instead, so a reader can tell a
346+
# branch experiment from a `main` failure rather than assuming the latter.
335347
- name: Create or update issue on failure
336348
if: failure()
337349
uses: actions/github-script@v9
@@ -355,6 +367,8 @@ jobs:
355367
const body = [
356368
`## Run #${context.runNumber} — ${new Date().toISOString().split('T')[0]}`,
357369
'',
370+
`**Ref:** \`${context.ref}\` · **Event:** \`${context.eventName}\``,
371+
'',
358372
report,
359373
'',
360374
`[Workflow Run](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})`,
@@ -743,8 +757,9 @@ jobs:
743757
/tmp/run-target.json
744758
retention-days: 30
745759

760+
# Same default-branch scope as the API job above (#1145).
746761
- name: Close issue on success
747-
if: success()
762+
if: success() && github.ref == 'refs/heads/main'
748763
uses: actions/github-script@v9
749764
with:
750765
script: |
@@ -790,6 +805,8 @@ jobs:
790805
const body = [
791806
`## Run #${context.runNumber} — ${new Date().toISOString().split('T')[0]}`,
792807
'',
808+
`**Ref:** \`${context.ref}\` · **Event:** \`${context.eventName}\``,
809+
'',
793810
`docker-compose migration test failed. Source: \`langflowai/langflow:latest\` → Target: \`langflowai/langflow-nightly:latest\`.`,
794811
`Compose file: pinned to upstream main of \`langflow-ai/langflow/docker_example/docker-compose.yml\`.`,
795812
'',

0 commit comments

Comments
 (0)