Skip to content

Reject ignored cache overrides in integration snapshots - #21119

Merged
zanieb merged 2 commits into
mainfrom
zb/reject-ignored-test-cache-overrides
Aug 14, 2026
Merged

zanieb merged 2 commits into
mainfrom
zb/reject-ignored-test-cache-overrides

Conversation

@astral-automations-bot

Copy link
Copy Markdown
Contributor

Integration tests can silently set UV_CACHE_DIR on a TestContext command that already supplies --cache-dir, so command-line precedence ignores the requested cache and leaves the intended behavior untested. Reject that combination immediately before snapshot execution, preserve raw commands whose environment override is effective, and update the existing version fixture to configure its actual cache directory.

@astral-sh-bot

astral-sh-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the main base revision.

  • Added tests: 4
  • Removed tests: 0
  • Changed suites: 1
uv-test: +4 / -0

Added:

  • uv-test::cache_directory_tests::allows_environment_override_without_explicit_cache_argument
  • uv-test::cache_directory_tests::allows_removed_environment_override_with_explicit_cache_argument
  • uv-test::cache_directory_tests::rejects_environment_override_with_explicit_cache_argument
  • uv-test::cache_directory_tests::rejects_environment_override_with_inline_cache_argument

Removed: none

@zanieb
zanieb merged commit 5a132cf into main Aug 14, 2026
60 checks passed
@zanieb
zanieb deleted the zb/reject-ignored-test-cache-overrides branch August 14, 2026 00:37
VedantMadane added a commit to VedantMadane/uv that referenced this pull request Sep 21, 2026
)

Integration tests can silently set `UV_CACHE_DIR` on a `TestContext`
command that already supplies `--cache-dir`, so command-line precedence
ignores the requested cache and leaves the intended behavior untested.
Reject that combination immediately before snapshot execution, preserve
raw commands whose environment override is effective, and update the
existing version fixture to configure its actual cache directory.

---------

Co-authored-by: Zanie Blue <[email protected]>

This branch was previously deployed

1 inactive deployment
automations — c817df9a Deployed Aug 13, 2026 by astral-automations-bot[bot] via review / security review #44682
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