-
Notifications
You must be signed in to change notification settings - Fork 234
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
[YUNIKORN-2974] Expose preemption and priority settings via REST #995
base: master
Are you sure you want to change the base?
Conversation
Add preemption and priority details to the queue REST information. Currently the configuration is exposed via the properties. The properties contain the raw configuration values which need to be interpreted. Invalid configuration values are ignored and not set on the queue. This could cause an incorrect view of what is or should be active on the queue if based on the properties. Using the active values from the object to show the real state. Expose Partition level preemption flag as part of this change to complement the queue details.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #995 +/- ##
==========================================
+ Coverage 81.33% 81.34% +0.01%
==========================================
Files 97 97
Lines 15587 15597 +10
==========================================
+ Hits 12678 12688 +10
Misses 2630 2630
Partials 279 279 ☔ View full report in Codecov by Sentry. |
queueInfo.AbsUsedCapacity = resources.CalculateAbsUsedCapacity(sq.maxResource, sq.allocatedResource).DAOMap() | ||
queueInfo.SortingPolicy = sq.sortType.String() | ||
queueInfo.PrioritySorting = sq.prioritySortEnabled | ||
queueInfo.PreemptionEnabled = sq.preemptionPolicy == policies.DisabledPreemptionPolicy |
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 am a bit misleading here, does PreemptionEnabled = true
means the preemptionPolicy is disabled ?
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 believe this should be sq.preemptionPolicy != policies.DisabledPreemptionPolicy
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.
Looks good except for inverted logic on PreemptionEnabled.
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 after the "preemptionEnabled" change
What is this PR for?
Add preemption and priority details to the queue REST information. Currently the configuration is exposed via the properties. The properties contain the raw configuration values which need to be interpreted.
Invalid configuration values are ignored and not set on the queue. This could cause an incorrect view of what is or should be active on the queue if based on the properties. Using the active values from the object to show the real state.
Expose Partition level preemption flag as part of this change to complement the queue details.
What type of PR is it?
What is the Jira issue?
YUNIKORN-2976
How should this be tested?
new unit tests added
Questions: