karmada icon indicating copy to clipboard operation
karmada copied to clipboard

fix: ensure APIEnablement plugin never deletes scheduled resources

Open abhinav-1305 opened this issue 6 months ago • 12 comments

What type of PR is this?

/kind bug

What this PR does / why we need it:

Modifies the APIEnablement plugin to never delete scheduled resources, even if their API (CRD) is temporarily unavailable. This prevents resource deletion when users accidentally delete and reinstall CRDs in member clusters.

Which issue(s) this PR fixes: Fixes #6461

Special notes for your reviewer: NA

Does this PR introduce a user-facing change?:

NONE

abhinav-1305 avatar Jun 16 '25 13:06 abhinav-1305

Hi @kevin-wangzefeng - messed up the PR a bit ;/ , could use your help with the DCO sign-off. Let me know if it all looks good overall. Thanks!

abhinav-1305 avatar Jun 16 '25 13:06 abhinav-1305

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

Codecov Report

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

Project coverage is 45.60%. Comparing base (a8cafd0) to head (f86aca8). Report is 8 commits behind head on master.

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6462   +/-   ##
=======================================
  Coverage   45.59%   45.60%           
=======================================
  Files         687      687           
  Lines       56115    56125   +10     
=======================================
+ Hits        25587    25595    +8     
- Misses      28932    28935    +3     
+ Partials     1596     1595    -1     
Flag Coverage Δ
unittests 45.60% <100.00%> (+<0.01%) :arrow_up:

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 Jun 16 '25 13:06 codecov-commenter

Hi @abhinav-1305, thanks for your contribution.

The behavior state in #6461 affects user behavior, so it still needs some feedback from the end users.

Besides, you can sign off refer to https://github.com/karmada-io/karmada/pull/6462/checks?check_run_id=44175872796

XiShanYongYe-Chang avatar Jun 16 '25 13:06 XiShanYongYe-Chang

Hi @abhinav-1305 it seems that this pr containts the other commits, can you help remove them? then we can continue this pr.

XiShanYongYe-Chang avatar Jun 17 '25 07:06 XiShanYongYe-Chang

Hi @XiShanYongYe-Chang , those commits have already been removed from this PR. or should I open a new PR if that works for you?

abhinav-1305 avatar Jun 17 '25 09:06 abhinav-1305

Maybe don't have to open another PR, just squash and rebase this would be ok. https://karmada.io/docs/contributor/github-workflow/#squash-commits

RainbowMango avatar Jun 17 '25 10:06 RainbowMango

Hi @abhinav-1305 are you still working on the pr?

I'm not trying to rush you, just checking if you need any help with anything.

XiShanYongYe-Chang avatar Jun 20 '25 09:06 XiShanYongYe-Chang

Hi @XiShanYongYe-Chang - Yes, I’m still working on this. Let me know if you’re okay with the current implementation or if there’s anything you’d like me to adjust.

abhinav-1305 avatar Jun 20 '25 12:06 abhinav-1305

Hi @abhinav-1305, thanks~

Can you help squash the commits into one?

XiShanYongYe-Chang avatar Jun 23 '25 01:06 XiShanYongYe-Chang

Hi @XiShanYongYe-Chang, I’ve squashed the commits as asked. Please review.

abhinav-1305 avatar Jun 23 '25 03:06 abhinav-1305

Thanks @abhinav-1305 /assign

XiShanYongYe-Chang avatar Jun 23 '25 03:06 XiShanYongYe-Chang

/lgtm

whitewindmills avatar Jun 23 '25 09:06 whitewindmills

Hi @abhinav-1305 sorry I missed this task, there are still some issues with the imports in lint. Can you help fix it? When pushing again, you can merge the PR into one commit. Thanks~

XiShanYongYe-Chang avatar Jul 03 '25 12:07 XiShanYongYe-Chang

Hi @abhinav-1305 sorry I missed this task, there are still some issues with the imports in lint. Can you help fix it? When pushing again, you can merge the PR into one commit. Thanks~

done, please review - @XiShanYongYe-Chang

abhinav-1305 avatar Jul 03 '25 14:07 abhinav-1305

/remove-kind bug /kind cleanup

@XiShanYongYe-Chang Please take another look, thanks.

RainbowMango avatar Jul 04 '25 02:07 RainbowMango

All seems great, thanks~ @abhinav-1305 @RainbowMango /lgtm /approve

XiShanYongYe-Chang avatar Jul 04 '25 06:07 XiShanYongYe-Chang

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XiShanYongYe-Chang

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

karmada-bot avatar Jul 04 '25 06:07 karmada-bot