Carry dependencies through pipeline commands

This commit is contained in:
2026-09-05 17:53:56 +00:00
parent c3307ab5fb
commit dd905c4daa
13 changed files with 153 additions and 89 deletions

View File

@@ -184,10 +184,17 @@ func inspectPreviousArtifactReadiness(
}
func inspectRemoteCurrentState(ctx context.Context, cfg *config.Config, store storage.ObjectStore) remoteCurrentStateCheck {
return inspectRemoteCurrentStateWithDependencies(ctx, cfg, store, commandDependencies{
discoverRemoteCurrentState: discoverRemoteCurrentStateFn,
})
}
func inspectRemoteCurrentStateWithDependencies(ctx context.Context, cfg *config.Config, store storage.ObjectStore, deps commandDependencies) remoteCurrentStateCheck {
if store == nil {
return remoteCurrentStateCheck{}
}
current, err := discoverRemoteCurrentStateFn(ctx, cfg, store)
deps = normalizeCommandDependencies(deps)
current, err := deps.discoverRemoteCurrentState(ctx, cfg, store)
if err != nil {
return remoteCurrentStateCheck{Err: err}
}