fix(load): shouldn't clear bundle/csv field from non-default heads #265
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
/docs