Skip to content

ci: skip a Python member's quality matrix when a lock change doesn't touch it - #17

Merged
dominickdupuy merged 1 commit into
mainfrom
ci/skip-unaffected-quality
Oct 8, 2026
Merged

dominickdupuy merged 1 commit into
mainfrom
ci/skip-unaffected-quality

Conversation

@dominickdupuy

Copy link
Copy Markdown
Member

Why

Every Python member's paths: filter lists uv.lock and pyproject.toml, because the workspace shares one lockfile. So any dependency change fans out to every member. On #16, a data-ngin dependency change queued algosystem's six-job matrix: Python 3.11 and 3.13 on Ubuntu, macOS and Windows.

What

_quality-python.yml gains a detect job, needs quality?, which runs platform/ci/quality_needed.py. The quality matrix runs only when it says run=true:

Changed (within the caller's paths) Result
any file other than uv.lock (member code, workspace deps it lists, root pyproject.toml, CI files) run
only uv.lock run only if the member's resolved closure differs between base and head
nothing skip

The closure is every package reachable from the member in uv.lock, across all extras and groups (CI installs them all), plus the workspace root's dev group (pytest, ruff, mypy). Each entry is compared in full: version, source and hashes.

It fails open. With no base commit (new branch, dispatch), an unreadable lock, or a caller with no pull_request.paths (the deploy and publish workflows), the matrix runs. Skipped matrices still report success, so each member's gate check stays green.

Checked on real history

Change algosystem research-core algoterminal research-api data-ngin
Airflow 3 commit (uv.lock + data-ngin files) run (sqlalchemy, greenlet moved) skip skip skip run
#16 (also touched root pyproject.toml) run run — run run

Root pyproject.toml changes still run everything, because it holds the shared ruff, mypy and pytest config.

This PR edits _quality-python.yml itself, so every Python member runs this time. That's expected.

Tests

  • tests/test_quality_needed.py: covers member code, unrelated changes, root config, another member's lock bump (skip), own transitive dep (run), CI tooling bump (run), and the fail-open cases.
  • pytest tests passes; ruff, actionlint and check_workflow_paths.py are clean.

…touch it

Every Python member's path filter lists uv.lock, because the workspace
shares one lockfile. So any dependency bump fanned out to every member:
a data-ngin-only change ran algosystem's six-job OS/Python matrix.

_quality-python.yml now starts with a detect job that runs
platform/ci/quality_needed.py. It runs the matrix if any changed file
other than uv.lock matches the caller's paths. If only uv.lock matched,
it runs only when the member's resolved closure differs between base and
head: every package reachable from it, plus the workspace root's dev
group. It fails open: no base commit, an unreadable lock, or a caller
without path filters (deploy/publish) all run the matrix.

On history: the Airflow 3 lock change runs algosystem (sqlalchemy and
greenlet moved) and skips research-core, algoterminal and research-api.
@dominickdupuy
dominickdupuy merged commit 5746599 into main Oct 8, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant