-
Notifications
You must be signed in to change notification settings - Fork 562
[release-4.5] Bug 1862407: fix(resolver): be smarter about the way downgrades are attempted #1689
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
[release-4.5] Bug 1862407: fix(resolver): be smarter about the way downgrades are attempted #1689
Conversation
@@ -153,7 +162,65 @@ func (e *NamespaceGenerationEvolver) queryForRequiredAPIs() error { | |||
return nil | |||
} | |||
|
|||
func (e *NamespaceGenerationEvolver) downgradeUpdates() error { | |||
// no need to attempt downgrades | |||
if len(e.gen.MissingAPIs()) == 0 { |
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.
Super nit: the caller for this function might be more obvious if this check happened outside the method itself.
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 is just keeping in line with the rest of the object, which has a series of methods which may or may not affect the generation - adding the check in Evolve
would make it read weirdly, IMO
6c7f615
to
d565dce
Compare
@ecordell: This pull request references Bugzilla bug 1861690, 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
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. |
This PR failed tests for 1 times with 1 individual failed tests and 4 skipped tests. A test is considered flaky if failed on multiple commits. totaltestcount: 1
|
The PR looks good to me. Plus, I tested it against OCS and it works. |
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.
/hold
Noticed a bug from refactoring - will fix in the morning
/hold cancel |
/retest |
/hold |
/hold cancel |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
@ecordell: This pull request references Bugzilla bug 1861690, which is invalid:
Comment 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. |
"downgrade" here refers to downgrading potential updates back to what has already been installed. this fixes issues where OLM would otherwise not have been able to determine a safe set of operators to update to - the case where, after tentative updates to the current generation, there are required apis missing from the set. the previous algorithm solves this by downgrading the updates that require the missing apis, which has the potential to downgrade back to the initial set of operators. in the case where the api was provided by some operator in the previous generation, it would be possible to not downgrade all requirers, but rather downgrade the operator that previously provided the api. this commit implements an exhaustive search of potential downgrades for a generation, and uses one without missing required apis if one is found if none is found, the old behavior takes place, and the set may still contract back to what is currently installed. the new resolver avoids this issue entirely, so to avoid complicating the implementation a limit of 64 updated operators per generation has been added. the implementation uses a bitmask to select either the old or new operator from the set. finding all possible combinations of old/new versions is then a simple integer count from 0 to the max.
d565dce
to
a58a338
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ecordell 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 |
@ecordell: This pull request references Bugzilla bug 1862407, which is invalid:
Comment 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. |
/bugzilla refresh (retargeted this to 4.5 since the new resolver doesn't have this issue) |
@ecordell: This pull request references Bugzilla bug 1862407, which is invalid:
Comment 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. |
/retest |
/bugzilla refresh |
@ecordell: This pull request references Bugzilla bug 1862407, which is invalid:
Comment 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. |
Overrode bugzilla/valid-bug after reviewing the upstream bug, QE seems convinced that the implementation is not relevant to 4.6. This needs a fresh lgtm though. |
/retest |
/lgtm |
@ecordell: All pull requests linked via external trackers have merged: . Bugzilla bug 1862407 has been moved to the MODIFIED state. 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. |
"downgrade" here refers to downgrading potential updates back to what
has already been installed.
this fixes issues where OLM would otherwise not have been able to
determine a safe set of operators to update to - the case where, after
tentative updates to the current generation, there are required apis
missing from the set.
the previous algorithm solves this by downgrading the updates that
require the missing apis, which has the potential to downgrade back
to the initial set of operators.
in the case where the api was provided by some operator in the previous
generation, it would be possible to not downgrade all requirers, but
rather downgrade the operator that previously provided the api.
this commit implements an exhaustive search of potential downgrades for
a generation, and uses one without missing required apis if one is found
if none is found, the old behavior takes place, and the set may still
contract back to what is currently installed.
the new resolver avoids this issue entirely, so to avoid complicating
the implementation a limit of 64 updated operators per generation has
been added.
the implementation uses a bitmask to select either the old or new
operator from the set. finding all possible combinations of old/new
versions is then a simple integer count from 0 to the max.
Reviewer Checklist
/docs