Migrate lock commands to independent objects

This commit is contained in:
2026-09-05 13:11:11 +00:00
parent 4bc33773fa
commit 610eaefb27
13 changed files with 368 additions and 156 deletions

View File

@@ -46,8 +46,8 @@ type remoteCurrentStateCheck struct {
Err error
}
type effectiveLocksCheck struct {
Locks *effectiveLocks
type remoteLocksCheck struct {
Locks []artifacts.RemoteLock
Err error
}
@@ -194,12 +194,19 @@ func inspectRemoteCurrentState(ctx context.Context, cfg *config.Config, store st
return remoteCurrentStateCheck{State: current}
}
func inspectEffectiveLocks(ctx context.Context, cfg *config.Config, store storage.ObjectStore) effectiveLocksCheck {
locks, err := loadEffectiveLocks(ctx, cfg, store)
if err != nil {
return effectiveLocksCheck{Err: err}
func inspectRemoteLocks(ctx context.Context, cfg *config.Config, store storage.ObjectStore) remoteLocksCheck {
if store == nil {
return remoteLocksCheck{}
}
return effectiveLocksCheck{Locks: locks}
sessionPrefix, err := artifacts.ResolvePublishSessionPrefix(cfg, nil)
if err != nil {
return remoteLocksCheck{Err: err}
}
locks, err := artifacts.ListRemoteLocks(ctx, store, sessionPrefix)
if err != nil {
return remoteLocksCheck{Err: err}
}
return remoteLocksCheck{Locks: locks}
}
func resolveLocalInspectionAudioPaths(sessionDir string, inputs config.SessionInputsConfig) ([]string, error) {