-
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(opm): clarify that bundle declcfgs are not valid refs alone #741
fix(opm): clarify that bundle declcfgs are not valid refs alone #741
Conversation
Codecov Report
@@ Coverage Diff @@
## master #741 +/- ##
==========================================
- Coverage 50.30% 50.16% -0.14%
==========================================
Files 100 100
Lines 8578 8535 -43
==========================================
- Hits 4315 4282 -33
+ Misses 3430 3425 -5
+ Partials 833 828 -5
Continue to review full report at Codecov.
|
4294723
to
12b95b9
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.
/lgtm
internal/action/diff.go
Outdated
oldCfg, err := oldRender.Run(ctx) | ||
if err != nil { | ||
if isNotAllowedError(err) { |
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.
Can you add unit tests to cover both old and new refs being bundles?
/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.
Nice work @estroz, a few nits.
func (_ *ErrNotAllowed) Error() string { | ||
return "not allowed" | ||
} | ||
var ErrNotAllowed = errors.New("not allowed") |
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.
+1
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
9e39fa9
to
2b54bd4
Compare
….Is() comparison Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
2b54bd4
to
f20d176
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ankitathomas, dinhxuanvu, estroz 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 |
/lgtm |
Description of the change: clarify that bundle declcfgs are not valid refs alone, and require an
olm.package
declcfg. An error is returned if a bundle is directly specified.Motivation for the change: diff is really intended for indices. There's no way to infer which channel is the default for a package if more than one bundle in the same package is passed to diff either, so we could get non-deterministic behavior unless diff imposes some ordering on channels. Assuming icon doesn't exist (or other future
olm.package
fields) for a package may cause issues when using the diff'ed catalog in-cluster too.Reviewer Checklist
/docs