-
Notifications
You must be signed in to change notification settings - Fork 243
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
Fix mismatch messaging during podman preset #2959
Conversation
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.
Let's hold this until this has had some scrutiny from Kevin, I don't think it's a must-have for the release.
It might be desirable to limit the use of UserFriendlyName()
and to use more of the virtual machine
or CodeReady Containers instance
terminology.
3b22e17
to
d4bd660
Compare
/hold |
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.
My apologies, I thought I had already submitted a review of this PR, and it turns out all of my comments were pending. 🤦♂️
In short, I think we can replace "virtual machine" with "instance" in every case and not lose any meaning. Likewise, many times we mention the OpenShift cluster or Podman runtime we can simply use "instance" without losing meaning.
cmd/crc/cmd/delete.go
Outdated
@@ -52,7 +54,8 @@ func deleteMachine(client machine.Client, clearCache bool, cacheDir string, inte | |||
return false, errors.New("non-interactive deletion requires --force") | |||
} | |||
|
|||
yes := input.PromptUserForYesOrNo("Do you want to delete the OpenShift cluster", force) | |||
yes := input.PromptUserForYesOrNo(fmt.Sprintf("Do you want to delete the %s", crcPreset.UserFriendlyName(crcConfig.GetPreset(config))), |
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.
We can simplify this to "Do you want to delete the instance?" That would also address the theoretical string-building comment left by @cfergeau. ;)
I think it's also more technically correct to state it in this way considering the code deletes the virtual machine. The OpenShift cluster or Podman runtime being deleted are a result of this if I'm understanding correctly.
dbeb288
to
759f606
Compare
cmd/crc/cmd/delete.go
Outdated
@@ -38,7 +38,7 @@ func deleteMachine(client machine.Client, clearCache bool, cacheDir string, inte | |||
if !interactive && !force { | |||
return false, errors.New("non-interactive deletion requires --force") | |||
} | |||
yes := input.PromptUserForYesOrNo("Do you want to delete the OpenShift cluster cache", force) | |||
yes := input.PromptUserForYesOrNo("Do you want to delete the cache used by CodeReady Containers", force) |
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.
clear-cache
help string is Clear the instance cache
, but we ask the user about the cache used by CodeReady Containers
, I'd use the same terminology for both.
759f606
to
e5bc0ae
Compare
/retest |
@praveenkumar: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
Capital used after a comma
e5bc0ae
to
123d93b
Compare
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.
Two sentences are concatenated with a comma. Please use a full-stop.
Currently most of the places still have `Openshift cluster` as part of string and show as message to user when perform different operation like `delete`, `setup` ..etc. This PR tries to fix it by just using `instance` instead of runtime. fixes: crc-org#2863
123d93b
to
bff666f
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gbraad, praveenkumar 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 |
/unhold |
Currently most of the places still have
Openshift cluster
as part ofstring and show as message to user when perform different operation like
delete
,setup
..etc. This PR tries to fix it by using preset friendlymessage string and show it to user as per preset.
fixes: #2863