[bot] Merge master/12861e2b into rel/dev - #1770
Merged
Merged
Conversation
Fixes several ways the uv setup was already broken or could break silently. Workspace members are now listed explicitly instead of matching `packages/*`. Any stray directory under packages/ -- tool output, scratch, build leftovers -- matched that glob and, having no pyproject.toml, broke every uv command in the repo with "missing a pyproject.toml". The Docker image installs the tox group from uv.lock via `uv export` instead of `uv pip install --group`, which re-resolves fresh from the index and ignores the lock. That re-resolution is why the tox group carried its own `uv~=0.12.0` pin, duplicating [tool.uv] required-version; the pin is removed, so the export and the removal must stay in the same commit. Lock hashes are no longer stripped, so the install is hash-verified at no measurable cost. `constraint-dependencies` now bounds the locked uv. tox-uv depends on the uv PyPI package with no upper bound, and the image takes uv's version straight from the lock, so a plain `uv lock --upgrade` could have put uv 0.13.x in the image and tripped required-version at runtime -- the same failure the removed pin guarded, reached by a different route. UV_PROJECT_ENVIRONMENT redirects the in-container project environment. The repo is bind-mounted at /data, so `uv run` inside the test container was rebuilding the developer's host .venv against the container's Linux interpreter, leaving the host with a venv pointing at a non-existent python. UV_LOCKED additionally stops any in-container uv command rewriting the mounted uv.lock. `TOX ?= uv run tox` in project_common.mk, overridden to bare `tox` in the image, so container runs use the lock-pinned system tox already installed there instead of first syncing the whole workspace into a throwaway env to obtain the same tox (measured: 58 packages, ~7s per container). default-groups covers dev/lint/type/test/tox so a bare `uv sync` produces a venv that can run every make target. Previously only `dev` was installed, so lint/format/type-check failed outright and `make test` silently fell through to whatever tox was on PATH -- a system tox without the tox-uv plugin then dies on "runner 'uv-venv-lock-runner' is not available". Accepted cost: the three CI steps that use `uv sync --group ...` widen from two groups to five, about 9 packages and 86MB per job; the `--only-group` steps are unaffected. The root test group gains jsonschema and drops the version bounds that each member's own test group already declares. Without jsonschema, gooddata-flexconnect's tests could not even be collected from the root venv, which is the environment scripts/validate_python.sh uses for filtered runs. gooddata-pipelines' test group loses its Poetry-style specifier syntax while keeping its major-version ceilings. The staging make targets use `uv run --locked python` rather than bare `python`; the staging workflow syncs .venv but never activates it, so those two scripts ran without orjson, pyyaml or requests. Dead `wheel_build_env` is removed from the eight package tox.ini files. tox itself reported it as an unused key: uv-venv-lock-runner installs from the lock and never builds a package env, and no .pkg env is created in practice. pre-commit's ruff is pinned to v0.15.20 to match the lint group, which was already resolving to 0.15.20 while the hook ran 0.15.1. jira: trivial risk: low
tox-uv is a thin wrapper: the plugin itself lives in tox-uv-bare, and the only thing the wrapper adds is a dependency on the `uv` PyPI package. That package is a 58MB binary the test image already has (COPYed from ghcr.io/astral-sh/uv) and the host already has on PATH, so installing it again bought nothing except an overwrite of the COPYed binary. Dropping it removes two distributions from the lock and shrinks each test image from 378MB to 302MB. `tox --version` still reports the plugin registered, since tox-uv-bare was always the thing providing it. Because the wrapper's `uv` dependency is gone, [tool.uv] constraint-dependencies has nothing left to constrain and is removed. That also inverts the earlier argument for leaving the base image tag floating: the COPY is now the image's only source of uv rather than something the lock overwrote, so it is pinned to an exact 0.12.5 instead of the 0.12 tag. Also adds a .gitignore to gooddata-eval, the only package without one. Its sibling packages all ignore .tox/, .coverage, coverage.xml and the json report; without them, `make test` in that package leaves the artifacts staged for an accidental commit. jira: trivial risk: low
The job named `lint-and-format-check` only ever ran `make format`, so ruff's linter was never enforced anywhere except pre-commit -- which runs on changed files only. Three violations reached master as a result, and `make lint` has been failing on a clean checkout. Fixes all three, then adds the missing step so the job does what its name says: - sse_client.py `_is_retryable_exc` ended with an `if isinstance(...): return True` / `return False` pair (SIM103). Collapsed to returning the isinstance directly; the comment explaining why RemoteProtocolError is retryable moves above the return and is unchanged. - test_agentic_runner.py imported `AGENTIC_TEST_KINDS` and `AgenticEvalOutcome` inside two test bodies (PLC0415, twice). Both names were already imported at module top -- `AgenticEvalOutcome` identically, `AGENTIC_TEST_KINDS` from a module the file already imports from -- so the local imports were redundant, not deliberate deferrals. Removed, and AGENTIC_TEST_KINDS added to the existing top-level import. No behaviour change: the isinstance chain returns the same value for every input, and the moved imports resolve to the same objects. jira: trivial risk: low
build: harden uv workspace configuration
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## rel/dev #1770 +/- ##
===========================================
- Coverage 80.83% 80.82% -0.01%
===========================================
Files 272 272
Lines 19416 19414 -2
===========================================
- Hits 15694 15692 -2
Misses 3722 3722 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🚀 Automated PR to perform merge from master into rel/dev with changes up to 12861e2 (created by https://github.com/gooddata/gooddata-python-sdk/actions/runs/33519262377).