Repository navigation
Include setup.py in CI venv and Rust extension cache keys - #134
Merged
Merged
Conversation
The Rust extension is now defined in `setup.py` instead of `pyproject.toml`, so changes to it need to invalidate the cached venv and extension builds.
TheJulianJES
marked this pull request as ready for review
October 12, 2026 17:28
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #134 +/- ##
=======================================
Coverage 94.31% 94.31%
=======================================
Files 25 25
Lines 4345 4345
=======================================
Hits 4098 4098
Misses 247 247 ☔ 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.
Since #128, the Rust extension is defined in
setup.pyinstead ofpyproject.toml. This addssetup.pyto the CI cache keys, so changing it invalidates the cached venvs and Rust extension builds.Changes
setup.pyto all base venv cache keys (all jobs restoring the venv use the same key).setup.pyto the macOS/Windows Rust extension cache keys.Detailed AI-generated PR description
Verbose AI-generated PR description (CLICK TO EXPAND)
The base venv cache key hashes
pyproject.toml,Cargo.toml,Cargo.lockandsrc/**, and the macOS/Windows Rust extension cache key hashes the Cargo files andsrc/**. Before #128, the extension was configured through[tool.setuptools-rust]inpyproject.toml, so a change to it invalidated the cached venvs. #128 moved theRustExtension(...)definition (and the platform check deciding whether to build it) intosetup.py, which isn't part of either key. A future change there, e.g. to the extension's arguments or the platform check, would then be served stale cached venvs and extension builds on macOS/Windows.This adds
setup.pyto:prepare-base,prek,pytest,pytest-esphome,pytest-macos,pytest-windows,pytest-serialx-compat,coverage). They have to stay identical, since most jobs restore withfail-on-cache-miss: true.No other cache keys depend on
setup.py(prek, ESPHome daemon, CP2102 emulator, cp210x modules, ser2net, Pyodide).As the keys change, this PR's CI rebuilds all venvs once.
Related: