-
Notifications
You must be signed in to change notification settings - Fork 312
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
cluster/clean: prompt list of paths to be delete before processing (part 2) #993
Conversation
pkg/cluster/manager/cleanup.go
Outdated
@@ -39,6 +44,44 @@ func (m *Manager) CleanCluster(name string, gOpt operator.Options, cleanOpt oper | |||
return err | |||
} | |||
|
|||
// calculate file paths to be deleted before the prompt | |||
delFileMaps := make(map[string]set.StringSet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delFileMap or delFilesMap
rest lgtm |
Codecov Report
@@ Coverage Diff @@
## master #993 +/- ##
==========================================
- Coverage 55.48% 55.47% -0.01%
==========================================
Files 279 279
Lines 19709 19710 +1
==========================================
- Hits 10936 10935 -1
- Misses 7058 7062 +4
+ Partials 1715 1713 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/lgtm |
/merge |
Can merge label has been added. Git tree hash: 4842c6f
|
What problem does this PR solve?
Prompt the user for file paths that are going to be delete and ask for confirmation, so that the user has a chance to cancel the process if there's anything unexpected.
This is a following up of #981 and closes #947
What is changed and how it works?
Calculate the file list before promoting for confirmation.
Check List
Tests
Code changes
Related changes
Release notes: