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 1784024: Use generations to prevent duplicate InstallPlans #1316

Merged

Conversation

njhale
Copy link
Member

@njhale njhale commented Feb 21, 2020

Supersedes #1203

@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 21, 2020
@njhale njhale changed the title Installplangen Bug 1784024: Use generations to prevent duplicate InstallPlans Feb 21, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Feb 21, 2020
@openshift-ci-robot
Copy link
Collaborator

@njhale: This pull request references Bugzilla bug 1784024, which is invalid:

  • expected the bug to target the "4.5.0" release, but it targets "4.4.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1784024: Use generations to prevent duplicate InstallPlans

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.

@njhale
Copy link
Member Author

njhale commented Feb 21, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Feb 21, 2020
@openshift-ci-robot
Copy link
Collaborator

@njhale: This pull request references Bugzilla bug 1784024, 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.

In response to this:

/bugzilla refresh

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 size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 24, 2020
@njhale
Copy link
Member Author

njhale commented Feb 24, 2020

/retest

Adds generation field to InstallPlans and Subscriptions to match resolved content and avoid re-resolution.

Fixes an issue where duplicate InstallPlans are created when more than one catalog provides dependency operators.
@njhale
Copy link
Member Author

njhale commented Feb 24, 2020

/retest

3 similar comments
@njhale
Copy link
Member Author

njhale commented Feb 24, 2020

/retest

@njhale
Copy link
Member Author

njhale commented Feb 25, 2020

/retest

@njhale
Copy link
Member Author

njhale commented Feb 25, 2020

/retest

Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

Overall, /lgtm

pkg/controller/operators/catalog/operator.go Show resolved Hide resolved
@dinhxuanvu
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@njhale
Copy link
Member Author

njhale commented Feb 25, 2020

/hold

this failure is concerning. Investigating...

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 25, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2020
pkg/controller/operators/catalog/operator.go Outdated Show resolved Hide resolved
@@ -813,12 +818,12 @@ func (o *Operator) syncResolvingNamespace(obj interface{}) error {
}
}

installPlanReference, err := o.ensureInstallPlan(logger, namespace, subs, installPlanApproval, steps, bundleLookups)
installPlanReference, err := o.ensureInstallPlan(logger, namespace, maxGeneration+1, subs, installPlanApproval, steps, bundleLookups)
Copy link
Member

Choose a reason for hiding this comment

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

can this use updatedSubs instead of subs?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's probably best to use subs since we want to apply OwnerReferences to the generated InstallPlan referencing all Subscriptions in the namespace. I think we also want to use subs a few lines below for the Subscription update so they point to the latest InstallPlan.

I'm probably missing some edge case though; e.g. bad Subscriptions should reference the latest InstallPlan.

@ecordell
Copy link
Member

/retest

@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 27, 2020
@njhale
Copy link
Member Author

njhale commented Feb 27, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2020
@njhale
Copy link
Member Author

njhale commented Feb 27, 2020

/retest

@ecordell
Copy link
Member

/lgtm
/retest

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 28, 2020
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu, ecordell, njhale

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-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit ff2e7cd into operator-framework:master Feb 28, 2020
@openshift-ci-robot
Copy link
Collaborator

@njhale: All pull requests linked via external trackers have merged. Bugzilla bug 1784024 has been moved to the MODIFIED state.

In response to this:

Bug 1784024: Use generations to prevent duplicate InstallPlans

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.

@ecordell
Copy link
Member

/cherry-pick release-4.4

@openshift-cherrypick-robot

@ecordell: new pull request created: #1335

In response to this:

/cherry-pick release-4.4

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.

@njhale njhale deleted the installplangen branch March 31, 2020 21:30
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/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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants