-
Notifications
You must be signed in to change notification settings - Fork 65
✨ improve logging: catalog http server, op-con resolver #1564
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
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 #1564 +/- ##
==========================================
- Coverage 67.35% 67.17% -0.18%
==========================================
Files 55 55
Lines 4555 4616 +61
==========================================
+ Hits 3068 3101 +33
- Misses 1261 1288 +27
- Partials 226 227 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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
5ed2b26
to
382d2e6
Compare
/lgtm |
if isFBCEmpty(packageFBC) { | ||
return nil | ||
} |
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.
This early exit did not exist before. Are we worried about a change in behavior?
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.
Before, if len(packageFBC.Bundles)
was 0, we would evaluate/run the predicates against a 0-length slice, which would return a 0-length slice, and then we'd return nil
in line 103 (old) / line 124 (new)
So I don't think there's a behavior change here other than skipping some unnecessary predicate setup.
@@ -158,6 +179,7 @@ func (r *CatalogResolver) Resolve(ctx context.Context, ext *ocv1.ClusterExtensio | |||
|
|||
// Check for ambiguity | |||
if len(resolvedBundles) != 1 { | |||
l.Info("resolution failed", "stats", catStats) |
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.
Do we want this before all error returns from this point forward?
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.
We could. I felt like those other returns include context in the error message that would make it possible to figure out what happened, so that's why I only included it here.
382d2e6
to
67e6a22
Compare
67e6a22
to
718468c
Compare
if fbc == nil { | ||
return true | ||
} | ||
return len(fbc.Packages) == 0 && len(fbc.Channels) == 0 && len(fbc.Bundles) == 0 && len(fbc.Deprecations) == 0 && len(fbc.Others) == 0 |
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.
Hi @joelanford
IHMO IsEmpty should be implemented in DeclarativeConfig itself. However, that is not a blocker for us to move forward here.
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 think it is good enough for us move forward
/lgtm
Signed-off-by: Joe Lanford <[email protected]>
718468c
to
9bcd005
Compare
/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.
LGTM
a19f91a
Description
This adds more logging to help administrators troubleshoot issues resolving bundles from catalogs. Specifically, it:
This should help administrators narrow down which stage of resolution should be investigated when unexpected resolution errors occur.
Reviewer Checklist