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

OCPBUGS-17227: gcp: fix validation of custom instance types #7388

Merged

Conversation

r4f4
Copy link
Contributor

@r4f4 r4f4 commented Aug 2, 2023

Users can create their own instance types in GCloud. Those types are not returned when listing the machine types for a given project/region. This would cause those installs with custom types to fail with the error:

Internal error: failed to fetch instance type, this error usually occurs if the region or the instance type is not found

after the validations introduced by
#7317 and #7096.

To fix that, let's fallback to the previous way of fetching the specific machine type whenever the aggregated list returns 0 elements.

Users can create their own instance types in GCloud. Those types are not
returned when listing the machine types for a given project/region. This
would cause those installs with custom types to fail with the error:

```
Internal error: failed to fetch instance type, this error usually occurs if the region or the instance type is not found
```

after the validations introduced by
openshift#7317 and
openshift#7096.

To fix that, let's fallback to the previous way of fetching the specific
machine type whenever the aggregated list returns 0 elements.
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Aug 2, 2023
@openshift-ci-robot
Copy link
Contributor

@r4f4: This pull request references Jira Issue OCPBUGS-17227, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @gpei

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Users can create their own instance types in GCloud. Those types are not returned when listing the machine types for a given project/region. This would cause those installs with custom types to fail with the error:

Internal error: failed to fetch instance type, this error usually occurs if the region or the instance type is not found

after the validations introduced by
#7317 and #7096.

To fix that, let's fallback to the previous way of fetching the specific machine type whenever the aggregated list returns 0 elements.

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.

@jianli-wei
Copy link
Contributor

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@jianli-wei: This pull request references Jira Issue OCPBUGS-17227, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jianli-wei

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci bot requested a review from jianli-wei August 3, 2023 09:15
@jianli-wei
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Aug 4, 2023
Copy link
Contributor

@barbacbd barbacbd left a comment

Choose a reason for hiding this comment

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

LGTM

We may want to change the search to loop through all of the zones to make sure that the instances are found if they exist in any zone other than the first found.

@barbacbd
Copy link
Contributor

barbacbd commented Aug 7, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2023
@r4f4
Copy link
Contributor Author

r4f4 commented Aug 7, 2023

LGTM

We may want to change the search to loop through all of the zones to make sure that the instances are found if they exist in any zone other than the first found.

This is what was done before the zone validation was introduced. See ad63edf#diff-df0d06427cd5be6b8b56f21664d1f138086071766cb01af9d0ce7b8437396cf7L124-R162

@rna-afk
Copy link
Contributor

rna-afk commented Aug 22, 2023

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jianli-wei, rna-afk

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 Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 22, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD e20821e and 2 for PR HEAD 087ab4b in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 22, 2023

@r4f4: 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-gcp-ovn-shared-vpc 087ab4b link false /test e2e-gcp-ovn-shared-vpc

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.

@r4f4
Copy link
Contributor Author

r4f4 commented Aug 22, 2023

/retest-required

@openshift-merge-robot openshift-merge-robot merged commit 02357cc into openshift:master Aug 22, 2023
24 of 25 checks passed
@openshift-ci-robot
Copy link
Contributor

@r4f4: Jira Issue OCPBUGS-17227: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-17227 has been moved to the MODIFIED state.

In response to this:

Users can create their own instance types in GCloud. Those types are not returned when listing the machine types for a given project/region. This would cause those installs with custom types to fail with the error:

Internal error: failed to fetch instance type, this error usually occurs if the region or the instance type is not found

after the validations introduced by
#7317 and #7096.

To fix that, let's fallback to the previous way of fetching the specific machine type whenever the aggregated list returns 0 elements.

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.

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants