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

fix: job queue panic for multirm [RM-123] #9079

Merged
merged 6 commits into from
Apr 3, 2024
Merged

Conversation

carolinaecalderon
Copy link
Contributor

@carolinaecalderon carolinaecalderon commented Apr 1, 2024

Description

Fix index bug in GetJobQueueStatsRequest by executing the proper RM call in a fanout call.

Also, add os.Run() to the multirm test file -- so now the tests run! Change the mock RM return values from mock.Anything to the relevant complex type.

Test Plan

Without the changes to the GetJobQueueStatsRequest, its test should fail the empty_request case as follows:

--- FAIL: TestGetJobQueueStatsRequest (0.00s)
    --- FAIL: TestGetJobQueueStatsRequest/empty_request (0.00s)
panic: runtime error: index out of range [0] with length 0 [recovered]
	panic: runtime error: index out of range [0] with length 0

With these changes, all should pass!

Commentary (optional)

Checklist

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

Ticket

RM-123

@cla-bot cla-bot bot added the cla-signed label Apr 1, 2024
Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit e1c0d9b
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/660d7cf2c309aa0008a7f6b2
😎 Deploy Preview https://deploy-preview-9079--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 Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.09%. Comparing base (f78b9aa) to head (e1c0d9b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9079      +/-   ##
==========================================
+ Coverage   47.07%   47.09%   +0.02%     
==========================================
  Files        1155     1156       +1     
  Lines      142400   142580     +180     
  Branches     2421     2421              
==========================================
+ Hits        67034    67153     +119     
- Misses      75176    75237      +61     
  Partials      190      190              
Flag Coverage Δ
backend 43.04% <100.00%> (+0.09%) ⬆️
harness 64.07% <ø> (ø)
web 38.95% <ø> (ø)

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

Files Coverage Δ
master/internal/rm/multirm/multirm.go 83.33% <100.00%> (ø)

... and 5 files with indirect coverage changes

@carolinaecalderon carolinaecalderon changed the title bug: job queue panic for multirm bug: job queue panic for multirm [RM-123] Apr 1, 2024
@carolinaecalderon carolinaecalderon changed the title bug: job queue panic for multirm [RM-123] fix: job queue panic for multirm [RM-123] Apr 1, 2024
@carolinaecalderon carolinaecalderon marked this pull request as ready for review April 1, 2024 17:50
@carolinaecalderon carolinaecalderon requested a review from a team as a code owner April 1, 2024 17:50
Copy link
Contributor

@NicholasBlaskey NicholasBlaskey left a comment

Choose a reason for hiding this comment

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

one blocking comment

master/internal/rm/multirm/multirm.go Outdated Show resolved Hide resolved
master/internal/rm/multirm/multirm.go Outdated Show resolved Hide resolved
master/internal/rm/multirm/multirm.go Outdated Show resolved Hide resolved
@carolinaecalderon carolinaecalderon merged commit 3688c3f into main Apr 3, 2024
69 of 81 checks passed
@carolinaecalderon carolinaecalderon deleted the carolinac/rm-123 branch April 3, 2024 16:55
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