fix(deployer): wire pre-deploy backup into the unified dispatch path
auto_backup_before_deploy silently did nothing — MaybeBackupBeforeDeploy's only caller was the legacy executeDeploy pipeline, removed in the workload-first cutover. Reconnect it as maybeBackupBeforeDeploy(), invoked from DispatchPlugin after the source resolves and before it runs, so the setting fires for every source kind. Fail-open: a nil backuper, a settings-load error, or a backup failure skips the snapshot without blocking the deploy. Adds predeploy_backup_test.go asserting the wiring.
This commit is contained in:
@@ -21,9 +21,9 @@ import (
|
||||
type fakeSource struct {
|
||||
kind string
|
||||
|
||||
mu sync.Mutex
|
||||
deployErr error
|
||||
teardownErr error
|
||||
mu sync.Mutex
|
||||
deployErr error
|
||||
teardownErr error
|
||||
reconcileErr error
|
||||
|
||||
deployCount atomic.Int32
|
||||
@@ -34,8 +34,8 @@ type fakeSource struct {
|
||||
lastDeps plugin.Deps
|
||||
}
|
||||
|
||||
func (f *fakeSource) Kind() string { return f.kind }
|
||||
func (f *fakeSource) SchemaSample() any { return struct{}{} }
|
||||
func (f *fakeSource) Kind() string { return f.kind }
|
||||
func (f *fakeSource) SchemaSample() any { return struct{}{} }
|
||||
func (f *fakeSource) Validate(json.RawMessage) error { return nil }
|
||||
|
||||
func (f *fakeSource) Deploy(_ context.Context, deps plugin.Deps, _ plugin.Workload, intent plugin.DeploymentIntent) error {
|
||||
|
||||
Reference in New Issue
Block a user