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: default priority earlier to ensure constraints are satisfied [CM-553] #10043

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

stoksc
Copy link
Contributor

@stoksc stoksc commented Oct 11, 2024

Ticket

CM-553

Description

If we set priorities earlier during launch, then the constraint checks will apply to the default, too. This prevents jobs getting through when a limit conflicts with a default, which is strange but could be used to effectively force users to submit with a priority.

Test Plan

TBD.

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

@stoksc stoksc requested a review from a team as a code owner October 11, 2024 16:44
@cla-bot cla-bot bot added the cla-signed label Oct 11, 2024
Copy link

netlify bot commented Oct 11, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 5e73489
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/670d22b09c29ea0008e939d7

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 46.15385% with 7 lines in your changes missing coverage. Please review.

Project coverage is 54.61%. Comparing base (2356f91) to head (5e73489).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
master/internal/config/config.go 0.00% 4 Missing ⚠️
master/internal/api_generic_tasks.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10043      +/-   ##
==========================================
- Coverage   54.62%   54.61%   -0.02%     
==========================================
  Files        1260     1260              
  Lines      157621   157631      +10     
  Branches     3632     3631       -1     
==========================================
- Hits        86102    86083      -19     
- Misses      71385    71414      +29     
  Partials      134      134              
Flag Coverage Δ
backend 45.38% <46.15%> (-0.05%) ⬇️
harness 72.74% <ø> (ø)
web 54.37% <ø> (ø)

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

Files with missing lines Coverage Δ
master/internal/api_command.go 48.61% <100.00%> (+0.72%) ⬆️
master/internal/core_experiment.go 62.34% <100.00%> (+0.47%) ⬆️
master/internal/api_generic_tasks.go 8.88% <0.00%> (-0.06%) ⬇️
master/internal/config/config.go 58.63% <0.00%> (-0.20%) ⬇️

... and 9 files with indirect coverage changes

@stoksc stoksc requested a review from kkunapuli October 11, 2024 20:15
@stoksc stoksc changed the title chore: default priority earlier to ensure constraints are satisfied chore: default priority earlier to ensure constraints are satisfied [CM-553] Oct 11, 2024
Copy link
Contributor

@kkunapuli kkunapuli left a comment

Choose a reason for hiding this comment

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

Nice work!

}

// DefaultPriorityForPool returns the default priority for any jobs (user-defined if provided, otherwise our default).
func DefaultPriorityForPool(rpName string) int {
Copy link
Contributor

Choose a reason for hiding this comment

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

Love this helper!

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, awesome work!

@stoksc stoksc merged commit ac82b3c into main Oct 14, 2024
81 of 94 checks passed
@stoksc stoksc deleted the set-default-prio-earlier branch October 14, 2024 20:28
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.

3 participants