Skip to content

Conversation

@sjenning
Copy link
Contributor

@sjenning sjenning commented Jan 20, 2026

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

The email validation test cases now fail on the length requirement, not invalid format. Reducing the match string catches both.


Note

Updates tests to match current API and expand validation coverage.

  • Update GCP HostedCluster validations to include required spec.platform.gcp.workloadIdentity and spec.platform.gcp.networkConfig fields; adjust expected error substrings (e.g., name length to "may not be more than 63 bytes", project/region patterns, endpointAccess values)
  • Add/expand e2e-v2 api_ux_validation_test.go with comprehensive HostedCluster and NodePool validation scenarios (GCP WIF, resource labels, networking, services, issuerURL, autoscaling, Azure auth, AWS placement, Azure VM images)
  • Relax WIF service account email assertion substrings to match new validation messages

Written by Cursor Bugbot for commit 5d21817. This will update automatically on new commits. Configure here.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 20, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 20, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 20, 2026

@sjenning: This pull request references CNTRLPLANE-1892 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

Removal of the should accept when GCP project and region are valid case is because it is redundant with other checks so rather than add the newly required fields, the case is just removed.

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Walkthrough

Added an e2ev2 build tag to a v2 test, extended GCP platform test inputs to include NetworkConfig and WorkloadIdentity fields, relaxed two GCP error-message assertions to substring checks, and added immediate post-create deletions with new helper implementations for hosted cluster and node pool tests.

Changes

Cohort / File(s) Summary
GCP test inputs
test/e2e/create_cluster_test.go
Extended GCP test cases to include GCPNetworkConfig (fields: Network, PrivateServiceConnectSubnet) and GCPWorkloadIdentityConfig (fields: ProjectNumber, PoolID, ProviderID, ServiceAccountsEmails for NodePool and ControlPlane). Adjusted several test expectations (network name length wording and WIF-related validations) and updated some test strings.
Test behavior & cleanup
test/e2e/v2/tests/api_ux_validation_test.go
Added // +build e2ev2 build tag. Relaxed error assertions to check substrings ("nodePool in body", "controlPlane in body"). Introduced explicit immediate deletion after Create calls in testHostedClusterCreation and testNodePoolCreation and added new helper implementations implementing this cleanup and mutation workflow.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Jan 20, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 20, 2026

@sjenning: This pull request references CNTRLPLANE-1892 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

Removal of the should accept when GCP project and region are valid case is because it is redundant with other checks so rather than add the newly required fields, the case is just removed.

The email validation test cases now fail on the length requirement, not invalid format. Reducing the match string catches both.

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.

@csrwng
Copy link
Contributor

csrwng commented Jan 21, 2026

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2026
@sjenning sjenning marked this pull request as ready for review January 21, 2026 15:58
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 21, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 21, 2026

@sjenning: This pull request references CNTRLPLANE-1892 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

Removal of the should accept when GCP project and region are valid case is because it is redundant with other checks so rather than add the newly required fields, the case is just removed.

The email validation test cases now fail on the length requirement, not invalid format. Reducing the match string catches both.


[!NOTE]
Cursor Bugbot is generating a summary for commit 580dc9a. Configure 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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from bryan-cox and enxebre January 21, 2026 15:58
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 21, 2026

@sjenning: This pull request references CNTRLPLANE-1892 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

Removal of the should accept when GCP project and region are valid case is because it is redundant with other checks so rather than add the newly required fields, the case is just removed.

The email validation test cases now fail on the length requirement, not invalid format. Reducing the match string catches both.


[!NOTE]
Brings GCP-related e2e-v2 API UX tests in line with recent schema changes.

  • Require spec.platform.gcp.workloadIdentity in test setups and ensure networkConfig names are non-empty (1-char min)
  • Loosen email validation error expectations to match length-based failures (match nodePool in body / controlPlane in body)
  • Remove redundant acceptance test for valid GCP project/region (now covered elsewhere)
  • Add the //go:build e2ev2 tag alongside the legacy build constraint

Written by Cursor Bugbot for commit 580dc9a. This will update automatically on new commits. Configure 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 openshift-eng/jira-lifecycle-plugin repository.

@sjenning
Copy link
Contributor Author

no tests exercise e2e v2 atm so no value in running them

/override ci/prow/e2e-aks
/override ci/prow/e2e-aks-4-21
/override ci/prow/e2e-aws
/override ci/prow/e2e-aws-4-21
/override ci/prow/e2e-aws-upgrade-hypershift-operator
/override ci/prow/e2e-kubevirt-aws-ovn-reduced

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 21, 2026

@sjenning: Overrode contexts on behalf of sjenning: ci/prow/e2e-aks, ci/prow/e2e-aks-4-21, ci/prow/e2e-aws, ci/prow/e2e-aws-4-21, ci/prow/e2e-aws-upgrade-hypershift-operator, ci/prow/e2e-kubevirt-aws-ovn-reduced

Details

In response to this:

no tests exercise e2e v2 atm so no value in running them

/override ci/prow/e2e-aks
/override ci/prow/e2e-aks-4-21
/override ci/prow/e2e-aws
/override ci/prow/e2e-aws-4-21
/override ci/prow/e2e-aws-upgrade-hypershift-operator
/override ci/prow/e2e-kubevirt-aws-ovn-reduced

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.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 21, 2026

@sjenning: This pull request references CNTRLPLANE-1892 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

Removal of the should accept when GCP project and region are valid case is because it is redundant with other checks so rather than add the newly required fields, the case is just removed.

The email validation test cases now fail on the length requirement, not invalid format. Reducing the match string catches both.


[!NOTE]
Brings GCP-related validation tests up to date with current API behavior.

  • Require spec.platform.gcp.workloadIdentity in all passing GCP cases and add valid sample values
  • Add networkConfig with non-empty network.name and privateServiceConnectSubnet.name to passing cases (1+ char minimum)
  • Keep existing GCP endpoint access validations, augmenting passing cases with workloadIdentity
  • Loosen error assertions for invalid WIF service account emails (match on field presence instead of regex detail)
  • Mirror these updates in e2e v2 (tests/api_ux_validation_test.go) and add a passing case for valid GCP project/region with required fields

Written by Cursor Bugbot for commit eb792a8. This will update automatically on new commits. Configure 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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 21, 2026

@sjenning: This pull request references CNTRLPLANE-1892 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

Removal of the should accept when GCP project and region are valid case is because it is redundant with other checks so rather than add the newly required fields, the case is just removed.

The email validation test cases now fail on the length requirement, not invalid format. Reducing the match string catches both.


[!NOTE]
Aligns tests with current GCP API requirements and reduces fragility in error assertions.

  • Require spec.platform.gcp.workloadIdentity and valid networkConfig (network.name, privateServiceConnectSubnet.name) in passing GCP cases
  • Update multiple positive GCP scenarios (including different endpointAccess modes and name formats) to include these fields
  • Loosen WIF service account email error checks to match generic substrings (nodePool in body, controlPlane in body)
  • Add //go:build e2ev2 tag to test/e2e/v2/tests/api_ux_validation_test.go

Written by Cursor Bugbot for commit 378d873. This will update automatically on new commits. Configure 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 openshift-eng/jira-lifecycle-plugin repository.

@sjenning
Copy link
Contributor Author

/test ?

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 21, 2026

@sjenning: The following commands are available to trigger required jobs:

/test e2e-aks
/test e2e-aks-4-21
/test e2e-aks-override
/test e2e-aws
/test e2e-aws-4-21
/test e2e-aws-override
/test e2e-aws-upgrade-hypershift-operator
/test e2e-kubevirt-aws-ovn-reduced
/test images
/test okd-scos-images
/test security
/test unit
/test verify
/test verify-deps

The following commands are available to trigger optional jobs:

/test docs-preview
/test e2e-aws-autonode
/test e2e-aws-metrics
/test e2e-aws-minimal
/test e2e-aws-techpreview
/test e2e-azure-aks-ovn-conformance
/test e2e-conformance
/test e2e-kubevirt-aws-ovn
/test e2e-kubevirt-azure-ovn
/test e2e-kubevirt-metal-conformance
/test e2e-openstack-aws
/test e2e-openstack-aws-conformance
/test e2e-openstack-aws-csi-cinder
/test e2e-openstack-aws-csi-manila
/test e2e-openstack-aws-nfv
/test okd-scos-e2e-aws-ovn
/test reqserving-e2e-aws

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-hypershift-main-e2e-aks
pull-ci-openshift-hypershift-main-e2e-aks-4-21
pull-ci-openshift-hypershift-main-e2e-aws
pull-ci-openshift-hypershift-main-e2e-aws-4-21
pull-ci-openshift-hypershift-main-e2e-aws-upgrade-hypershift-operator
pull-ci-openshift-hypershift-main-e2e-kubevirt-aws-ovn-reduced
pull-ci-openshift-hypershift-main-images
pull-ci-openshift-hypershift-main-okd-scos-images
pull-ci-openshift-hypershift-main-security
pull-ci-openshift-hypershift-main-unit
pull-ci-openshift-hypershift-main-verify
Details

In response to this:

/test ?

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.

@sjenning
Copy link
Contributor Author

/test e2e-aws-techpreview

Copy link
Member

@bryan-cox bryan-cox left a comment

Choose a reason for hiding this comment

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

/lgtm

@sjenning
Copy link
Contributor Author

/retest

@sjenning
Copy link
Contributor Author

Still some failures. Will update soon.

The last time the GCP API was changed, new required fields and field
validations were added that broke e2e with TechPreview and e2e-v2.

This commit makes the changes needed to make passing cases pass again.
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 22, 2026
@sjenning
Copy link
Contributor Author

/test e2e-aws-techpreview

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 22, 2026

@sjenning: This pull request references CNTRLPLANE-1892 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

Removal of the should accept when GCP project and region are valid case is because it is redundant with other checks so rather than add the newly required fields, the case is just removed.

The email validation test cases now fail on the length requirement, not invalid format. Reducing the match string catches both.


[!NOTE]
Updates tests to match current API and expand validation coverage.

  • Update GCP HostedCluster validations to include required spec.platform.gcp.workloadIdentity and spec.platform.gcp.networkConfig fields; adjust expected error substrings (e.g., name length to "may not be more than 63 bytes", project/region patterns, endpointAccess values)
  • Add/expand e2e-v2 api_ux_validation_test.go with comprehensive HostedCluster and NodePool validation scenarios (GCP WIF, resource labels, networking, services, issuerURL, autoscaling, Azure auth, AWS placement, Azure VM images)
  • Relax WIF service account email assertion substrings to match new validation messages

Written by Cursor Bugbot for commit 5d21817. This will update automatically on new commits. Configure 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 openshift-eng/jira-lifecycle-plugin repository.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

hc.Spec.Platform.GCP = &hyperv1.GCPPlatformSpec{
Project: "my-project-123",
Region: "europe-west2",
NetworkConfig: hyperv1.GCPNetworkConfig{
Copy link

Choose a reason for hiding this comment

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

GCP rejection tests missing required fields in e2e-v2

Medium Severity

The "should reject when GCP project ID has invalid format" and "should reject when GCP region has invalid format" tests in api_ux_validation_test.go are missing the now-required NetworkConfig and WorkloadIdentity fields. The PR description states that spec.platform.gcp.workloadIdentity is now required, and the equivalent tests in create_cluster_test.go were correctly updated with these fields, but these tests were not. These tests will fail because the API will return a "missing required field" error instead of the expected format validation error.

Fix in Cursor Fix in Web

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 22, 2026

@sjenning: This pull request references CNTRLPLANE-1892 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

There has been some API drift on GCP since e2e-v2 was originally committed.

These fields now have a 1 char minimum
spec.platform.gcp.networkConfig.network.name
spec.platform.gcp.networkConfig.privateServiceConnectSubnet.name

And spec.platform.gcp.workloadIdentity is now required

The email validation test cases now fail on the length requirement, not invalid format. Reducing the match string catches both.


[!NOTE]
Updates tests to match current API and expand validation coverage.

  • Update GCP HostedCluster validations to include required spec.platform.gcp.workloadIdentity and spec.platform.gcp.networkConfig fields; adjust expected error substrings (e.g., name length to "may not be more than 63 bytes", project/region patterns, endpointAccess values)
  • Add/expand e2e-v2 api_ux_validation_test.go with comprehensive HostedCluster and NodePool validation scenarios (GCP WIF, resource labels, networking, services, issuerURL, autoscaling, Azure auth, AWS placement, Azure VM images)
  • Relax WIF service account email assertion substrings to match new validation messages

Written by Cursor Bugbot for commit 5d21817. This will update automatically on new commits. Configure 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 openshift-eng/jira-lifecycle-plugin repository.

@sjenning
Copy link
Contributor Author

/test e2e-aks

@maxcao13
Copy link
Member

maxcao13 commented Jan 23, 2026

Techpreview is failing because of autonode, but it's a known flake. It'll get solved here: #7583

Thanks for the fixup! 🙏

@enxebre
Copy link
Member

enxebre commented Jan 23, 2026

/test e2e-aws
/lgtm

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

/verified by e2e

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 23, 2026
@openshift-ci-robot
Copy link

@bryan-cox: This PR has been marked as verified by e2e.

Details

In response to this:

/verified by e2e

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.

@sjenning
Copy link
Contributor Author

e2e-aws-techpreview passed the API tests

/override ci/prow/e2e-aws-techpreview
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 23, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 23, 2026

@sjenning: Overrode contexts on behalf of sjenning: ci/prow/e2e-aws-techpreview

Details

In response to this:

e2e-aws-techpreview passed the API tests

/override ci/prow/e2e-aws-techpreview
/hold cancel

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.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 23d2d8d and 2 for PR HEAD 5d21817 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 62ff71f and 1 for PR HEAD 5d21817 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 72fa1e4 and 0 for PR HEAD 5d21817 in total

@openshift-ci-robot
Copy link

/hold

Revision 5d21817 was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2026
@sjenning
Copy link
Contributor Author

/hold cancel
/test e2e-aws

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2026
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ff39e40 and 2 for PR HEAD 5d21817 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 27, 2026

@sjenning: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 2633a97 into openshift:main Jan 27, 2026
22 checks passed
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. area/testing Indicates the PR includes changes for e2e testing 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants