-
Notifications
You must be signed in to change notification settings - Fork 60
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
⚠️ allow filtering with a list of channels #1173
⚠️ allow filtering with a list of channels #1173
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1173 +/- ##
==========================================
- Coverage 76.59% 76.49% -0.11%
==========================================
Files 40 40
Lines 2329 2340 +11
==========================================
+ Hits 1784 1790 +6
- Misses 389 393 +4
- Partials 156 157 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
internal/resolve/catalog.go
Outdated
ResolvedBundles []*declcfg.Bundle | ||
} | ||
|
||
func buildResolutionError(rei resolutionErrorInfo) 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.
I tried this once (an error generation function) and there was opposition to it. At that time, it was called in multiple places, this seems to be simply pulling out the code into a function, without any additional callers.
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.
(And of course, this requires changing all the error messages)
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.
I pulled it out into a separate function because the linter was complaining about the nesting depth being too high.
Regarding changing all the error messages, I found it a bit more complex to read the previous error logic in a switch statement and thought it was a bit more readable using this new strings.Builder
approach because it is more linear in nature (i.e as you read each line of the code you see the scenarios that result in new information being added to the error string we return).
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 folks prefer the previous approach, I can revert this change.
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.
I don't care, I just wanted to make the note.
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
New changes are detected. LGTM label has been removed. |
5c0112d
to
c720e73
Compare
c720e73
to
dc90ec5
Compare
dc90ec5
to
7435dac
Compare
Type: ocv1alpha1.TypeChannelDeprecated, | ||
Reason: ocv1alpha1.ReasonDeprecated, | ||
Status: metav1.ConditionTrue, | ||
ObservedGeneration: 1, |
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.
Hmm, I didn't realize this test ignored the message. Follow-up?
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.
Is there a specific reason we should be testing the message?
I understand wanting to verify our message crafting logic is correct, but I lean towards the camp where the message is any arbitrary string and is not part of our API guarantees - testing for it explicitly makes our unit tests brittle
29458cc
to
8369bf5
Compare
Signed-off-by: everettraven <[email protected]>
173064d
to
690c2ce
Compare
c4470cc
Description
Updates the
ClusterExtension.Spec.Channel
field to now beClusterExtension.Spec.Channels
and accept a list of channel names for filtering of bundles during resolutionUpdates resolution logic, unit, and e2e tests as necessary
Resolves Update the
ClusterExtension.Spec.Channel
field to be a list of channels #1150Reviewer Checklist