Skip to content

Conversation

@konstin
Copy link
Member

@konstin konstin commented Dec 2, 2025

Add a script and associated CI check that checks whether a new uv build can use the cache of the previous uv version. This prevents accidental changes to cache keys, e.g. by changing nested data structures.

I've tested the script by using a previous change of #16143.

The check can be disabled with a PR label for PRs that change the cache layout. What's missing here is that the base is the last release, meaning that once a PR with that label merges, all following PRs will fail this check, as we currently don't have a good way to ask whether there was a change previously or to download the latest build binary from main as baseline.

@konstin konstin added the internal A refactor or improvement that is not user-facing label Dec 2, 2025
@konstin konstin temporarily deployed to uv-test-registries December 2, 2025 11:07 — with GitHub Actions Inactive
@konstin konstin temporarily deployed to uv-test-publish December 2, 2025 11:08 — with GitHub Actions Inactive
@zanieb
Copy link
Member

zanieb commented Dec 2, 2025

Related #1699

cc @BurntSushi

Add a script and associated CI check that checks whether a new uv build can use the cache of the previous uv version. This prevents accidental changes to cache keys, e.g. by changing nested data structures.

I've tested the script by using a previous change of #16143.

The check can be disabled with a PR label for PRs that change the cache layout. What's missing here is that the base is the last release, meaning that once a PR with that label merges, all following PRs will fail this check, as we currently don't have a good way to ask whether there was a change previously or to download the latest build binary from main as baseline.
@konstin konstin force-pushed the konsti/check-cache-changes branch from 68c03b7 to b7e5ac2 Compare December 2, 2025 11:11
@konstin konstin temporarily deployed to uv-test-registries December 2, 2025 11:13 — with GitHub Actions Inactive
@konstin konstin temporarily deployed to uv-test-publish December 2, 2025 11:14 — with GitHub Actions Inactive
@konstin
Copy link
Member Author

konstin commented Dec 2, 2025

I'm taking suggestions if someone has ideas how we can solve the previously-PR-changes the cache problem.

We can check the GitHub API if any PR merged between last release and base had the cache-change label, but that sounds complex, and doesn't capture repeat changes in other PRs. Another option is storing the latest binary builds from main as nightly somewhere.

@BurntSushi
Copy link
Member

Another option is storing the latest binary builds from main as nightly somewhere.

I kinda like this. Also independently useful.

Another idea: what about cloning current main in this CI job and building a debug binary of uv on-the-fly to test against?

@konstin
Copy link
Member Author

konstin commented Dec 2, 2025

CI performance mainly, but you're right that it's a very straightforward solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants