Skip to content

fix(ci3): GITHUB_REPOSITORY unbound when running ci.sh locally - #24059

Merged
charlielye merged 1 commit into
nextfrom
ci3-fix-github-repository-unbound
Jun 12, 2026
Merged

fix(ci3): GITHUB_REPOSITORY unbound when running ci.sh locally#24059
charlielye merged 1 commit into
nextfrom
ci3-fix-github-repository-unbound

Conversation

@charlielye

Copy link
Copy Markdown
Contributor

Regression

The cross-repo instance-name fix (#23987) added to ci.sh and ci3/bootstrap_ec2:

repo=${GITHUB_REPOSITORY##*/}
repo=${repo:-aztec-packages}

Under set -u (set by ci3/source), the ##*/ expansion on an unset GITHUB_REPOSITORY aborts before the :-aztec-packages default on the next line can apply. So any local invocation fails immediately:

$ ./ci.sh bench
./ci.sh: line 58: GITHUB_REPOSITORY: unbound variable

It only bit locally — CI always has GITHUB_REPOSITORY set, so it passed there.

Fix

Default first, then strip:

repo=${GITHUB_REPOSITORY:-aztec-packages}
repo=${repo##*/}

Applied in both ci.sh and ci3/bootstrap_ec2. Verified under set -u with the var unset: resolves to aztec-packages (and AztecProtocol/aztec-packagesaztec-packages when set), so the instance-name scheme is unchanged.

…locally

The repo-scoped instance name added `repo=${GITHUB_REPOSITORY##*/}` followed by
`repo=${repo:-aztec-packages}`. Under `set -u` (set by ci3/source), the `##*/`
expansion on an unset GITHUB_REPOSITORY aborts before the default on the next line
applies — so any local `./ci.sh <cmd>` fails with "GITHUB_REPOSITORY: unbound
variable". It only surfaced locally; CI always has GITHUB_REPOSITORY set.

Default first, then strip: `repo=${GITHUB_REPOSITORY:-aztec-packages}; repo=${repo##*/}`.
Same fix in ci.sh and ci3/bootstrap_ec2.
@charlielye
charlielye merged commit 0193510 into next Jun 12, 2026
15 of 17 checks passed
@charlielye
charlielye deleted the ci3-fix-github-repository-unbound branch June 12, 2026 16:14
charlielye added a commit that referenced this pull request Jun 12, 2026
…xt) (#24060)

Port of the unbound-variable fix (see
#24059).

The repo-scoped instance name added `repo=${GITHUB_REPOSITORY##*/}` then
`repo=${repo:-aztec-packages}`. Under `set -u` (set by `ci3/source`),
`##*/` on an unset `GITHUB_REPOSITORY` aborts before the default
applies, so any local `./ci.sh <cmd>` fails with `GITHUB_REPOSITORY:
unbound variable`. CI always has it set, so it passed there.

Fix: default first, then strip —
`repo=${GITHUB_REPOSITORY:-aztec-packages}; repo=${repo##*/}` — in
`ci.sh` and `ci3/bootstrap_ec2`. Instance-name scheme unchanged.
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