{"record":{"id":"f33ff01734497df1","repo":"dagger/dagger","slug":"rewrite-lock-entry-for-s-v-w","errorCode":null,"errorMessage":"rewrite lock entry for %s %v: %w","messagePattern":"rewrite lock entry for (.+?) (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/lockfile_update.go","lineNumber":35,"sourceCode":"\tdigest \"github.com/opencontainers/go-digest\"\n)\n\n// UpdateWorkspaceLock refreshes the existing entries in a workspace lockfile in place.\nfunc UpdateWorkspaceLock(ctx context.Context, query *Query, lock *workspace.Lock) error {\n\tentries := lock.Entries()\n\n\tvar refreshedEntries []workspace.LookupEntry\n\tfor _, entry := range entries {\n\t\tif !isLatestLockEntry(entry) {\n\t\t\tcontinue\n\t\t}\n\n\t\tresult, err := updateWorkspaceLockEntry(ctx, query, entry)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := lock.SetLookup(entry.Namespace, entry.Operation, entry.Inputs, result); err != nil {\n\t\t\treturn fmt.Errorf(\"rewrite lock entry for %s %v: %w\", entry.Operation, entry.Inputs, err)\n\t\t}\n\t\tselectedEntry, err := selectedSHAEntry(entry, result)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif containsLockEntry(refreshedEntries, selectedEntry) {\n\t\t\tcontinue\n\t\t}\n\t\tpreviousValue, found := lock.GetLookup(\n\t\t\tselectedEntry.Namespace,\n\t\t\tselectedEntry.Operation,\n\t\t\tselectedEntry.Inputs,\n\t\t)\n\t\tif found {\n\t\t\tselectedEntry.Value = previousValue\n\t\t}\n\t\tselectedValue, err := updateWorkspaceLockEntry(ctx, query, selectedEntry)\n\t\tif err != nil {","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/lockfile_update.go#L17-L53","documentation":"UpdateWorkspaceLock: lock.SetLookup failed while rewriting a refreshed entry back into the workspace lockfile. The refresh itself succeeded; persisting the updated lookup (namespace/operation/inputs → new value) failed.","triggerScenarios":"Thrown at core/lockfile_update.go:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the lockfile is writable and not concurrently modified","Inspect the wrapped SetLookup error for the conflicting entry","Regenerate the lockfile from scratch if it is corrupt"],"exampleFix":null,"handlingStrategy":"validation","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"}