CI: Improving Cache Hit Rates and Seeding - #607
Merged
Conversation
bumping nanobind Co-authored-by: Evert Lammerts <evertlammerts@users.noreply.github.com>
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.
Summary
After #559, there's a few more ways to improve caching and get the seeds to 100% hit rates:
Current problems
cibuildwheel uses a random path dir which causes the Python compilation units to consistently miss. There hasn't been a great solution until yesterday (2026-08-27) when pypa/build 1.6.0 shipped: #1083 control the isolated build environment location w --env-dir. This feature will solve one specific issue: the 51 cache misses in the seed builds due to the random build path created by cibuildwheel.
Using a dynamic build-dir means that each build is contaminated by the cache_tag: the cache_tag ends up part of some ccache compile calls, which then aren't reused across builds.
duckdb-python/pyproject.toml
Line 84 in 6239d16
The seed cache is dependent on the MACOSX_DEPLOYMENT_TARGET, set here:
duckdb-python/pyproject.toml
Line 510 in 6239d16
but cibuildwheel will autoadjust that to 10.15 for some builds and ignore your input: cibuildwheel MACOSX_DEPLOYMENT_TARGET. This causes a mismatch between cp311 and other builds, causing cp311 to miss.
Alternative: If you need to support cp311 on 10.14, then could also move it up to seed so it generates its own cache.
Changes
Versions
Current State Notes
--env-dirchange above{cache_tag}.Impact
Futures / other optimizations worth considering
test_executemany_leakandtest_materialized_relation[10000000]-n autoor-n 2for pytests.. there's a few places where tmppath fixtures will be needed, but this cuts CI time down significantly.