kubewharf / katalyst-core

Katalyst aims to provide a universal solution to help improve resource utilization and optimize the overall costs in the cloud. This is the core components in Katalyst system, including multiple agents and centralized components
Apache License 2.0
389 stars 91 forks source link

refactor(metaserver): refactor notify init in metaserver #596

Open itonyli opened 1 month ago

itonyli commented 1 month ago

What type of PR is this?

Refactor

What this PR does / why we need it:

Simplify Notify registration for different metrics through the closure method.

Which issue(s) this PR fixes:

Special notes for your reviewer:

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 56.20%. Comparing base (5e1814b) to head (0e00bfe). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #596 +/- ## ========================================== + Coverage 56.14% 56.20% +0.05% ========================================== Files 535 535 Lines 49865 49821 -44 ========================================== + Hits 27997 28000 +3 + Misses 18307 18278 -29 + Partials 3561 3543 -18 ``` | [Flag](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/596/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | Coverage Δ | | |---|---|---| | [unittest](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/596/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | `56.20% <100.00%> (+0.05%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.