-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1921458: run bundle-upgrade
should handle error gracefully when a previous operator version doesn't exist
#4448
Bug 1921458: run bundle-upgrade
should handle error gracefully when a previous operator version doesn't exist
#4448
Conversation
…or doesn't exist in the cluster Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
@rashmigottipati please add changelog fragment. |
run bundle-upgrade
should gracefully handle error when a previous operator version doesn't existrun bundle-upgrade
should handle error gracefully when a previous operator version doesn't exist
Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
run bundle-upgrade
should handle error gracefully when a previous operator version doesn't existrun bundle-upgrade
should handle error gracefully when a previous operator version doesn't exist
Reproduced this bug locally using kind and also on OCP. Actual result:
|
/cherry-pick v1.3.x |
@rashmigottipati: new pull request created: #4451 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
if len(subList.Items) == 0 { | ||
return nil, errors.New("no existing operator found in the cluster to upgrade") | ||
} | ||
|
||
var subscription *v1alpha1.Subscription |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could still be nil if no subscription exists where s.Spec.Package == o.PackageName
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Thanks for catching that.
#4452
… a previous operator version doesn't exist (operator-framework#4448) * `run bundle-upgrade` should handle error gracefully when a previous operator version doesn't exist Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com> Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
… a previous operator version doesn't exist (operator-framework#4448) * `run bundle-upgrade` should handle error gracefully when a previous operator version doesn't exist Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com> Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
… a previous operator version doesn't exist (operator-framework#4448) * `run bundle-upgrade` should handle error gracefully when a previous operator version doesn't exist Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com> Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
… a previous operator version doesn't exist (operator-framework#4448) * `run bundle-upgrade` should handle error gracefully when a previous operator version doesn't exist Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com> Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
… a previous operator version doesn't exist (operator-framework#4448) * `run bundle-upgrade` should handle error gracefully when a previous operator version doesn't exist Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com> Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com> Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
… a previous operator version doesn't exist (operator-framework#4448) * `run bundle-upgrade` should handle error gracefully when a previous operator version doesn't exist Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>Signed-off-by: rearl <rearl@secureworks.com>
Description of the change:
run bundle-upgrade
command handles error instead of throwing a panic, when a previous version of the operator bundle doesn't exist in the clusterMotivation for the change:
Expected behavior: The command should check that the etcd operator doesn't exist in the cluster and handle the error gracefully instead of throwing a panic.
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs