no-jira: ibmcloud: fix region survey default value#10336
no-jira: ibmcloud: fix region survey default value#10336Pacho20 wants to merge 1 commit intoopenshift:mainfrom
Conversation
In the ibmcloud selectRegion function, the Default parameter for survey.Select was incorrectly formatted. The longRegions slice already contains properly formatted strings (e.g., "us-south (Dallas)"), but the code attempted to format them again using fmt.Sprintf with a map lookup that would fail, resulting in malformed defaults like "us-south (Dallas) ()". This bug was latent but became visible after upgrading the survey library from v2.3.5 to v2.3.7, which introduced strict validation requiring the Default value to exactly match one of the Options. This caused install-config creation to fail with an error. This commit fixes the issue by using the first element of longRegions directly as the default value, without additional formatting.
|
@Pacho20: This pull request explicitly references no jira issue. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Hi @Pacho20. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tthvo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/cc @MayXuQQ Could you help us verify this? |
|
@Pacho20: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
In the ibmcloud selectRegion function, the Default parameter for survey.Select was incorrectly formatted. The longRegions slice already contains properly formatted strings (e.g., "us-south (Dallas)"), but the code attempted to format them again using fmt.Sprintf with a map lookup that would fail, resulting in malformed defaults like "us-south (Dallas) ()".
This bug was latent but became visible after upgrading the survey library from v2.3.5 to v2.3.7, which introduced strict validation requiring the Default value to exactly match one of the Options. This caused install-config creation to fail with an error.
This commit fixes the issue by using the first element of longRegions directly as the default value, without additional formatting.