karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.14k stars 812 forks source link

Use webhook to set associated labels and annotations of work #4882

Closed whitewindmills closed 1 week ago

whitewindmills commented 2 weeks ago

What type of PR is this? /kind cleanup

What this PR does / why we need it: This PR mainly migrates the adding action of work-related labels and annotations to webhook. Let's focus on these labels and annotations in the work mutating, which make it easier to maintain.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE
codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 53.15%. Comparing base (5e1191f) to head (a5d8ba7). Report is 33 commits behind head on master.

Files Patch % Lines
...controllers/unifiedauth/unified_auth_controller.go 0.00% 2 Missing :warning:
pkg/util/helper/work.go 0.00% 2 Missing :warning:
pkg/controllers/binding/common.go 50.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4882 +/- ## ========================================== + Coverage 53.13% 53.15% +0.01% ========================================== Files 251 251 Lines 20417 20400 -17 ========================================== - Hits 10848 10843 -5 + Misses 8855 8844 -11 + Partials 714 713 -1 ``` | [Flag](https://app.codecov.io/gh/karmada-io/karmada/pull/4882/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/karmada-io/karmada/pull/4882/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | `53.15% <16.66%> (+0.01%)` | :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=karmada-io#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.

whitewindmills commented 2 weeks ago

@XiShanYongYe-Chang @RainbowMango please help review it.

XiShanYongYe-Chang commented 2 weeks ago

Thanks~ /assign

XiShanYongYe-Chang commented 1 week ago

/lgtm /cc @RainbowMango @chaunceyjiang

chaunceyjiang commented 1 week ago

/assign

RainbowMango commented 1 week ago

/assign

karmada-bot commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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: - ~~[OWNERS](https://github.com/karmada-io/karmada/blob/master/OWNERS)~~ [RainbowMango] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment