Skip to content

Conversation

@manirajv06
Copy link
Contributor

What is this PR for?

Calculate Preemptable Resource for the leaf queue.

What type of PR is it?

  • - Feature

Todos

  • - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-3142

How should this be tested?

Screenshots (if appropriate)

Questions:

  • - The licenses files need update.
  • - There is breaking changes for older versions.
  • - It needs documentation.

@manirajv06 manirajv06 self-assigned this Oct 27, 2025
@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.51%. Comparing base (0d896fd) to head (8389ac5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1039   +/-   ##
=======================================
  Coverage   81.50%   81.51%           
=======================================
  Files         102      102           
  Lines       13337    13354   +17     
=======================================
+ Hits        10870    10885   +15     
- Misses       2208     2209    +1     
- Partials      259      260    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pbacsko
Copy link
Contributor

pbacsko commented Oct 30, 2025

Does this depend on #1038 ? I can see overlapping changes here.

@manirajv06
Copy link
Contributor Author

Does this depend on #1038 ? I can see overlapping changes here.

Rebased the changes.

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.

Minor question about "nil" return

maxRes := qcp.queue.CloneMaxResource()
used := resources.SubOnlyExisting(qcp.queue.GetAllocatedResource(), qcp.queue.GetPreemptingResource())
if maxRes.IsEmpty() || used.IsEmpty() {
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: wouldn't it be safer to always return something instead of "nil"? To me, a resources.Zero() seems to be more appropriate.

Comment on lines +75 to +77
if preemptableResource.IsEmpty() {
return nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

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.

2 participants