Skip to content

[release-4.7] Bug 1932002: Only one of multiple subscriptions to the same package is honored #2009

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

Conversation

openshift-cherrypick-robot

This is an automated cherry-pick of #2005

/assign ecordell

benluddy and others added 4 commits February 15, 2021 22:16
During dependency resolution, invariants are enforced for
one-operator-per-package and one-provider-per-api. Their user-facing
string representation (shown when they prevent resolution from
succeeding) had re-used the same representation as constraints on
Subscriptions out of convenience.

Recently, the messaging of Subscription-related constraints was
changed to be more descriptive which inadvertently made the invariant
messaging misleading. This patch improves constraint messaging for all
dependency relationships except bundle dependencies.

Signed-off-by: Ben Luddy <bluddy@redhat.com>
there are no longer two resolvers, so having a separate shared set of
test cases doesn't make sense (and means the resolver tests look
different from all of the other unit tests)

Signed-off-by: Evan <cordell.evan@gmail.com>
without this, some of the invariant checking
was being missed by the unit tests

Signed-off-by: Evan <cordell.evan@gmail.com>
this better aligns the on-cluster status with the output of the resolver

we may want to prevent this case from happening at a higher layer (i.e.
a webhook that prevents two subscriptions to the same package), but
for now this behavior ensures that the actions the resolver takes are
clearly visible in the subscription status.

this also adds test cases for multiple subscriptions to the same package

Signed-off-by: Evan <cordell.evan@gmail.com>
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.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2021
@dinhxuanvu dinhxuanvu changed the title [release-4.7] Add meaningful string representations for resolution invariants [release-4.7] Bug 1929904: Add meaningful string representations for resolution invariants Feb 17, 2021
@openshift-ci-robot
Copy link
Collaborator

@openshift-cherrypick-robot: This pull request references Bugzilla bug 1929904, 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.

6 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)
  • dependent bug Bugzilla bug 1921953 is in the state MODIFIED, which is one of the valid states (MODIFIED, VERIFIED)
  • dependent Bugzilla bug 1921953 targets the "4.8.0" release, which is one of the valid target releases: 4.8.0
  • bug has dependents

In response to this:

[release-4.7] Bug 1929904: Add meaningful string representations for resolution invariants

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 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. labels Feb 17, 2021
@dinhxuanvu
Copy link
Member

/bugzilla refresh

@openshift-ci-robot
Copy link
Collaborator

@dinhxuanvu: This pull request references Bugzilla bug 1929904, which is valid.

6 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 POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1921953 is in the state MODIFIED, which is one of the valid states (MODIFIED, VERIFIED)
  • dependent Bugzilla bug 1921953 targets the "4.8.0" release, which is one of the valid target releases: 4.8.0
  • bug has dependents

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.

@benluddy benluddy changed the title [release-4.7] Bug 1929904: Add meaningful string representations for resolution invariants [release-4.7] Add meaningful string representations for resolution invariants Feb 22, 2021
@openshift-ci-robot openshift-ci-robot removed the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Feb 22, 2021
@openshift-ci-robot
Copy link
Collaborator

@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

[release-4.7] Add meaningful string representations for resolution invariants

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 removed the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Feb 22, 2021
@benluddy benluddy changed the title [release-4.7] Add meaningful string representations for resolution invariants [release-4.7] Bug 1932002: Add meaningful string representations for resolution invariants Feb 23, 2021
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Feb 23, 2021
@openshift-ci-robot
Copy link
Collaborator

@openshift-cherrypick-robot: This pull request references Bugzilla bug 1932002, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "4.7.z" 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:

[release-4.7] Bug 1932002: Add meaningful string representations for resolution invariants

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/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Feb 23, 2021
@benluddy
Copy link
Contributor

/cherry-pick release-4.6

@openshift-cherrypick-robot
Copy link
Author

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

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

@openshift-ci-robot
Copy link
Collaborator

@openshift-bot: This pull request references Bugzilla bug 1932002, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "4.7.z" instead
  • expected dependent Bugzilla bug 1932001 to be in one of the following states: MODIFIED, VERIFIED, but it is ON_QA 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:

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

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

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

@openshift-ci-robot
Copy link
Collaborator

@openshift-bot: This pull request references Bugzilla bug 1932002, which is valid. The bug has been moved to the POST state.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.z) matches configured target release for branch (4.7.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1932001 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA))
  • dependent Bugzilla bug 1932001 targets the "4.8.0" release, which is one of the valid target releases: 4.8.0
  • bug has dependents

In response to this:

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

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 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 25, 2021
@benluddy benluddy changed the title [release-4.7] Bug 1932002: Add meaningful string representations for resolution invariants [release-4.7] Bug 1932002: Only one of multiple subscriptions to the same package is honored Feb 25, 2021
@benluddy
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy, dinhxuanvu, openshift-cherrypick-robot

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 Feb 25, 2021
@benluddy
Copy link
Contributor

benluddy commented Mar 1, 2021

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. and removed bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. labels Mar 1, 2021
@openshift-ci-robot
Copy link
Collaborator

@benluddy: This pull request references Bugzilla bug 1932002, which is valid.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.z) matches configured target release for branch (4.7.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1932001 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA))
  • dependent Bugzilla bug 1932001 targets the "4.8.0" release, which is one of the valid target releases: 4.8.0
  • bug has dependents

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.

@mrunalp mrunalp added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Mar 2, 2021
@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.

@openshift-merge-robot openshift-merge-robot merged commit 45ee0b4 into operator-framework:release-4.7 Mar 3, 2021
@openshift-ci-robot
Copy link
Collaborator

@openshift-cherrypick-robot: All pull requests linked via external trackers have merged:

Bugzilla bug 1932002 has been moved to the MODIFIED state.

In response to this:

[release-4.7] Bug 1932002: Only one of multiple subscriptions to the same package is honored

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

@benluddy: #2009 failed to apply on top of branch "release-4.6":

Applying: Add meaningful string representations for resolution invariants.
Using index info to reconstruct a base tree...
M	pkg/controller/registry/resolver/installabletypes.go
M	pkg/controller/registry/resolver/resolver.go
M	pkg/controller/registry/resolver/resolver_test.go
M	pkg/controller/registry/resolver/step_resolver_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/registry/resolver/step_resolver_test.go
CONFLICT (content): Merge conflict in pkg/controller/registry/resolver/step_resolver_test.go
Auto-merging pkg/controller/registry/resolver/resolver_test.go
Auto-merging pkg/controller/registry/resolver/resolver.go
Auto-merging pkg/controller/registry/resolver/installabletypes.go
CONFLICT (content): Merge conflict in pkg/controller/registry/resolver/installabletypes.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Add meaningful string representations for resolution invariants.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants