Skip to content
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

cleanup: delete catsrc and operatorgroup even if subscription is not found #4089

Merged
merged 2 commits into from Oct 26, 2020

Conversation

joelanford
Copy link
Member

Description of the change:

Updates the operator-sdk cleanup subcommand to cleanup the catalog source and operator group even when a subscription for the operator does not exist.

Motivation for the change:

In the event that a user runs operator-sdk run and an error occurs after the operator group and catalog source are created, but before a subscription is created, the operator group and catalog source must be manually cleaned up before retrying the operator-sdk run command.

In 1.1.0, the operator-sdk cleanup command will not cleanup the operator group and catalog source in this scenario.

This PR updates the operator-sdk cleanup command so that even when a subscription does not exist, it looks for the expected catalog source and operator group, and deletes them if they exist.

Closes #4085

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@joelanford joelanford added the kind/bug Categorizes issue or PR as related to a bug. label Oct 22, 2020
Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 23, 2020
Co-authored-by: Eric Stroczynski <estroczy@redhat.com>
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 23, 2020
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2020
@joelanford joelanford merged commit decf479 into operator-framework:master Oct 26, 2020
@joelanford joelanford deleted the fix-cleanup branch October 26, 2020 12:54
@joelanford
Copy link
Member Author

/cherry-pick v1.1.x

@openshift-cherrypick-robot

@joelanford: new pull request created: #4103

In response to this:

/cherry-pick v1.1.x

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup command doesn't cleanup from a failed run
5 participants