Skip to content
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

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

carolinaecalderon
Copy link
Contributor

@carolinaecalderon carolinaecalderon commented Sep 19, 2024

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

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@cla-bot cla-bot bot added the cla-signed label Sep 19, 2024
@carolinaecalderon carolinaecalderon marked this pull request as ready for review September 19, 2024 16:01
@carolinaecalderon carolinaecalderon requested a review from a team as a code owner September 19, 2024 16:01
Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 22bcf82
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66eda6dcd4fcb30008ef62ad
😎 Deploy Preview https://deploy-preview-9960--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.71%. Comparing base (95f079d) to head (22bcf82).
Report is 10 commits behind head on main.

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     
Flag Coverage Δ
backend 45.17% <100.00%> (-0.01%) ⬇️
harness 72.74% <ø> (ø)
web ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
master/internal/rm/agentrm/summaries.go 96.00% <100.00%> (-4.00%) ⬇️

... and 417 files with indirect coverage changes

// 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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if len(deviceTypeCount) < 1 {
if len(deviceTypeCount) > 1 {

Should it be this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops yes, good catch

Copy link
Contributor

@amandavialva01 amandavialva01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@carolinaecalderon carolinaecalderon merged commit baf451f into main Sep 20, 2024
82 of 94 checks passed
@carolinaecalderon carolinaecalderon deleted the carolinac/edit-log-message branch September 20, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants