Skip to content

Commit 0574c65

Browse files
Adam DomuradAdam Domurad
authored andcommitted
fix(ci): review fixes — compat errexit + nightly slack run url
- release_compat_e2e was invoked as `|| compat_rc=$?`, which suspends errexit for the whole function and its subshell, masking build/install failures (the subshell set -e did not restore it). Toggle errexit explicitly instead so a failed build surfaces as a non-zero compat result, and correct the misleading comment. - Forward RUN_ID to the ci3 Run step so the nightly compat-failure Slack alert links a real GitHub run URL (on EC2, RUN_ID was a millisecond timestamp).
1 parent 3d17534 commit 0574c65

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/ci3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ jobs:
122122
PR_NUMBER: ${{ github.event.pull_request.number }}
123123
GITHUB_REF_NAME: ${{ github.ref_name }}
124124
GITHUB_ACTOR: ${{ github.actor }}
125+
# Forwarded to EC2 so release_compat_e2e's nightly-failure Slack alert can build a real run URL.
126+
RUN_ID: ${{ github.run_id }}
125127
CI3_INSTANCE_PROFILE_NAME: ${{ secrets.CI3_INSTANCE_PROFILE_NAME }}
126128
CI3_SECURITY_GROUP_ID: ${{ secrets.CI3_SECURITY_GROUP_ID }}
127129
AWS_OIDC_ROLE_ARN: ${{ secrets.AWS_OIDC_ROLE_ARN }}

bootstrap.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,8 @@ function release_compat_e2e {
623623

624624
# Build and run the compat test commands in an isolated subshell so the bespoke test settings
625625
# (no test cache, no fast-fail short-circuit) don't leak into the release build/publish that follows.
626-
# set -e is explicit here because this function runs under `||` in ci-release, which suspends it.
626+
# set -e re-enables errexit inside this subshell: the caller invokes release_compat_e2e with errexit
627+
# disabled (to capture its exit code), so without this a failed build/install would be masked.
627628
(
628629
set -e
629630
export USE_TEST_CACHE=0
@@ -946,8 +947,13 @@ case "$cmd" in
946947

947948
# Backwards-compatibility e2e checks. A failure blocks stable/RC releases, but only warns on
948949
# nightlies (where compat coverage is observational) so the nightly publish still proceeds.
950+
# Toggle errexit explicitly rather than `release_compat_e2e || compat_rc=$?`: calling under `||`
951+
# suspends errexit for the whole function (and its subshell), masking build/setup failures there.
949952
compat_rc=0
950-
release_compat_e2e || compat_rc=$?
953+
set +e
954+
release_compat_e2e
955+
compat_rc=$?
956+
set -e
951957
if [ "$compat_rc" -ne 0 ]; then
952958
if [[ "${REF_NAME:-}" == *-nightly.* ]]; then
953959
run_url="https://github.com/${GITHUB_REPOSITORY:-AztecProtocol/aztec-packages}/actions/runs/${RUN_ID:-unknown}"

0 commit comments

Comments
 (0)