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

Bug 1841175: Recreate pending installplan if deleted before approval #1843

Merged

Conversation

dinhxuanvu
Copy link
Member

At the moment, OLM will not recreate the pending-approval
installplan. The subscription will be stuck in UpgradePending forever
as a result. This PR will enable installplan recreation if it is deleted
before approval.

Signed-off-by: Vu Dinh [email protected]

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@dinhxuanvu dinhxuanvu changed the title fix(ip): Recreate pending installplan if deleted before approval Bug 1841175: Recreate pending installplan if deleted before approval Oct 29, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Oct 29, 2020
@openshift-ci-robot
Copy link
Collaborator

@dinhxuanvu: This pull request references Bugzilla bug 1841175, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1841175: Recreate pending installplan if deleted before approval

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Oct 29, 2020
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu dinhxuanvu force-pushed the ip-recreate branch 2 times, most recently from 267aa10 to bdcc6ac Compare November 3, 2020 07:59
Copy link
Contributor

@benluddy benluddy left a comment

Choose a reason for hiding this comment

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

Did you consider handling this by verifying the install plan reference as part of reconciling subscriptions, then making ensureSubscriptionInstallPlanState bail if a subscription has a missing reference? I think this fix will be more resilient if it doesn't require the resolver to change its behavior.

@dinhxuanvu
Copy link
Member Author

Did you consider handling this by verifying the install plan reference as part of reconciling subscriptions, then making ensureSubscriptionInstallPlanState bail if a subscription has a missing reference? I think this fix will be more resilient if it doesn't require the resolver to change its behavior.

I have considered to do that but to me the state of the subscription doesn't change. It is the IP that is missing which we simply need to recreate. Changing the state can be a bit confusing to the UI. However, I think it may require less code if we change the subscription state which will force the nothingToUpdate to return false. That's something I can do.

@dinhxuanvu dinhxuanvu force-pushed the ip-recreate branch 3 times, most recently from 51a589d to 0181bf7 Compare November 13, 2020 04:35
@dinhxuanvu
Copy link
Member Author

/retest

2 similar comments
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu dinhxuanvu force-pushed the ip-recreate branch 2 times, most recently from 02ea9bf to 3ff7232 Compare November 16, 2020 18:52
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu dinhxuanvu force-pushed the ip-recreate branch 2 times, most recently from 45a21b9 to 0d812b3 Compare November 16, 2020 21:10
@dinhxuanvu
Copy link
Member Author

/retest

2 similar comments
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu
Copy link
Member Author

/retest

At the moment, OLM will not recreate the pending-approval
installplan. The subscription will be stuck in UpgradePending forever
as a result. This PR will enable installplan recreation if it is deleted
before approval.

Signed-off-by: Vu Dinh <[email protected]>
@dinhxuanvu
Copy link
Member Author

/retest

2 similar comments
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu dinhxuanvu force-pushed the ip-recreate branch 2 times, most recently from 4ca952a to 6063161 Compare November 18, 2020 20:59
@dinhxuanvu
Copy link
Member Author

@benluddy May I have a lgtm and approval? :)

@dinhxuanvu
Copy link
Member Author

/retest

1 similar comment
@dinhxuanvu
Copy link
Member Author

/retest

Copy link
Member

@kevinrizza kevinrizza 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 Nov 19, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2020
@kevinrizza
Copy link
Member

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu, kevinrizza

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 19, 2020
@kevinrizza
Copy link
Member

/lgtm
/test e2e-gcp

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2020
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu
Copy link
Member Author

/cherry-pick release-4.6

@openshift-cherrypick-robot

@dinhxuanvu: once the present PR merges, I will cherry-pick it on top of release-4.6 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.6

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.

@openshift-merge-robot openshift-merge-robot merged commit cd0fdf6 into operator-framework:master Nov 19, 2020
@openshift-ci-robot
Copy link
Collaborator

@dinhxuanvu: All pull requests linked via external trackers have merged:

Bugzilla bug 1841175 has been moved to the MODIFIED state.

In response to this:

Bug 1841175: Recreate pending installplan if deleted before approval

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.

@openshift-cherrypick-robot

@dinhxuanvu: new pull request created: #1874

In response to this:

/cherry-pick release-4.6

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
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants