Skip to content

chore: rename cmd delete_resource_with_version to purge#567

Merged
wangyelei merged 6 commits intomainfrom
feature/rename_addon_purge
Feb 21, 2025
Merged

chore: rename cmd delete_resource_with_version to purge#567
wangyelei merged 6 commits intomainfrom
feature/rename_addon_purge

Conversation

@yipeng1030
Copy link
Contributor

@yipeng1030 yipeng1030 commented Feb 17, 2025

This PR introduces several improvements and changes to the kbcli addon command:
• Renaming: The command kbcli addon delete-resources-with-version has been renamed to kbcli addon purge to better reflect its purpose.
• Version Check: The command now checks if the specified versions have remaining resources in the environment and displays them to the user.
• User Confirmation: Before proceeding with the purge operation, the command now prompts the user for confirmation, preventing accidental deletions.
• New Flags:
• --dry-run: Allows the user to preview the resources that will be purged without actually deleting them.
• --auto-approve: Skips the confirmation prompt and automatically proceeds with the purge.

These changes enhance the command’s usability and safety, providing a more intuitive and controlled way to manage addon resources.

@github-actions github-actions bot added the size/XL Denotes a PR that changes 500-999 lines. label Feb 17, 2025
@yipeng1030 yipeng1030 changed the title chores: rename cmd delete_resource to purge chore: rename cmd delete_resource to purge Feb 17, 2025
@yipeng1030 yipeng1030 changed the title chore: rename cmd delete_resource to purge chore: rename cmd delete_resource_with_version to purge Feb 17, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 76.19048% with 55 lines in your changes missing coverage. Please review.

Project coverage is 41.54%. Comparing base (98f0be6) to head (d591484).

Files with missing lines Patch % Lines
pkg/cmd/addon/purge.go 77.09% 36 Missing and 16 partials ⚠️
pkg/cmd/addon/uninstall.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #567      +/-   ##
==========================================
+ Coverage   41.41%   41.54%   +0.12%     
==========================================
  Files         187      187              
  Lines       25036    25106      +70     
==========================================
+ Hits        10369    10430      +61     
- Misses      13492    13504      +12     
+ Partials     1175     1172       -3     
Flag Coverage Δ
unittests 41.54% <76.19%> (+0.12%) ⬆️

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.

@wangyelei wangyelei merged commit 075a31b into main Feb 21, 2025
12 checks passed
@wangyelei wangyelei deleted the feature/rename_addon_purge branch February 21, 2025 02:47
@wangyelei
Copy link
Contributor

/cherry-pick release-1.0

@github-actions github-actions bot added this to the Release 1.0 milestone Feb 21, 2025
@apecloud-bot
Copy link
Collaborator

🤖 says: Error cherry-picking.

Auto-merging pkg/cmd/addon/addon.go
CONFLICT (modify/delete): pkg/cmd/addon/delete_resource.go deleted in 075a31b (chore: rename cmd delete_resource_with_version to purge (#567)) and modified in HEAD. Version HEAD of pkg/cmd/addon/delete_resource.go left in tree.
Auto-merging pkg/cmd/addon/purge_test.go
Auto-merging pkg/cmd/addon/uninstall.go
Auto-merging pkg/cmd/cluster/register_test.go
error: could not apply 075a31b... chore: rename cmd delete_resource_with_version to purge (#567)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

@apecloud-bot
Copy link
Collaborator

🤖 says: ‼️ cherry pick action failed.
See: https://github.com/apecloud/kbcli/actions/runs/13448996643

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Denotes a PR that changes 500-999 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants