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

[YUNIKORN-2974] Expose preemption and priority settings via REST #995

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wilfred-s
Copy link
Contributor

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?

  • - Improvement

What is the Jira issue?

YUNIKORN-2976

How should this be tested?

new unit tests added

Questions:

  • - It needs documentation.

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.
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.34%. Comparing base (d7d1408) to head (13c751a).
Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

queueInfo.AbsUsedCapacity = resources.CalculateAbsUsedCapacity(sq.maxResource, sq.allocatedResource).DAOMap()
queueInfo.SortingPolicy = sq.sortType.String()
queueInfo.PrioritySorting = sq.prioritySortEnabled
queueInfo.PreemptionEnabled = sq.preemptionPolicy == policies.DisabledPreemptionPolicy
Copy link
Member

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 ?

Copy link
Contributor

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

Copy link
Contributor

@craigcondit craigcondit left a 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.

Copy link
Contributor

@pbacsko pbacsko left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants