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

webhook: revise elasticquota mutating when validating disabled #2135

Merged

Conversation

saintube
Copy link
Member

@saintube saintube commented Jul 16, 2024

Ⅰ. Describe what this PR does

In the current version of the koord-manager, the event handler of the elastic quota reconciling the quota topology cache is only instantiated by the elastic quota validating handler. It means the handler cannot work well when we enable the quota mutating but disable quota validating since the topology cache is invalid.
To fix this issue, we also try instantiating the event handler of the elastic quota in the quota mutating handler when it has not been instantiated.

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

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 10.52632% with 34 lines in your changes missing coverage. Please review.

Project coverage is 67.86%. Comparing base (290ae09) to head (81c38fb).
Report is 1 commits behind head on main.

Files Patch % Lines
...k/elasticquota/plugin_check_quota_meta_validate.go 0.00% 18 Missing ⚠️
.../webhook/elasticquota/mutating/mutating_handler.go 0.00% 9 Missing ⚠️
pkg/webhook/elasticquota/mutating/webhooks.go 0.00% 5 Missing ⚠️
...hook/elasticquota/validating/validating_handler.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2135      +/-   ##
==========================================
- Coverage   67.91%   67.86%   -0.05%     
==========================================
  Files         441      441              
  Lines       41547    41569      +22     
==========================================
- Hits        28215    28212       -3     
- Misses      10902    10927      +25     
  Partials     2430     2430              
Flag Coverage Δ
unittests 67.86% <10.52%> (-0.05%) ⬇️

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.

@saintube saintube force-pushed the webhook-revise-quota-mutate branch from 3b8e691 to 81c38fb Compare July 17, 2024 01:50
@ZiMengSheng
Copy link
Contributor

/lgtm

@shaloulcy
Copy link
Contributor

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes

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

The pull request process is described here

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 4a182a1 into koordinator-sh:main Jul 22, 2024
22 checks passed
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.

4 participants