From a8f7ed98135af3d24ccb77141d7ab6fa2c8a3a59 Mon Sep 17 00:00:00 2001 From: Vikrant Puppala Date: Wed, 8 Jul 2026 12:38:37 +0000 Subject: [PATCH] ci(warm-deps): fix empty --extras on base matrix legs (#831) The install-args expression used `matrix.extras == '' && '' || format(...)`. GitHub Actions treats the empty-string middle operand as falsy, so the base leg (extras='') fell through to the format() branch and produced `--extras ` with no value, failing `poetry install` with 'The "--extras" option requires a value'. Only the base legs failed; pyarrow/kernel legs (non-empty extras) passed. Invert to test for non-empty extras first and default to '', which never yields a valueless --extras. Signed-off-by: Vikrant Puppala Co-authored-by: Isaac Signed-off-by: Vikrant Puppala --- .github/workflows/warm-deps-cache.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/warm-deps-cache.yml b/.github/workflows/warm-deps-cache.yml index c029ff020..f6fa60998 100644 --- a/.github/workflows/warm-deps-cache.yml +++ b/.github/workflows/warm-deps-cache.yml @@ -141,7 +141,11 @@ jobs: python-version: ${{ matrix.python-version }} # extras="" -> base install (no --extras). Otherwise install exactly # the one extra this leg targets, matching the PR job's isolation. - install-args: ${{ matrix.extras == '' && '' || format('--extras {0}', matrix.extras) }} + # NB: the non-empty branch must come FIRST — GitHub's `A && B || C` + # treats an empty-string B as falsy and would fall through to C, so + # `extras=='' && '' || format(...)` wrongly yields "--extras " (no + # value) for the base leg. Test for non-empty and default to "". + install-args: ${{ matrix.extras != '' && format('--extras {0}', matrix.extras) || '' }} # Distinct suffix per leg so setup-poetry's own "venv-*" cache (used by # same-repo PRs) never collides across dependency-version / extras. cache-suffix: "warm-${{ matrix.dependency-version }}-${{ matrix.extras || 'base' }}-"