[VPEX][5c] Skip constraint cache writes under --check#5854
Open
rugpanov wants to merge 1 commit into
Open
Conversation
Collaborator
Integration test reportCommit: 3127207
8 interesting tests: 4 SKIP, 3 RECOVERED, 1 KNOWN
Top 10 slowest tests (at least 2 minutes):
|
af9d41b to
c2e8b69
Compare
8b12b87 to
4716210
Compare
anton-107
approved these changes
Jul 9, 2026
anton-107
left a comment
Contributor
There was a problem hiding this comment.
Approving. Tight, correct follow-up: writeCache threaded through FetchConstraints with the pipeline passing !p.Check, and an existing cache is still read for offline fallback (reading isn't a mutation) — exactly right. Test pair is the right shape: unit (TestFetchConstraintsSkipsCacheWriteWhenDisabled) plus the strengthened end-to-end TestPipelineCheckMutatesNothing asserting the cache dir stays empty. All call sites updated. No findings.
4716210 to
d6462fd
Compare
A --check dry run must not mutate disk, but FetchConstraints wrote the fetched artifact into the cache dir on every successful live fetch — so a dry run still populated the cache whenever it was writable, even though the pipeline skips every other write-side step under --check. Thread a writeCache flag through FetchConstraints; the pipeline passes !p.Check. An existing cache is still read for offline fallback, since reading is not a mutation. Assert both directly (FetchConstraints with writeCache=false leaves the cache dir empty) and end-to-end (the --check pipeline test now checks the cache dir stays empty too). Reported by codex review of the pipeline PR. Co-authored-by: Isaac
d6462fd to
3127207
Compare
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.
Why
Codex review of the pipeline PR (#5851) flagged that a
--checkdry run still writes to disk:FetchConstraintspopulates the on-disk constraint cache on every successful live fetch, so--checkmutated the cache directory whenever it was writable — even though the pipeline deliberately skips every other write-side step (writability probe, package-manager availability, the pyproject.toml write) under--check.The cache lives under
os.UserCacheDir()and is disposable, so this was never a correctness or safety bug. But the code frames--checkas performing no writes, and this was the one path that broke that framing. This makes behavior match the contract.What
writeCache boolthroughFetchConstraints. Whenfalse, the successful live-fetch path skipswriteCacheAtomic. An existing cache is still read for offline fallback, since reading is not a mutation.!p.Check, so a real run caches as before and a dry run does not.Testing strategy
TestFetchConstraintsSkipsCacheWriteWhenDisabled— a live fetch withwriteCache=falsesucceeds but leaves the cache dir empty.TestPipelineCheckMutatesNothing— strengthened to assert the cache dir stays empty after a--checkrun (previously it only checked the project file).go build,go test,golangci-lint(0 issues),deadcode,gofmt— all green.About this stack
Follow-up to the
databricks local-env python syncstack. It is stacked on #5851 (the six-phase pipeline) because the fix spans two layers: the cache write lives in the fetch layer, but the--checkdry-run concept it must respect only exists in the pipeline. Review bottom-up — this PR's diff shows only the cache-write change.This pull request and its description were written by Isaac.