-
Notifications
You must be signed in to change notification settings - Fork 247
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(diff): prune empty channel when old model is empty #884
fix(diff): prune empty channel when old model is empty #884
Conversation
Hi @jpower432. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
alpha/declcfg/diff.go
Outdated
@@ -79,6 +79,19 @@ func (g *DiffGenerator) Run(oldModel, newModel model.Model) (model.Model, error) | |||
return nil | |||
} | |||
|
|||
// Prunes empty channels | |||
pruneEmptyChannels := func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is only called once, in-line the code in that spot. Perhaps this could live in Includer.Run() too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this down to where I was calling it. The only reason I didn't put it in Includer.Run()
is because this is only an issue when IncludeAdditively
is false I believe.
Codecov Report
@@ Coverage Diff @@
## master #884 +/- ##
==========================================
- Coverage 52.06% 52.06% -0.01%
==========================================
Files 103 103
Lines 9069 9072 +3
==========================================
+ Hits 4722 4723 +1
- Misses 3440 3441 +1
- Partials 907 908 +1
Continue to review full report at Codecov.
|
0cbc60a
to
2392e55
Compare
2392e55
to
008e304
Compare
Fixes operator-framework#883 Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
008e304
to
fb65ae2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dinhxuanvu, estroz, jpower432 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 |
Description of the change:
In this PR, the
opm alpha diff
command will now prune empty channels when an include config is provided in headsOnly mode.Motivation for the change:
The motivation for this change to allow the catalog index produced in this instance to pass
opm validate
and be usable with a cluster.Reviewer Checklist
/docs
Closes #883