Skip to content

no-jira: ibmcloud: fix region survey default value#10336

Open
Pacho20 wants to merge 1 commit intoopenshift:mainfrom
Pacho20:fix-ibmcloud-installconfig-region
Open

no-jira: ibmcloud: fix region survey default value#10336
Pacho20 wants to merge 1 commit intoopenshift:mainfrom
Pacho20:fix-ibmcloud-installconfig-region

Conversation

@Pacho20
Copy link

@Pacho20 Pacho20 commented Feb 25, 2026

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.

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.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 25, 2026
@openshift-ci-robot
Copy link
Contributor

@Pacho20: This pull request explicitly references no jira issue.

Details

In response to this:

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.

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.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 25, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2026

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 /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.

Details

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.

@TwoDCube
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 25, 2026
@rvanderp3
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2026
Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2026

[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

Details 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 Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2026
@tthvo
Copy link
Member

tthvo commented Feb 25, 2026

/cc @MayXuQQ

Could you help us verify this?

@openshift-ci openshift-ci bot requested a review from MayXuQQ February 25, 2026 20:02
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2026

@Pacho20: 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/e2e-ibmcloud-ovn 440c7f7 link false /test e2e-ibmcloud-ovn

Full PR test history. Your PR dashboard.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants