Skip to content

Commit ddcda90

Browse files
Handle error when subscription doesn't match package name for run bundle-upgrade (#4454)
Signed-off-by: rashmigottipati <[email protected]>
1 parent 96970e9 commit ddcda90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/olm/operator/registry/operator_installer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ func (o OperatorInstaller) UpgradeOperator(ctx context.Context) (*v1alpha1.Clust
123123
}
124124
}
125125

126+
if subscription == nil {
127+
return nil, fmt.Errorf("subscription for package %q not found", o.PackageName)
128+
}
129+
126130
log.Infof("Found existing subscription with name %s and namespace %s", subscription.Name, subscription.Namespace)
127131

128132
// todo: attempt #1 to trigger install plan for the subscription and

0 commit comments

Comments
 (0)