Skip to content

scheduler: Add hook plugins logic in ReplaceQuotas and OnQuotaUpdate methods of ElasticQuota plugin.#2465

Merged
koordinator-bot[bot] merged 3 commits intokoordinator-sh:mainfrom
TaoYang526:correct-hook-in-quota-handler
Jun 5, 2025
Merged

scheduler: Add hook plugins logic in ReplaceQuotas and OnQuotaUpdate methods of ElasticQuota plugin.#2465
koordinator-bot[bot] merged 3 commits intokoordinator-sh:mainfrom
TaoYang526:correct-hook-in-quota-handler

Conversation

@TaoYang526
Copy link
Contributor

Ⅰ. Describe what this PR does

There are 2 locations in quota_handler.go that need to be made compatible with hook plugins:

  1. OnQuotaUpdate method: Add a GroupQuotaManager#IsQuotaUpdated call to determine whether the quota has been updated for hook plugins.
  2. ReplaceQuotas method: Add a GroupQuotaManager#ResetQuotasForHookPlugins call to reset quotas during the initial phase for hook plugins.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

…methods of ElasticQuota plugin.

Signed-off-by: Tao Yang <taoyang@apache.org>
Signed-off-by: Tao Yang <taoyang@apache.org>
@codecov
Copy link

codecov bot commented Jun 4, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 65.95%. Comparing base (73fa323) to head (73013d0).
Report is 43 commits behind head on main.

Files with missing lines Patch % Lines
...scheduler/plugins/elasticquota/core/hook_plugin.go 83.33% 2 Missing and 1 partial ⚠️
...kg/scheduler/plugins/elasticquota/quota_handler.go 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2465      +/-   ##
==========================================
+ Coverage   65.93%   65.95%   +0.02%     
==========================================
  Files         477      477              
  Lines       56194    56214      +20     
==========================================
+ Hits        37049    37078      +29     
+ Misses      16461    16452       -9     
  Partials     2684     2684              
Flag Coverage Δ
unittests 65.95% <83.33%> (+0.02%) ⬆️

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

☔ 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.

Signed-off-by: Tao Yang <taoyang@apache.org>
@TaoYang526
Copy link
Contributor Author

@shaloulcy @saintube Please help to review this PR, Thanks.

Copy link
Member

@saintube saintube left a comment

Choose a reason for hiding this comment

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

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: saintube

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@koordinator-bot koordinator-bot bot merged commit c56107d into koordinator-sh:main Jun 5, 2025
22 checks passed
@ZiMengSheng ZiMengSheng added this to the v1.7 milestone Jul 14, 2025
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