-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow configurable range of Job priorities #16084
Allow configurable range of Job priorities #16084
Conversation
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.
Hi @alessio-perugini! It looks like you've discovered how gross it is to wire up all the configuration so that it makes its way from the agent to the server, and how it gets merged to the default config. So yes, this looks like it's on the right track!
370e9f7
to
a4602aa
Compare
a4602aa
to
31610d1
Compare
31610d1
to
2999502
Compare
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.
This is looking good, @alessio-perugini!
I've left some comments to address. In addition, if you can run make cl
that'll ask you some questions to generate a changelog file for this PR.
0d47d68
to
1f1b455
Compare
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.
I see you picked up the tests, thanks. I think we're getting close on this one
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! I know reviews for seemingly minor features can end up taking a surprising amount of back and of forth. Thanks for sticking with this, @alessio-perugini!
This will ship in Nomad 1.5.0 GA
@tgross Thank you so much for your patience and help. This was my first time contributing to a project of this scale. I had so much fun working on this. Looking forward to helping you with other issues. |
#15516
Summary
To allow our users to better fine-grain the job priorities, we're expanding the upper limit from
100
toMaxInt16-1
.CoreJobPriority
is hard-coded tomath.MaxInt16
(32767)JobMaxPriority
defaults to 100 and can be configured in the range100 <= JobMaxPriority < math.MaxInt16
.JobDefaultPriority
defaults to 50 and can be configured in the range50 <= JobDefaultPriority < JobMaxPriority
Notes for the reviewer
This quick draft aims to gather feedback to understand if the solution is on the right path. After that, I'll add tests, docs, proper commits names, and the other missing stuff.
Bear with me, this is my first time contributing to the codebase. 🙏 I'm looking forward to your comments. 🤓