Make remote publish locks generation-safe
This commit is contained in:
@@ -210,6 +210,14 @@ func executeStages(ctx context.Context, cfg *config.Config, stages []stage.Stage
|
||||
)
|
||||
}
|
||||
applyEffectiveLocks(env.Config, locks.All)
|
||||
staticLocks := append([]config.PublishLockRule(nil), locks.Static...)
|
||||
env.RevalidatePublishLocks = func(recheckCtx context.Context) ([]config.PublishLockRule, error) {
|
||||
remote, _, _, err := loadRemoteLockStore(recheckCtx, env.Config, env.ObjectStore)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return config.MergePublishLockRules(staticLocks, remote.Locks), nil
|
||||
}
|
||||
}
|
||||
if env.Notifier == nil {
|
||||
env.Notifier = ¬ify.NoopSender{}
|
||||
|
||||
Reference in New Issue
Block a user