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(load): shouldn't clear bundle/csv field from non-default heads #265

Merged

Conversation

ecordell
Copy link
Member

@ecordell ecordell commented Apr 9, 2020

Description of the change:
Updated the method that clears out unneeded metadata to avoid clearing any channel heads.

Also added a test case that would fail before this change, and helpers for enforcing invariants in our tests (started with two: all channel heads should have csv/bundle fields, and if an operator does not have a bundlepath, it must have a csv/bundle field).

Fixes #261

Motivation for the change:
Previously, this would clear out the csv/bundle field of all non-default channel heads (in addition to interior nodes). But non-default channel heads are used by OLM to display differences between channels to users, so we should retain that metadata.

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

previously, adding a bundle cleared out all non-default channel head
contents.
@openshift-ci-robot
Copy link

[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 /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 Apr 9, 2020
@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 9, 2020
@openshift-merge-robot openshift-merge-robot merged commit a6b3b40 into operator-framework:master Apr 9, 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.

opm 1.8.0: Adding a new channel incorrectly deletes csv and bundle json from other channels
4 participants