Skip to content

Commit

Permalink
fix(deploy): incorrect error message when release lock fails
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Apr 9, 2024
1 parent 1c1a036 commit 7f60ccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/deploy/lock_manager/lock_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func NewConfigMapLocker(configMapName, namespace string, locker lockgate.Locker)

func (locker *ConfigMapLocker) Acquire(lockName string, opts lockgate.AcquireOptions) (bool, lockgate.LockHandle, error) {
if _, err := kubeutils.GetOrCreateConfigMapWithNamespaceIfNotExists(kube.Client, locker.Namespace, locker.ConfigMapName); err != nil {
return false, lockgate.LockHandle{}, fmt.Errorf("unable to prepare kubernetes cm/%s in ns/%s: %w", locker.Namespace, locker.ConfigMapName, err)
return false, lockgate.LockHandle{}, fmt.Errorf("unable to prepare kubernetes cm/%s in ns/%s: %w", locker.ConfigMapName, locker.Namespace, err)
}
return locker.Locker.Acquire(lockName, opts)
}
Expand Down

0 comments on commit 7f60ccc

Please sign in to comment.