Bug 1921458: run bundle-upgrade should handle error gracefully when a previous operator version doesn't exist#4448
Merged
rashmigottipati merged 2 commits intooperator-framework:masterfrom Jan 28, 2021
Conversation
…or doesn't exist in the cluster Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Member
|
@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>
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
Member
Author
|
Reproduced this bug locally using kind and also on OCP. Actual result: |
Member
Author
|
/cherry-pick v1.3.x |
|
@rashmigottipati: new pull request created: #4451 DetailsIn 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. |
estroz
reviewed
Jan 29, 2021
| return nil, errors.New("no existing operator found in the cluster to upgrade") | ||
| } | ||
|
|
||
| var subscription *v1alpha1.Subscription |
Member
There was a problem hiding this comment.
This could still be nil if no subscription exists where s.Spec.Package == o.PackageName.
Member
Author
There was a problem hiding this comment.
You're right. Thanks for catching that.
#4452
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 4, 2021
… 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>
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 4, 2021
… 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>
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 5, 2021
… 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>
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 5, 2021
… 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>
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 5, 2021
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change:
run bundle-upgradecommand 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