Skip to content

Commit 1f89a42

Browse files
committed
fix(ci): guard count-elements step against bst show failures
With bash -e active (GHA default), `BST_SHOW_OUT=$(cmd 2>&1)` exits immediately if cmd fails, so `rc=$?` never runs and the step exits with the bst show exit code (255 when BST can't load the element graph e.g. a patch queue fails to apply). Wrap the assignment with `set +e` / `set -e` so the error is captured in `rc` and the existing graceful fallback (total=0 warning) executes instead of killing the build job entirely. Fixes nvidia and default build failures observed in runs: - 28056225668 (next branch, count step exits 255) - 28056221904 (auto/track-next-junction, validate bst show fails) Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
1 parent 8d63f4d commit 1f89a42

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,11 @@ jobs:
193193
env:
194194
BST_FLAGS: -o x86_64_v3 true --no-interactive --config /src/buildstream-ci.conf
195195
run: |
196+
set +e
196197
BST_SHOW_OUT=$(just bst show --deps all --format '%{name}' \
197198
${{ matrix.element }} 2>&1)
198199
rc=$?
200+
set -e
199201
if [ "$rc" -eq 0 ]; then
200202
TOTAL=$(echo "$BST_SHOW_OUT" | wc -l)
201203
echo "total=${TOTAL}" >> "$GITHUB_OUTPUT"

.github/workflows/cache-warm.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ jobs:
7575
env:
7676
BST_FLAGS: -o x86_64_v3 true --no-interactive
7777
run: |
78+
set +e
7879
BST_SHOW_OUT=$(just bst show --deps all --format '%{name}' \
7980
oci/bluefin.bst 2>&1)
8081
rc=$?
82+
set -e
8183
if [ "$rc" -eq 0 ]; then
8284
TOTAL=$(echo "$BST_SHOW_OUT" | wc -l)
8385
echo "total=${TOTAL}" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)