From 887bab4d2e4cc16579e7bb1bed0e56b4db207ac7 Mon Sep 17 00:00:00 2001 From: swapnil <78632212+swapnilpaliwal-sd@users.noreply.github.com> Date: Mon, 28 Sep 2026 22:08:38 -0700 Subject: [PATCH] ci: pick the e2e fixture with a glob, not ls | head Under set -o pipefail, head -1 exits after one line and ls dies of SIGPIPE once its output outgrows one write (89 TypeScript cases now do), failing the e2e step on whichever runner loses the race. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com> (cherry picked from commit e55facefa867af880cf93ee0c828ce77339f10ae) --- .github/workflows/ci.yml | 5 ++++- .github/workflows/nightly.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 776ce8d4a..0c0003101 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -533,7 +533,10 @@ jobs: command -v souffle && { echo "::error::this runner has souffle; the gate would not prove anything"; exit 1; } export CODEGRAPH_TGZ="$(ls "$PWD"/artifacts/tgz/*.tgz)" for lang in java typescript python javascript csharp; do - case_dir="$(ls -d graph/test/$lang/cases/*/src | head -1)" + # A glob, not ls | head: under pipefail, head exiting early SIGPIPEs ls and fails the step. + cases=(graph/test/"$lang"/cases/*/src) + case_dir="${cases[0]}" + [ -d "$case_dir" ] || { echo "::error::no $lang case under graph/test/$lang/cases"; exit 1; } echo "::group::$lang ($case_dir)" bash .github/scripts/e2e-install.sh artifacts/engines "$PLATFORM" "$lang" "$case_dir" echo "::endgroup::" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 0e595e499..1eb9c60de 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -74,7 +74,10 @@ jobs: set -euo pipefail for pair in java:java typescript:typescript python:python javascript:javascript; do lang="${pair%%:*}" - case_dir="$(ls -d graph/test/$lang/cases/*/src | head -1)" + # A glob, not ls | head: under pipefail, head exiting early SIGPIPEs ls and fails the step. + cases=(graph/test/"$lang"/cases/*/src) + case_dir="${cases[0]}" + [ -d "$case_dir" ] || { echo "::error::no $lang case under graph/test/$lang/cases"; exit 1; } bash .github/scripts/e2e-install.sh artifacts/engines-linux-x64 linux-x64 "$lang" "$case_dir" done