Skip to content

fix(ci): retry workflow fails on renamed helper scripts - #17

Closed
akifejaz wants to merge 1 commit into
mainfrom
fix/retry-script-name-resolution
Closed

fix(ci): retry workflow fails on renamed helper scripts#17
akifejaz wants to merge 1 commit into
mainfrom
fix/retry-script-name-resolution

Conversation

@akifejaz

@akifejaz akifejaz commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Problem

Run 28641533375 failed with:

python3: can't open file '.github/scripts/plan-shards.py': No such file or directory
python3: can't open file '.github/scripts/missing-pkgs.py': No such file or directory

batch-port-retry.yml is workflow_run-triggered, so GitHub executes the YAML from the default branch (main) — which still calls the old hyphenated script names — while the job checks out the triggering run's SHA (f166cc2 on release), whose tree only has the renamed snake_case files (plan_shards.py, missing_pkgs.py).

Fix

At each cross-branch call site (3× missing_pkgs, 1× plan_shards), resolve whichever filename exists in the checked-out tree:

MISSING_PKGS=.github/scripts/missing_pkgs.py
[ -f "$MISSING_PKGS" ] || MISSING_PKGS=.github/scripts/missing-pkgs.py

This works for retries triggered by runs on either branch, before or after the rename — including old SHAs. The same guard is applied to the release branch copy so the two files stay in sync at the next merge.

🤖 Generated with Claude Code

The retry workflow runs the YAML from the default branch but checks
out the TRIGGERING run's SHA. Run 28641533375 failed because main's
YAML called plan-shards.py / missing-pkgs.py while the checked-out
release SHA (f166cc2) only has the renamed snake_case files.

Resolve whichever name exists in the checked-out tree so retries work
against both pre- and post-rename SHAs, from either branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
akifejaz added a commit that referenced this pull request Jul 3, 2026
Keep the release copy in sync with the main-branch fix (PR #17):
the workflow_run-triggered retry executes main's YAML against the
triggering run's checked-out SHA, so script paths must resolve both
the old hyphenated and new snake_case names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@akifejaz akifejaz closed this Jul 3, 2026
@akifejaz
akifejaz deleted the fix/retry-script-name-resolution branch July 3, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant