Repository navigation
fix(ci): record a passing run even when the cache was not consulted - #389
Merged
Merged
Conversation
`--no-cache` suppressed both halves of the cache: it skipped reading an existing entry, which is what the flag is for, and then discarded the result of the run it had just completed. A single `--no-cache` therefore cost two full runs, because the next ordinary invocation had nothing to hit and repeated all the work over an unchanged tree. The flag decides whether an existing verdict may be trusted, not whether a fresh one is worth keeping. A `--no-cache` run has done the work and proved the tree, so it now records that. Measured here: `--no-cache` at 2m49s writes the entry, and the following ordinary run returns in 3.6s instead of repeating it. A failing run still clears the cache, and a dry run still records nothing, since it has not run the checks. `--force` already behaved this way, which is why the two flags previously disagreed about what should happen after the work was done. The investigation behind this found the cache itself correct: an unchanged tree returns in 5ms, and appending one line to a source file produces a full re-run. `--no-cache` was never necessary to pick up changes -- content addressing landed in #375 -- so the flag is for distrusting a recorded verdict, not for invalidating a stale one.
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.
--no-cachesuppressed both halves of the cache: it skipped reading an existing entry, which is what the flag is for, and then discarded the result of the run it had just completed. A single--no-cachetherefore cost two full runs, because the next ordinary invocation had nothing to hit and repeated all the work over an unchanged tree.The flag decides whether an existing verdict may be trusted, not whether a fresh one is worth keeping. A
--no-cacherun has done the work and proved the tree, so it now records that. Measured here:--no-cacheat 2m49s writes the entry, and the following ordinary run returns in 3.6s instead of repeating it.A failing run still clears the cache, and a dry run still records nothing, since it has not run the checks.
--forcealready behaved this way, which is why the two flags previously disagreed about what should happen after the work was done.The investigation behind this found the cache itself correct: an unchanged tree returns in 5ms, and appending one line to a source file produces a full re-run.
--no-cachewas never necessary to pick up changes -- content addressing landed in #375 -- so the flag is for distrusting a recorded verdict, not for invalidating a stale one.