Skip to content

Commit a8f7ed9

Browse files
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 <vikrant.puppala@databricks.com> Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent ea9bf86 commit a8f7ed9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/warm-deps-cache.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ jobs:
141141
python-version: ${{ matrix.python-version }}
142142
# extras="" -> base install (no --extras). Otherwise install exactly
143143
# the one extra this leg targets, matching the PR job's isolation.
144-
install-args: ${{ matrix.extras == '' && '' || format('--extras {0}', matrix.extras) }}
144+
# NB: the non-empty branch must come FIRST — GitHub's `A && B || C`
145+
# treats an empty-string B as falsy and would fall through to C, so
146+
# `extras=='' && '' || format(...)` wrongly yields "--extras " (no
147+
# value) for the base leg. Test for non-empty and default to "".
148+
install-args: ${{ matrix.extras != '' && format('--extras {0}', matrix.extras) || '' }}
145149
# Distinct suffix per leg so setup-poetry's own "venv-*" cache (used by
146150
# same-repo PRs) never collides across dependency-version / extras.
147151
cache-suffix: "warm-${{ matrix.dependency-version }}-${{ matrix.extras || 'base' }}-"

0 commit comments

Comments
 (0)