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

Fix mismatch messaging during podman preset #2959

Merged
merged 2 commits into from
Feb 15, 2022

Conversation

praveenkumar
Copy link
Member

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 using preset friendly
message string and show it to user as per preset.

fixes: #2863

Copy link
Contributor

@cfergeau cfergeau left a 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.

cmd/crc/cmd/delete.go Outdated Show resolved Hide resolved
cmd/crc/cmd/delete.go Show resolved Hide resolved
cmd/crc/cmd/setup.go Outdated Show resolved Hide resolved
cmd/crc/cmd/start.go Outdated Show resolved Hide resolved
@praveenkumar
Copy link
Member Author

/hold

@gbraad gbraad linked an issue Jan 28, 2022 that may be closed by this pull request
@gbraad gbraad removed the request for review from guillaumerose January 28, 2022 08:02
Copy link
Contributor

@kowen-rh kowen-rh left a 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 Show resolved Hide resolved
cmd/crc/cmd/setup.go Outdated Show resolved Hide resolved
cmd/crc/cmd/setup.go Outdated Show resolved Hide resolved
@@ -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))),
Copy link
Contributor

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.

cmd/crc/cmd/delete.go Outdated Show resolved Hide resolved
cmd/crc/cmd/delete.go Outdated Show resolved Hide resolved
@praveenkumar praveenkumar force-pushed the issue_2863 branch 3 times, most recently from dbeb288 to 759f606 Compare February 8, 2022 07:31
@@ -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)
Copy link
Contributor

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.

Makefile Outdated Show resolved Hide resolved
@praveenkumar
Copy link
Member Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Feb 14, 2022

@praveenkumar: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-crc e5bc0ae link true /test integration-crc

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.

cmd/crc/cmd/setup_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gbraad gbraad left a 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

cmd/crc/cmd/setup_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gbraad gbraad left a 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
@openshift-ci openshift-ci bot added the lgtm label Feb 15, 2022
@openshift-ci
Copy link

openshift-ci bot commented Feb 15, 2022

[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:
  • OWNERS [gbraad,praveenkumar]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@praveenkumar
Copy link
Member Author

/unhold

@praveenkumar praveenkumar merged commit 157e5b3 into crc-org:dev Feb 15, 2022
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.

Lots of references to OpenShift when podman is used
4 participants