cuda-python icon indicating copy to clipboard operation
cuda-python copied to clipboard

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

Open juenglin opened this issue 4 months ago • 2 comments

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.

juenglin avatar Jul 30 '26 22:07 juenglin

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.

copy-pr-bot[bot] avatar Jul 30 '26 22:07 copy-pr-bot[bot]

I think this is no longer needed after #2475?

kkraus14 avatar Aug 01 '26 17:08 kkraus14