{"record":{"id":"3dacbf2f2de30eea","repo":"dagger/dagger","slug":"reopen-persisted-remote-git-mirror-snapshot-q-w","errorCode":null,"errorMessage":"reopen persisted remote git mirror snapshot %q: %w","messagePattern":"reopen persisted remote git mirror snapshot %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/git_remote_mirror.go","lineNumber":160,"sourceCode":"\t\treturn mirror, nil\n\t}\n\tlink, err := loadPersistedSnapshotLinkByResultID(ctx, dag, resultID, \"remote git mirror\", \"bare_repo\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tquery, err := persistedDecodeQuery(dag)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tref, err := query.SnapshotManager().GetMutableBySnapshotID(\n\t\tctx,\n\t\tlink.RefKey,\n\t\tbkcache.NoUpdateLastUsed,\n\t\tbkcache.WithRecordType(bkclient.UsageRecordTypeGitCheckout),\n\t\tbkcache.WithDescription(fmt.Sprintf(\"git bare repo for %s\", mirror.RemoteURL)),\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reopen persisted remote git mirror snapshot %q: %w\", link.RefKey, err)\n\t}\n\tmirror.snapshot = ref\n\treturn mirror, nil\n}\n\nfunc (mirror *RemoteGitMirror) EnsureCreated(ctx context.Context, query *Query) error {\n\tif mirror == nil {\n\t\treturn fmt.Errorf(\"remote git mirror is nil\")\n\t}\n\tmirror.mu.Lock()\n\tdefer mirror.mu.Unlock()\n\treturn mirror.ensureSnapshotLocked(ctx, query)\n}\n\nfunc (mirror *RemoteGitMirror) acquire(ctx context.Context, query *Query) (_ bkcache.MutableRef, release func(), err error) {\n\tif mirror == nil {\n\t\treturn nil, nil, fmt.Errorf(\"remote git mirror is nil\")\n\t}","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/git_remote_mirror.go#L142-L178","documentation":"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.","triggerScenarios":"Thrown at core/git_remote_mirror.go:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}