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: add multirm router layer to rm module #8963

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

carolinaecalderon
Copy link
Contributor

@carolinaecalderon carolinaecalderon commented Mar 6, 2024

Description

Add the multirm module back in (from #8857 ) , but look up the right resource manager from the globally unique resource pool name provided.

Also delete sproto messages that wrap under 3 variables, replace this directly with the variables in the RM interface. This reduces bloat in the repo, as sproto message wrappers are remnants of the actor system.

Test Plan

See multirm_intg_test.go

Commentary (optional)

Since I'm making changes to the signatures of methods in the RM interface, there are a lot of one-line changes in the repo. I recommend looking at the resource_manager_iface.go, and the multirm module.
There's no check if there are multiple same-named resource pools at this level -- that will be the responsibility of the config to check

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-73

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 31.40496% with 83 lines in your changes are missing coverage. Please review.

Project coverage is 47.49%. Comparing base (bf21896) to head (7eaf95b).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8963   +/-   ##
=======================================
  Coverage   47.48%   47.49%           
=======================================
  Files        1168     1167    -1     
  Lines      176302   176298    -4     
  Branches     2353     2354    +1     
=======================================
+ Hits        83717    83730   +13     
+ Misses      92427    92410   -17     
  Partials      158      158           
Flag Coverage Δ
backend 42.51% <31.40%> (+0.03%) ⬆️
harness 64.01% <ø> (ø)
web 42.86% <ø> (ø)

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

Files Coverage Δ
master/internal/api_tasks.go 47.83% <100.00%> (ø)
master/internal/config/resource_config.go 94.64% <ø> (ø)
master/internal/config/resource_manager_config.go 71.59% <ø> (ø)
master/internal/experiment.go 26.70% <100.00%> (ø)
master/internal/rm/agentrm/agents.go 63.30% <ø> (ø)
master/internal/rm/agentrm/resource_pool.go 34.13% <ø> (-0.15%) ⬇️
master/internal/rm/kubernetesrm/pods.go 19.07% <ø> (ø)
master/internal/rm/kubernetesrm/resource_pool.go 5.40% <ø> (+0.01%) ⬆️
master/internal/spec_util.go 56.32% <100.00%> (ø)
master/internal/sproto/jobs.go 17.39% <ø> (ø)
... and 13 more

... and 2 files with indirect coverage changes

@carolinaecalderon carolinaecalderon force-pushed the carolinac/add-multirm-router-layer branch 3 times, most recently from afbb0c5 to 9aaec35 Compare March 6, 2024 18:48
@carolinaecalderon carolinaecalderon marked this pull request as ready for review March 6, 2024 18:55
@carolinaecalderon carolinaecalderon requested review from a team as code owners March 6, 2024 18:55
@carolinaecalderon carolinaecalderon requested review from kkunapuli, stoksc and NicholasBlaskey and removed request for a team March 6, 2024 18:55
@@ -39,14 +37,14 @@ type ResourceManager interface {
) (model.TaskContainerDefaultsConfig, error)

// Job queue
GetJobQ(sproto.GetJobQ) (map[model.JobID]*sproto.RMJobInfo, error)
GetJobQ(string) (map[model.JobID]*sproto.RMJobInfo, error)
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd like for us to type resource pools at some point

Copy link
Contributor

Choose a reason for hiding this comment

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

(type ResourcePoolName string)

Copy link
Contributor

@stoksc stoksc left a comment

Choose a reason for hiding this comment

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

lgtm

func ErrRPNotDefined(rp string) error {
return fmt.Errorf("could not find resource pool %s", rp)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

i'm trusting this is unchanged since it was last landed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to change the signatures to not take in a RM name, and similarly, in getRM, I removed references to RM name

@carolinaecalderon carolinaecalderon force-pushed the carolinac/add-multirm-router-layer branch from 9aaec35 to 6d00842 Compare March 7, 2024 14:33
Base automatically changed from carolinac/revert-rm-changes to main March 7, 2024 15:35
@carolinaecalderon carolinaecalderon requested a review from a team as a code owner March 7, 2024 15:35
@carolinaecalderon carolinaecalderon force-pushed the carolinac/add-multirm-router-layer branch from 6d00842 to 570f9e1 Compare March 7, 2024 15:45
Copy link

netlify bot commented Mar 7, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 7eaf95b
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/65ea1e6d2f5b020008ab6836

@carolinaecalderon carolinaecalderon merged commit ca29879 into main Mar 7, 2024
97 of 98 checks passed
@carolinaecalderon carolinaecalderon deleted the carolinac/add-multirm-router-layer branch March 7, 2024 23:16
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