ci(repo): scope per-package tox tests to single workspace member#578
Merged
Conversation
Previously, the per-package test matrix installed the full workspace via
`uv sync --all-extras --all-groups`, masking missing-dep regressions in
individual package pyprojects. A wheel of grz-cli built from the current
source would fail to import at module load because grz-common imports
`grz_db` without grz-db being declared anywhere in the grz-cli /
grz-common dependency chains, yet CI stayed green because grz-db got
installed via the wider workspace sync.
Drive `uv sync` through a single workspace member when the new
`GRZ_TOX_PACKAGE` env var is set, using tox-uv's `uv_sync_flags`
(`--package {env:GRZ_TOX_PACKAGE:grz-tools}`). The default value keeps
the existing behavior for local `tox` runs.
Add per-package `[dependency-groups] test` to grz-cli, grz-common, and
grz-db so the scoped sync still pulls pytest et al. Add a minimal
`tests/test_smoke.py` for grz-cli so it enters the changed-package
matrix (the dependency-change detector requires a `tests/` directory).
…ndencies Each package's `[dependency-groups] test` used to restate version ranges for pytest, pytest-cov, moto, etc. Move those constraints to the workspace root's `[tool.uv] constraint-dependencies`, which uv applies to every member during `uv lock` / `uv sync`. Per-package test groups now list bare names only. Also drops grzctl's self-reference from its own test group.
`grz-pydantic-models` declared `pydantic >=2.9.2,<3` even though the rest of the workspace required `>=2.12` since #425. Bump to match. `grz-db` declared `cryptography >=45.0.3` without an upper bound while `grz-common` capped it at `<49`. Add the same upper bound for consistency.
tedil
reviewed
May 15, 2026
tedil
left a comment
Collaborator
There was a problem hiding this comment.
failure is expected, fix will be done separately I assume?
Collaborator
Author
That's the plan! 👍 |
tedil
previously approved these changes
May 15, 2026
Previously gated on `branches: [main]`, which silently skipped CI for stacked PRs (e.g. PRs targeting another feature branch). Drop the filter so stacked PRs get the same coverage as PRs targeting main.
…580) `grz-common/workers/worker.py` imported `grz_db` at module top without declaring it as a dependency, breaking isolated installs of `grz-cli`. The fix in the title moves the offending code into `grz-db`. The follow-up commits consolidate the resulting populate API and clean up a few unrelated smells in `grzctl` encountered along the way. feat(grz-db,grz-common): clean up SubmissionDb.populate API surface refactor(grz-db,grz-common,grzctl): extract shared metadata + redaction helpers fix(grzctl): correct stale grz-cli hint in submission-not-found errors
tedil
approved these changes
May 16, 2026
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.
Previously the per-package test matrix installed the full workspace
via
uv sync --all-extras --all-groups, which masked missing-depregressions in individual package pyprojects (a wheel of
grz-clibuilt from current source would fail to import because
grz-commonreferenced
grz_dbwithout declaring it).Drive
uv syncthrough a single workspace member via tox-uv'suv_sync_flagsand aGRZ_TOX_PACKAGEenv var so each package's testsrun against only its declared deps.
The transitive-import regression that this guard surfaced is fixed in
the same PR, alongside several follow-up cleanups.
fix(grz-common,grz-db,grzctl): move populate logic into SubmissionDb
feat(grz-db,grz-common): clean up SubmissionDb.populate API surface
refactor(grz-db,grz-common,grzctl): extract shared metadata + redaction helpers
fix(grzctl): correct stale grz-cli hint in submission-not-found errors
fix(grz-pydantic-models,grz-db): align inconsistent version pins