feat: add --fail-on-cache-miss flag to dagger command#13165
Open
guettli wants to merge 4 commits into
Open
Conversation
Signed-off-by: Thomas Güttler <thomas.guettler@syself.com>
c794d09 to
5e5e90d
Compare
…ing commands Signed-off-by: Thomas Güttler <thomas.guettler@syself.com>
bf732bb to
c530c59
Compare
…gnostic Adds a new call-twice root command that runs dagger call once, then reruns it with --fail-on-cache-miss. Improves the cache miss failure message to include changed input flags when available. Signed-off-by: Thomas Güttler <thomas.guettler@syself.com>
Signed-off-by: Thomas Güttler <thomas.guettler@syself.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.
Overview
This PR introduces a new
--fail-on-cache-missflag for the dagger command that allows users to enforce cache-only execution mode, and adds a new convenience commanddagger call-twiceto run a call once normally and then re-run it with cache validation.What changed
dagger call-twiceto rundagger call ...followed bydagger call --fail-on-cache-miss ...--fail-on-cache-missdiagnostics so failures now include changed input flags when availableMotivation
Users often want to verify that a call can be served from cache, but running the command twice manually is inconvenient.
call-twicemakes that flow easier and the enhanced error message makes it clearer why a cache miss occurred.Usage examples
Notes
callandfunctionsRelated:
How to debug unexpected cache-misses between consecutive
dagger callruns? · dagger/dagger · Discussion #13164