Repository navigation
test(zccache): name the miss_reason when the warm hit assertion fails (#1757) - #1758
Merged
Merged
Conversation
…#1757) The embedded cold-miss-then-warm-hit smoke test failed on Windows with only `cached: false`, which does not say *why* the second compile missed. Dump every `*.jsonl` journal under the cache root into the assertion message: the compile journal records `outcome` and `miss_reason` in zccache's closed vocabulary, and the lifecycle log records `destination_write_failed` with the raw errno. The walk is depth-bounded because an embedded service keeps its journals under `daemon-state/embedded-*/<version>/logs/`, not directly under the cache root.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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
zccache_embedded_smoke::embedded_compilation_cold_miss_then_warm_hitflakes onWindows (#1757). When it fails, the only signal is
cached: false—it does not say why the second identical compile missed, so the failure has to
be re-derived by hand from a runner that has already gone away.
Change
On failure, dump every
*.jsonljournal under the service's cache root into theassertion message:
logs/compile_journal.jsonlrecordsoutcomeandmiss_reasoninzccache_daemon_core::daemon::compile_journal's closed vocabulary(
destination_write_failed,source_changed, …).destination_write_failed.The walk is depth-bounded (6 levels, 200 KB cap) rather than a fixed path,
because an embedded service keeps its journals under
daemon-state/embedded-*/<version>/logs/, not directly under the cache root.When nothing is found the message says so and prints the root it searched, so an
empty dump is distinguishable from an absent journal.
Verification
Compiles against the current pinned zccache rev
(
cargo check -p fbuild-build --tests, exit 0). The smoke test itself passes whenrun against the zccache fix for #1757 (forge-ci/zccache#1999): both
embedded_service_starts_and_shuts_downandembedded_compilation_cold_miss_then_warm_hitpass.Diagnostics only — no behaviour change on the passing path.