Repository navigation
ci: reuse the previous venv when the lockfile changes - #38
Merged
Merged
Conversation
Every lockfile change missed both caches, so Python 3.15 rebuilt its source-only dependencies from scratch (about 14 minutes). Fall back to the latest venv for the same Python version and let task install apply only the delta. Install the interpreter first, so a restored venv never points at a missing Python and gets recreated.
This was referenced Nov 15, 2026
notdodo
added a commit
that referenced
this pull request
Nov 15, 2026
## Release 0.5.0 - Version bumped to 0.5.0 in `pyproject.toml` and `uv.lock`. - CHANGELOG: `[Unreleased]` becomes `[0.5.0] - 2026-11-15`, and the README install command points at `v0.5.0`. - It's a minor release because the Langfuse requirement changed from `==5.2.0` to `>=5.2.0,<5.3`. ## Python 3.15 CI After #38, 3.15 still spent about 85 s in `test_packaging.py`: - That test installed the wheel with `uv run --with`, which resolves the newest releases instead of `uv.lock`. - setup-uv's cache is keyed on the lockfile with no fallback, so after any lockfile change the test compiled pydantic-core, regex, zstandard and others from source. The fix: - **Test:** installs the wheel into a fresh venv constrained to `uv export --locked`. Its checks are unchanged: `py.typed` is in the wheel, and a base install has no `redaction` extra. - **CI:** setup-uv's cache is off. One `actions/cache` entry holds `.venv`, `.mypy_cache` and the uv cache, with `restore-keys` fallback to the latest entry for the same Python version. `uv cache prune --ci` keeps only locally built wheels. ## After merge Push a signed `v0.5.0` tag, and `.github/workflows/release.yml` checks, builds, attests and publishes. ## Validation - `task format check test`: 154 passed. The packaging test takes 1.5 s on 3.15 locally. - actionlint and zizmor are clean. - The wheel METADATA shows `Version: 0.5.0` and `Requires-Dist: langfuse<5.3,>=5.2.0`. - This PR's own 3.15 run starts cold, because the new `-deps-` cache key has no earlier entry. Later runs, including lockfile changes, should restore it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.








Problem
Python 3.15 CI takes about 14 minutes whenever
uv.lockchanges, which includes every Dependabot PR and #37:Fix
restore-keys: python-<ver>-venv-on the venv cache. A lockfile change now restores the latest venv for that Python version,task installapplies only the changed packages, and the result is saved under the new key.uv python install <ver>runs beforetask install, so the restored venv always has its interpreter.Validation
uv.lock, so its run is an exact cache hit. The fallback path gets its real test when docs: shorten the README, add a release workflow, and allow Langfuse patch releases #37, which does change the lockfile, is updated frommainafter this merges. Its 3.15 job should drop from about 14 minutes to roughly 1.🤖 Generated with Claude Code