-
Notifications
You must be signed in to change notification settings - Fork 359
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
chore: do not log error for resource pools with zero agents #9960
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9960 +/- ##
==========================================
+ Coverage 54.51% 54.71% +0.20%
==========================================
Files 1252 835 -417
Lines 156703 82633 -74070
Branches 3600 0 -3600
==========================================
- Hits 85421 45216 -40205
+ Misses 71149 37417 -33732
+ Partials 133 0 -133
Flags with carried forward coverage won't be shown. Click here to find out more.
|
// We raise an error in the logs. | ||
if len(deviceTypeCount) != 1 { | ||
// We raise an error in the logs if there is more than one slot type. | ||
if len(deviceTypeCount) < 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.
if len(deviceTypeCount) < 1 { | |
if len(deviceTypeCount) > 1 { |
Should it be this?
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.
oops yes, good catch
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!
Ticket
Description
Just fix the log to only print when there a multiple slot types assigned to one pool, ignore in the zero case. This avoids cases where pools don't have any agents assigned and the logs are spammed with this error message.
Test Plan
N/A
Checklist
docs/release-notes/
See Release Note for details.