fix(auth): serialize restore checkpoint lifecycle

This commit is contained in:
2026-08-18 02:43:42 +02:00
parent 39a0fdbd00
commit 6ec5b76c54
4 changed files with 391 additions and 40 deletions
+2 -2
View File
@@ -41,13 +41,13 @@ func productionRestoreDependencies(installation config.Installation) restoreDepe
},
})
},
checkpoint: func(ctx context.Context, target config.Installation, request CreateRequest) (Result, error) {
checkpointLocked: func(ctx context.Context, target config.Installation, request CreateRequest) (Result, error) {
path, err := restoreCheckpointPath(target, time.Now().UTC())
if err != nil {
return Result{}, err
}
request.Output = path
return Create(ctx, target, request)
return createWithDependenciesLockHeld(ctx, target, request, productionCreateDependencies(target))
},
cleanupCheckpoint: cleanupRecoveryCheckpoint,
acquireLock: func(target config.Installation) (restoreLock, error) {