Skip to content

Commit 7a74192

Browse files
authored
olm/operator: fix issue in wrapping error (#4309)
Randomly `run packagemanifests` fails with below error: ``` Failed to run packagemanifests: error approving install plan: Operation cannot be fulfilled on installplans.operators.coreos.com \"install-jp28s\": the object has been modified; please apply your changes to the latest version and try again ``` The reason is the way error wrapping while calling the `retry.RetryOnConflict()`. Using '%w' for formatting the error keeps the original error type unlike '%v'. FIXES #4308
1 parent ef19706 commit 7a74192

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/olm/operator/registry/operator_installer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func (o OperatorInstaller) approveInstallPlan(ctx context.Context, sub *v1alpha1
335335
// approve the install plan by setting Approved to true
336336
ip.Spec.Approved = true
337337
if err := o.cfg.Client.Update(ctx, &ip); err != nil {
338-
return fmt.Errorf("error approving install plan: %v", err)
338+
return fmt.Errorf("error approving install plan: %w", err)
339339
}
340340
return nil
341341
}); err != nil {

0 commit comments

Comments
 (0)