Skip to content

feat: add --fail-on-cache-miss flag to dagger command#13165

Open
guettli wants to merge 4 commits into
dagger:mainfrom
guettli:add-fail-on-cache-miss
Open

feat: add --fail-on-cache-miss flag to dagger command#13165
guettli wants to merge 4 commits into
dagger:mainfrom
guettli:add-fail-on-cache-miss

Conversation

@guettli
Copy link
Copy Markdown

@guettli guettli commented May 17, 2026

Overview

This PR introduces a new --fail-on-cache-miss flag for the dagger command that allows users to enforce cache-only execution mode, and adds a new convenience command dagger call-twice to run a call once normally and then re-run it with cache validation.

What changed

  • Added dagger call-twice to run dagger call ... followed by dagger call --fail-on-cache-miss ...
  • Improved --fail-on-cache-miss diagnostics so failures now include changed input flags when available
  • Added focused unit tests covering the cache-miss error helper

Motivation

Users often want to verify that a call can be served from cache, but running the command twice manually is inconvenient. call-twice makes that flow easier and the enhanced error message makes it clearer why a cache miss occurred.

Usage examples

dagger call-twice myFunction
dagger call --fail-on-cache-miss myFunction

Notes

  • The new command is registered at the root level alongside call and functions
  • The cache-miss error now surfaces changed input flags if they were part of the request

Related:

How to debug unexpected cache-misses between consecutive dagger call runs? · dagger/dagger · Discussion #13164

Signed-off-by: Thomas Güttler <thomas.guettler@syself.com>
@guettli guettli force-pushed the add-fail-on-cache-miss branch from c794d09 to 5e5e90d Compare May 17, 2026 04:01
@guettli guettli requested a review from a team as a code owner May 17, 2026 05:05
…ing commands

Signed-off-by: Thomas Güttler <thomas.guettler@syself.com>
@guettli guettli force-pushed the add-fail-on-cache-miss branch from bf732bb to c530c59 Compare May 17, 2026 05:10
guettli added 2 commits May 17, 2026 10:04
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant