-
Notifications
You must be signed in to change notification settings - Fork 552
Bug 1869441: Add skips information to Operator representation #1735
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 1869441: Add skips information to Operator representation #1735
Conversation
Operator object contains only `replaces` but not `skips` information which leads to an incomplete picture of upgrade graph. Now, the `skips` information is added to ensure we take skipped versions into the account for upgrade graph calculation. Signed-off-by: Vu Dinh <[email protected]>
@dinhxuanvu: This pull request references Bugzilla bug 1869441, 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. |
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.
A unit test case definitely needs to be added for the scenario from the bug.
My understanding from talking to Kevin was that a skipped bundle should not be installed. Is there a separate bug tracking that? As it stands, a skipped bundle can be installed if conflicts exist for the bundle that skips it.
replaces[b] = r | ||
for _, skip := range b.skips { | ||
if r, ok := bundleLookup[skip]; ok { | ||
replacedBy[r] = b |
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.
Should replacedBy
be isReplaced map[*Operator]bool
? The value doesn't seem to be used, and there are a few scenarios here that could produce random results:
- B skips A, and C replaces A
- multiple bundles skip A
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.
in other places that we have skips (i.e. the graphloader), this becomes an array.
replaces[*Operator][]*Operator
so replaces[name][0]
is replaces
and replaces[name][1..]
is skips
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.
We use replacedBy
to just keep a record of which versions are replaced by either replaces
or skips
. This map is used to determine the head of the channel so the key is used, not the value. There should be a version that doesn't get replaced anything and that is the head.
The replaces[]
is used to determine the order which we consider the versions that are replaced, not skipped because if they are skipped, they aren't eligible for installation. Hence I don't add skipped versions to replaces[]
. I added the skipped[]
to simply an insurance that will filter some stray skipped versions.
Signed-off-by: Vu Dinh <[email protected]>
/retest |
/approve |
/retest |
1 similar comment
/retest |
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.
+1000
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dinhxuanvu, gallettilance, 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 |
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
5 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. |
@dinhxuanvu: All pull requests linked via external trackers have merged: Bugzilla bug 1869441 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. |
Operator object contains only
replaces
but notskips
informationwhich leads to an incomplete picture of upgrade graph. Now, the
skips
information is added to ensure we take skipped versionsinto the account for upgrade graph calculation.
Signed-off-by: Vu Dinh [email protected]
Description of the change:
Motivation for the change:
Reviewer Checklist
/docs