Skip to content

fix(ci): avoid pipefail in ci.yaml shell code - #2462

Open
juenglin wants to merge 1 commit into
NVIDIA:mainfrom
juenglin:ci-shell-issue
Open

fix(ci): avoid pipefail in ci.yaml shell code#2462
juenglin wants to merge 1 commit into
NVIDIA:mainfrom
juenglin:ci-shell-issue

Conversation

@juenglin

@juenglin juenglin commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Issue: ci failures like this

The CI failure is a classic SIGPIPE + pipefail interaction.

The original code pipes gh api --paginate into head -1. Under bash -o pipefail
(set by the shell option in the step), when head -1 reads one line and exits, it
closes the pipe. gh api then receives SIGPIPE (exit 141), and pipefail propagates
that non-zero exit code through the command substitution, causing the step to fail
under set -e.

The fix avoids this by:

  1. Collecting all output into an array via mapfile (no pipe to break).
  2. Using || true to suppress any transient gh api exit code from the process substitution.
  3. Taking the first element with ${_tags[0]:-} instead of head -1.

@copy-pr-bot

copy-pr-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the CI/CD CI/CD infrastructure label Jul 30, 2026
@juenglin
juenglin requested a review from mdboom July 30, 2026 22:54
@juenglin juenglin added the bug Something isn't working label Jul 30, 2026
@juenglin juenglin self-assigned this Jul 30, 2026
@juenglin juenglin added this to the cuda.core next milestone Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD CI/CD infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant