dagger/dagger · error
reopen persisted remote git mirror snapshot %q: %w
Error message
reopen persisted remote git mirror snapshot %q: %w
What it means
Reopening the mutable cache snapshot backing a persisted remote git mirror failed. The payload decoded fine, but resolving the linked bare-repo snapshot ref key through the snapshot manager errored — commonly an evicted/GC'd cache record or a snapshot ID unknown to the current cache backend.
Source
Thrown at core/git_remote_mirror.go:160
return mirror, nil
}
link, err := loadPersistedSnapshotLinkByResultID(ctx, dag, resultID, "remote git mirror", "bare_repo")
if err != nil {
return nil, err
}
query, err := persistedDecodeQuery(dag)
if err != nil {
return nil, err
}
ref, err := query.SnapshotManager().GetMutableBySnapshotID(
ctx,
link.RefKey,
bkcache.NoUpdateLastUsed,
bkcache.WithRecordType(bkclient.UsageRecordTypeGitCheckout),
bkcache.WithDescription(fmt.Sprintf("git bare repo for %s", mirror.RemoteURL)),
)
if err != nil {
return nil, fmt.Errorf("reopen persisted remote git mirror snapshot %q: %w", link.RefKey, err)
}
mirror.snapshot = ref
return mirror, nil
}
func (mirror *RemoteGitMirror) EnsureCreated(ctx context.Context, query *Query) error {
if mirror == nil {
return fmt.Errorf("remote git mirror is nil")
}
mirror.mu.Lock()
defer mirror.mu.Unlock()
return mirror.ensureSnapshotLocked(ctx, query)
}
func (mirror *RemoteGitMirror) acquire(ctx context.Context, query *Query) (_ bkcache.MutableRef, release func(), err error) {
if mirror == nil {
return nil, nil, fmt.Errorf("remote git mirror is nil")
}View on GitHub (pinned to 82ba2681db)
Solutions
- Treat the persisted record as stale: drop it and re-clone the mirror from RemoteURL
- Check whether cache GC evicted the snapshot and adjust retention if this recurs
- Verify the snapshot link ref key format matches the current cache schema
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at core/git_remote_mirror.go:160 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/3dacbf2f2de30eea.
Report an issue: GitHub.