Skip to content

OCPBUGS-81666: Update storage driver to GCP for VAC E2E tests#16248

Open
cajieh wants to merge 1 commit intoopenshift:mainfrom
cajieh:add-vac-pvc-e2e-tests-gcp-driver-platfrom
Open

OCPBUGS-81666: Update storage driver to GCP for VAC E2E tests#16248
cajieh wants to merge 1 commit intoopenshift:mainfrom
cajieh:add-vac-pvc-e2e-tests-gcp-driver-platfrom

Conversation

@cajieh
Copy link
Copy Markdown
Contributor

@cajieh cajieh commented Apr 2, 2026

Summary by CodeRabbit

  • Tests
    • Expanded VolumeAttributesClass test coverage to support multiple cloud platforms, removing AWS-only environment gates.
    • Updated test fixtures and scenarios to include standard and performance tier configurations.
    • Enhanced test suite to validate volume attributes across different infrastructure providers.

@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 Apr 2, 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 Apr 2, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cajieh: This pull request references Jira Issue OCPBUGS-81666, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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

Details

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

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Apr 2, 2026
@openshift-ci openshift-ci bot requested review from jhadvig and rhamilto April 2, 2026 17:30
@openshift-ci openshift-ci bot added the kind/cypress Related to Cypress e2e integration testing label Apr 2, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cajieh

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 Apr 2, 2026
@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 2, 2026

/test e2e-gcp-console

1 similar comment
@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 3, 2026

/test e2e-gcp-console

@cajieh cajieh changed the title [WIP] OCPBUGS-81666: Update storage driver to GCP for VAC E2E tests OCPBUGS-81666: Update storage driver to GCP for VAC E2E tests Apr 8, 2026
@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 Apr 8, 2026
@cajieh cajieh force-pushed the add-vac-pvc-e2e-tests-gcp-driver-platfrom branch from 2a35e6c to 2bdd0c8 Compare April 8, 2026 20:22
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

📝 Walkthrough

Walkthrough

This pull request migrates integration test fixtures and test suites from AWS/EBS-specific VolumeAttributesClass configurations to GCP-specific Hyperdisk configurations. The fixture file replaces the AWS CSI driver (ebs.csi.aws.com) and parameter structure with the GCP CSI driver (pd.csi.storage.gke.io) and Hyperdisk parameters. Tier names are updated from LOW_IOPS/HIGH_IOPS to STANDARD/PERFORMANCE. The CRUD and E2E test files are updated to reference new fixture identifiers and remove environment-specific AWS conditionals, enabling the VolumeAttributesClass test suite to run across all environments rather than AWS-only.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
frontend/packages/integration-tests/tests/storage/volume-attributes-class.cy.ts (1)

25-36: Potential race: Deployment created before PVC exists.

The before() hook creates the Deployment (line 35) before the first test creates the PVC it references. While volumeBindingMode: WaitForFirstConsumer ensures the PV isn't provisioned until a Pod schedules, the Deployment will initially have Pods in Pending state with "persistentvolumeclaim not found" events.

This should work since PVC creation is the first test action, but consider reordering to create the Deployment after PVC creation inside the test, or add a comment clarifying this intentional pattern for test parallelization.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/packages/integration-tests/tests/storage/volume-attributes-class.cy.ts`
around lines 25 - 36, The before() hook currently applies the Deployment
(constructed via getDeployment(testName, TEST_PVC)) before any PVC is created,
causing initial Pod Pending events like "persistentvolumeclaim not found";
either move the Deployment creation out of before() and apply it after the test
creates the PVC (i.e. create the PVC first in the test, then call the same oc
apply for getDeployment(...)), or add an explicit inline comment in the before()
block explaining the intentional ordering and why volumeBindingMode:
WaitForFirstConsumer is relied upon to avoid flakes; locate the code around the
before() hook and the getDeployment / TEST_PVC usage to implement the chosen
fix.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@frontend/packages/integration-tests/tests/storage/volume-attributes-class.cy.ts`:
- Around line 25-36: The before() hook currently applies the Deployment
(constructed via getDeployment(testName, TEST_PVC)) before any PVC is created,
causing initial Pod Pending events like "persistentvolumeclaim not found";
either move the Deployment creation out of before() and apply it after the test
creates the PVC (i.e. create the PVC first in the test, then call the same oc
apply for getDeployment(...)), or add an explicit inline comment in the before()
block explaining the intentional ordering and why volumeBindingMode:
WaitForFirstConsumer is relied upon to avoid flakes; locate the code around the
before() hook and the getDeployment / TEST_PVC usage to implement the chosen
fix.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: b42e9d8e-b1d5-449a-b7cf-3187e8642b35

📥 Commits

Reviewing files that changed from the base of the PR and between 12d651d and 2bdd0c8.

📒 Files selected for processing (3)
  • frontend/packages/integration-tests/mocks/volume-attributes-class.ts
  • frontend/packages/integration-tests/tests/crud/resource-crud.cy.ts
  • frontend/packages/integration-tests/tests/storage/volume-attributes-class.cy.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/packages/integration-tests/tests/crud/resource-crud.cy.ts
  • frontend/packages/integration-tests/tests/storage/volume-attributes-class.cy.ts
  • frontend/packages/integration-tests/mocks/volume-attributes-class.ts
🔀 Multi-repo context openshift/console-operator

Findings for openshift/console-operator

  • VolumeAttributesClass types and API presence: multiple generated API files include VolumeAttributesClass definitions and fields (storage.k8s.io v1/v1alpha1/v1beta1). Example files:

    • vendor/k8s.io/api/storage/v1/types.go (VolumeAttributesClass type) [::openshift/console-operator::vendor/k8s.io/api/storage/v1/types.go]
    • vendor/k8s.io/api/storage/v1alpha1/types.go (VolumeAttributesClass prerelease) [::openshift/console-operator::vendor/k8s.io/api/storage/v1alpha1/types.go]
    • vendor/k8s.io/api/storage/v1beta1/types.go (VolumeAttributesClass prerelease) [::openshift/console-operator::vendor/k8s.io/api/storage/v1beta1/types.go]
  • Core PVC fields referencing VAC: core API contains volumeAttributesClassName, current/targetVolumeAttributesClassName and modifyVolumeStatus docs/fields:

    • vendor/k8s.io/api/core/v1/types.go (VolumeAttributesClassName, Current/TargetVolumeAttributesClassName) [::openshift/console-operator::vendor/k8s.io/api/core/v1/types.go]
    • vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go (docs for volumeAttributesClassName/modifyVolumeStatus) [::openshift/console-operator::vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go]
  • CSI driver constants / CRD manifests include both AWS EBS and GCP PD drivers:

    • vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go defines AWSEBSCSIDriver = "ebs.csi.aws.com" and GCPPDCSIDriver = "pd.csi.storage.gke.io" [::openshift/console-operator::vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go]
    • Generated CRD manifests list both drivers (e.g., vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/... contains ebs.csi.aws.com and pd.csi.storage.gke.io) [::openshift/console-operator::vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-Default.crd.yaml]

Implication: the repo’s vendored APIs and manifests already recognize VolumeAttributesClass and include both ebs.csi.aws.com and pd.csi.storage.gke.io drivers, so the PR’s switch from AWS→GCP for VAC E2E test fixtures aligns with drivers present in the codebase; no obvious API-name mismatches found in this repo based on the grep results. [::openshift/console-operator::]

🔇 Additional comments (8)
frontend/packages/integration-tests/tests/crud/resource-crud.cy.ts (1)

83-92: Clean separation of VAC from AWS-gated resources.

Good architectural decision to extract vacObjs as a standalone map merged unconditionally. This correctly reflects that VolumeAttributesClass now runs on GCP with Hyperdisk, while snapshot tests remain AWS-specific. The namespaced: false setting is accurate for cluster-scoped VAC resources.

frontend/packages/integration-tests/tests/storage/volume-attributes-class.cy.ts (3)

62-77: Well-structured cleanup with finalizer handling.

The defensive finalizer patching before VAC deletion is a solid pattern for cluster-scoped resources that may have deletion finalizers. Using --wait=false with failOnNonZeroExit: false prevents test suite hangs during cleanup. Good K8s resource management.


119-149: Proper synchronization for VAC modification flow.

Good sequencing: checking Bound status and pvc-current-vac existence (lines 124-125) before attempting modification prevents flaky failures from racing the CSI driver. The 120s timeout for currentVolumeAttributesClassName updates is appropriate for cloud CSI operations.


151-181: Comprehensive negative test for CSI driver validation.

Solid coverage of the error path: verifying both the alert visibility (lines 173-177) and that currentVolumeAttributesClassName remains at the last valid value (line 180). This confirms the UI correctly reflects CSI driver rejection without corrupting state.

frontend/packages/integration-tests/mocks/volume-attributes-class.ts (4)

30-42: Smart optimization for test reliability.

Using identical parameters for VAC_STANDARD and VAC_PERFORMANCE is a pragmatic approach—it validates the UI/API flow for VAC modification without waiting for actual CSI volume operations. The comment clearly documents this intentional design decision.


43-53: Appropriate out-of-bounds values for error testing.

The 999999 IOPS and throughput values reliably exceed GCP Hyperdisk limits, ensuring consistent CSI driver rejection for the negative test case. Good test fixture design.


54-65: Correct StorageClass configuration for GCP Hyperdisk.

volumeBindingMode: WaitForFirstConsumer is the right choice for zonal PDs—ensures provisioning happens in the Pod's zone. Combined with allowVolumeExpansion: true and hyperdisk-balanced type, this is a solid foundation for VAC E2E testing.


24-28: No changes needed — the throughput: '140Mi' format is correct.

GCP PD CSI driver documentation explicitly uses the Mi suffix format for throughput parameters (e.g., "188Mi", "345Mi" in MiB/s). The mock fixtures in this file align with the official GCP specification.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 9, 2026

@cajieh: 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.

import { modal } from '../../views/modal';

// These tests require AWS platform with EBS CSI driver for modifyVolume support
const isAws = String(Cypress.expose('BRIDGE_AWS')).toLowerCase() === 'true';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we will need to keep this guardrail, since for the console operator we are running also console e2e on AWS

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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants