Skip to content

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

Merged

Conversation

dinhxuanvu
Copy link
Member

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]

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

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 dinhxuanvu requested a review from benluddy August 20, 2020 21:54
@dinhxuanvu dinhxuanvu changed the title Add skips information to Operator representation Bug 1869441: Add skips information to Operator representation Aug 20, 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 Aug 20, 2020
@openshift-ci-robot
Copy link
Collaborator

@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
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1869441: Add skips information to Operator representation

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 Aug 20, 2020
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.

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

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

Copy link
Member

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

Copy link
Member Author

@dinhxuanvu dinhxuanvu Sep 4, 2020

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.

@ankitathomas
Copy link
Contributor

/retest

@kevinrizza
Copy link
Member

/approve

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

/retest

1 similar comment
@dinhxuanvu
Copy link
Member Author

/retest

Copy link
Member

@gallettilance gallettilance left a comment

Choose a reason for hiding this comment

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

+1000

@openshift-ci-robot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ecordell
Copy link
Member

ecordell commented Sep 9, 2020

/lgtm

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

/retest

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

5 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.

@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 bcbc5d6 into operator-framework:master Sep 10, 2020
@openshift-ci-robot
Copy link
Collaborator

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

Bugzilla bug 1869441 has been moved to the MODIFIED state.

In response to this:

Bug 1869441: Add skips information to Operator representation

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.

9 participants