Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add confirm flag to velero plugin add #7566

Merged

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented Mar 25, 2024

Signed-off-by: Tiger Kaovilai [email protected]

Thank you for contributing to Velero!

Please add a summary of your change

Add confirm flag to velero plugin add

~/git/velero biaOperationErrorsPluginName* 15s
❯ go run ./cmd/velero plugin add testImage --confirm
An error occurred: Unauthorized
exit status 1

~/git/velero biaOperationErrorsPluginName* 7s
❯ go run ./cmd/velero plugin add testImage          
velero plugin add may cause the Velero server pod restart, so it is a dangerous operation
once Velero server restarts, all the ongoing jobs will fail.
Are you sure you want to continue (Y/N)? y
An error occurred: Unauthorized
exit status 1

~/git/velero biaOperationErrorsPluginName*
❯ go run ./cmd/velero plugin add testImage 
velero plugin add may cause the Velero server pod restart, so it is a dangerous operation
once Velero server restarts, all the ongoing jobs will fail.
Are you sure you want to continue (Y/N)? n

~/git/velero biaOperationErrorsPluginName*
❯ go run ./cmd/velero backup delete --all
Are you sure you want to continue (Y/N)? y
An error occurred: failed to get API group resources: unable to retrieve the complete list of server APIs: velero.io/v1: Unauthorized
exit status 1

~/git/velero biaOperationErrorsPluginName* 6s
❯ 

Does your change fix a particular issue?

Fixes #6542

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@kaovilai kaovilai force-pushed the biaOperationErrorsPluginName branch from 7416f8b to 868f59b Compare March 25, 2024 22:35
@kaovilai kaovilai marked this pull request as ready for review March 25, 2024 22:35
@kaovilai kaovilai force-pushed the biaOperationErrorsPluginName branch from 868f59b to be3249d Compare March 25, 2024 22:37
@kaovilai kaovilai force-pushed the biaOperationErrorsPluginName branch from be3249d to 3c24365 Compare March 25, 2024 22:56
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

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

Project coverage is 61.71%. Comparing base (f1f7f04) to head (3c24365).

Files Patch % Lines
pkg/cmd/cli/delete_options.go 0.00% 2 Missing ⚠️
pkg/cmd/cli/backuplocation/delete.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7566      +/-   ##
==========================================
+ Coverage   61.70%   61.71%   +0.01%     
==========================================
  Files         263      263              
  Lines       28861    28843      -18     
==========================================
- Hits        17808    17800       -8     
+ Misses       9793     9782      -11     
- Partials     1260     1261       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blackpiglet blackpiglet merged commit 58effeb into vmware-tanzu:main Apr 1, 2024
65 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a confirmation for velero plugin add command
3 participants