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 (config) : Display helpful message when user tries to set okd preset on arm (#3389) #4485

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

rohanKanojia
Copy link
Contributor

Fixes: Issue #3389

Relates to: Issue #3389

Solution/Idea

Fix #3389

Add additional handling in validatePreset method for failing the validation when okd preset is provided on arm architecture. Validation would fail with message directing user to use other preset values.

Proposed changes

  • Update validationPreset method with an additional check to fail when okd value is provided on arm architecture. It now checks for two conditions
    • whether provided preset value is valid (already existing validation)
    • whether okd is not provided on arm or arm64 architecture

Testing

⚠️ A machine with arm architecture is required to test these changes

  • crc delete
  • crc config set preset okd (should fail with invalid value error)

Old behavior

When user tried setting okd preset on arm architecture, CRC allowed doing this:

crc : $ crc config set preset okd
To confirm your system is ready, and you have the needed system bundle, please run 'crc setup' before 'crc start'.
crc : $ cat ~/.crc/crc.json 
{
  "consent-telemetry": "yes",
  "preset": "okd"
}

New behavior

Once these changes are merged, user would get error when he tries above action on arm architecture:

crc : $ crc config set preset okd
Value 'okd' for configuration property 'preset' is invalid, reason: preset 'okd' is not supported on amd64 architecture, please use different preset value
crc : $ cat ~/.crc/crc.json # Config file is not updated
{
  "consent-telemetry": "yes"
}

…rm (crc-org#3389)

Add additional handling in validatePreset method for failing the
validation when `okd` preset is provided on arm architecture. Validation
would fail with message directing user to use other preset values.

Signed-off-by: Rohan Kumar <[email protected]>
Copy link

openshift-ci bot commented Nov 26, 2024

Hi @rohanKanojia. Thanks for your PR.

I'm waiting for a crc-org member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@rohanKanojia rohanKanojia changed the title fix (config) : Display helpful message when user tries to set okd preset on arm (#3389) fix (config) : Display helpful message when user tries to set okd preset on arm (#3389) Nov 26, 2024
@anjannath
Copy link
Member

/ok-to-test

Copy link

openshift-ci bot commented Nov 27, 2024

@rohanKanojia: The following tests 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 a5eb86c link true /test integration-crc
ci/prow/e2e-crc a5eb86c link true /test e2e-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-sigs/prow repository. I understand the commands that are listed here.

Copy link

openshift-ci bot commented Dec 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anjannath

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Dec 2, 2024
@praveenkumar praveenkumar merged commit 602c1f4 into crc-org:main Dec 2, 2024
27 of 35 checks passed
@rohanKanojia rohanKanojia deleted the pr/issue3389 branch December 2, 2024 09:13
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.

[BUG] Display user friendly message when OKD preset selected on Apple Silicon (M1/M2 - arm64)
3 participants