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

fix(imageloader): image loader should consider existing channels during add #260

Merged

Conversation

ecordell
Copy link
Member

@ecordell ecordell commented Apr 7, 2020

Description of the change:
This queries the database for existing channels before adding an image and replacing its graph.

Also, #213 moved the image loader to registry and renamed it, but didn't clean up the old image loader. I added the fix to the new location and cleaned up the old location.

Motivation for the change:
This fixes the regression reported in #258

In addition to the tests added in this PR, I also verified manually with the manifests in the report:

$ opm registry add -b quay.io/ecordell/brokenoperator:v1.0.0 -c docker
$ sqlite3 bundles.db "select * from channel;"
beta|test-operator|testoperator.v1.0.0

$ opm registry add -b quay.io/ecordell/brokenoperator:v1.0.0 -c docker
$ sqlite3 bundles.db "select * from channel;"
beta|test-operator|testoperator.v1.0.0
stable|test-operator|testoperator.v1.0.1

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

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

@njhale njhale left a comment

Choose a reason for hiding this comment

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

Thanks! I think this looks good. Let's just get a second set of eyes to verify.

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@ecordell
Copy link
Member Author

ecordell commented Apr 7, 2020

/retest

@kevinrizza
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 7, 2020
@openshift-merge-robot openshift-merge-robot merged commit ce63aa3 into operator-framework:master Apr 7, 2020
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants