Repository navigation
ci: skip a Python member's quality matrix when a lock change doesn't touch it - #17
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every Python member's
paths:filter listsuv.lockandpyproject.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.ymlgains adetectjob,needs quality?, which runsplatform/ci/quality_needed.py. Thequalitymatrix runs only when it saysrun=true:uv.lock(member code, workspace deps it lists, rootpyproject.toml, CI files)uv.lockThe closure is every package reachable from the member in
uv.lock, across all extras and groups (CI installs them all), plus the workspace root'sdevgroup (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
uv.lock+ data-ngin files)pyproject.toml)Root
pyproject.tomlchanges still run everything, because it holds the shared ruff, mypy and pytest config.This PR edits
_quality-python.ymlitself, 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 testspasses; ruff, actionlint andcheck_workflow_paths.pyare clean.