karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Suppress ApplyPolicyFailed events for AlreadyExists conflicts

Open asmit27rai opened this issue 7 months ago • 4 comments

What this PR does / why we need it

When applying cluster policies, Karmada generates ApplyPolicyFailed warning events for transient "AlreadyExists" conflicts during Work creation. This PR suppresses these warnings to reduce alert noise.

Which issue this PR fixes

Fixes #6267

Special notes for your reviewer

  • Change: Added error handling in ensureWork to skip AlreadyExists errors during Work creation/update.
  • Impact: "Already exists" conflicts no longer trigger Warning events.

asmit27rai avatar May 06 '25 14:05 asmit27rai

Welcome @asmit27rai! It looks like this is your first PR to karmada-io/karmada 🎉

karmada-bot avatar May 06 '25 14:05 karmada-bot

@grosser Pls Review This PR

asmit27rai avatar May 06 '25 14:05 asmit27rai

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

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

Project coverage is 49.33%. Comparing base (c5b2d3c) to head (4f5e865). Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controllers/binding/common.go 0.00% 5 Missing :warning:

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6349      +/-   ##
==========================================
- Coverage   49.34%   49.33%   -0.02%     
==========================================
  Files         678      678              
  Lines       55050    55053       +3     
==========================================
- Hits        27167    27159       -8     
- Misses      26115    26125      +10     
- Partials     1768     1769       +1     
Flag Coverage Δ
unittests 49.33% <0.00%> (-0.02%) :arrow_down:

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

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

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

codecov-commenter avatar May 06 '25 14:05 codecov-commenter

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: grosser Once this PR has been reviewed and has the lgtm label, please assign whitewindmills for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

karmada-bot avatar May 06 '25 15:05 karmada-bot