Skip to content

File cache testsuit refactor#1274

Merged
yaozile123 merged 1 commit intoGoogleCloudPlatform:mainfrom
yaozile123:file-cache-testsuit-refactor
Mar 27, 2026
Merged

File cache testsuit refactor#1274
yaozile123 merged 1 commit intoGoogleCloudPlatform:mainfrom
yaozile123:file-cache-testsuit-refactor

Conversation

@yaozile123
Copy link
Copy Markdown
Collaborator

@yaozile123 yaozile123 commented Mar 20, 2026

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind feature

What this PR does / why we need it:

This PR includes the following changes:

  • Refactored GCSFuse file cache e2e test suites to use the same dynamic test command generation logic as parallel download test suites by fetch test cases from test_config.yaml in GCSFuse repo.
  • Deleted disallowedFlagsMapping in utils.go to reduce the complexity to maintain two disallowed flag maps.
  • Modified sidecar_mounter.go to refactored disallowedFlags into an exportable DisallowedFlags, and ran go mod tidy and go mod vendor afterwards to sync up the module dependencies.
  • Changed the underlying structure of DisallowedFlags from map[string]bool to map[string]string. The values now represent the mapping to their corresponding config file format representation (e.g., "log-file": "logging:file-path").
  • Ran go mod tidy and go mod vendor under test/ folder to sync up the module dependencies.
  • Implemented support for the rapid_appends test package by mounting two separate volumes on the test pod, each configured with different mount options as required by the tests.

Ran the e2e test on non-managed driver, GKE version 1.35.0-gke.3047002, GCSFuse version v3.7.3-gke.0

make e2e-test     REGISTRY=$REGISTRY     STAGINGVERSION=$STAGINGVERSION     E2E_TEST_USE_GKE_MANAGED_DRIVER=false     E2E_TEST_BUILD_DRIVER=false    BUILD_GCSFUSE_FROM_SOURCE=false

Summarizing 1 Failure:
[FAIL] E2E Test Suite [Driver: gcsfuse.csi.storage.gke.io] [Testpattern: CSI Ephemeral-volume (default fs)] istio [It] should store data with istio injected at index 0
/usr/local/google/home/yaozile/oss/gcs-fuse-csi-driver/test/e2e/specs/specs.go:321

Ran 391 of 526 Specs in 11186.860 seconds
FAIL! -- 390 Passed | 1 Failed | 0 Pending | 135 Skipped


Ginkgo ran 1 suite in 3h6m46.84860674s

Test Suite Failed

It was failed on the istio so I did a retry:

[FLAKEY TEST - TOOK 2 ATTEMPTS TO PASS] [1213.778 seconds]
E2E Test Suite [Driver: gcsfuse.csi.storage.gke.io] [Testpattern: CSI Ephemeral-volume (default fs)] istio should store data with istio injected at index 0
/usr/local/google/home/yaozile/oss/gcs-fuse-csi-driver/test/e2e/testsuites/istio.go:132

Ran 8 of 526 Specs in 1213.811 seconds
SUCCESS! -- 8 Passed | 0 Failed | 1 Flaked | 0 Pending | 518 Skipped


Ginkgo ran 1 suite in 20m38.897890887s
Test Suite Passed

It seems like that testcase is flaky.

Ran the e2e test on managed driver, GKE version 1.35.2-gke.1842000, GCSFuse version v3.7.3-gke.0

make e2e-test E2E_TEST_USE_GKE_MANAGED_DRIVER=true

Ran 384 of 530 Specs in 10842.164 seconds
SUCCESS! -- 384 Passed | 0 Failed | 0 Pending | 146 Skipped


Ginkgo ran 1 suite in 3h0m54.603855663s
Test Suite Passed

On zonal bucket with manged driver

make e2e-test E2E_TEST_USE_GKE_MANAGED_DRIVER=true E2E_TEST_FOCUS="gcsfuseIntegration" 
ENABLE_ZB=true

Ran 108 of 430 Specs in 10173.132 seconds
SUCCESS! -- 108 Passed | 0 Failed | 0 Pending | 322 Skipped

Ginkgo ran 1 suite in 2h49m43.105570991s
Test Suite Passed

Which issue(s) this PR fixes:

Fixes # b/483388410
Fixes # b/483387747
Special notes for your reviewer:

  • I added some temporary workarounds with TODO in gcsfuse_integration_file_cache.go. I will clean them up once GCSFuse fixes the upstream issues.
  • You can ignore the huge diff in the vendor/ directory, it's just auto-generated from go mod vendor.

Does this PR introduce a user-facing change?:

NONE

@google-oss-prow
Copy link
Copy Markdown

@yaozile123: The label(s) kind/feature cannot be applied, because the repository doesn't have them.

Details

In response to this:

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind feature

What this PR does / why we need it:

Note: This PR is currently based on PR #1235. Please review the new changes after only the commits from that PR. I will rebase this branch to main once that PR is merged.

This PR includes the following changes:

  • Refactored GCSFuse file cache e2e test suites to use the same dynamic test command generation logic as parallel download test suites by fetch test cases from test_config.yaml in GCSFuse repo.
  • Deleted disallowedFlagsMapping in utils.go to reduce the complexity to maintain two disallowed flag maps.
  • Modified sidecar_mounter.go to refactored disallowedFlags into an exportable DisallowedFlags, and ran go mod tidy and go mod vendor afterwards to sync up the module dependencies.
  • Changed the underlying structure of DisallowedFlags from map[string]bool to map[string]string. The values now represent the mapping to their corresponding config file format representation (e.g., "log-file": "logging:file-path").
  • Ran go mod tidy and go mod vendor under test/ folder to sync up the module dependencies.

Ran the e2e test on non-managed driver, GKE version 1.35.0-gke.3047002, GCSFuse version v3.7.3-gke.0

make e2e-test     REGISTRY=$REGISTRY     STAGINGVERSION=$STAGINGVERSION     E2E_TEST_USE_GKE_MANAGED_DRIVER=false     E2E_TEST_BUILD_DRIVER=false    BUILD_GCSFUSE_FROM_SOURCE=false     E2E_TEST_FOCUS="gcsfuseIntegrationFileCache"

Ran 122 of 526 Specs in 4538.689 seconds
SUCCESS!122 Passed 0 Failed 0 Pending 404 Skipped

Ginkgo ran 1 suite in 1h15m55.546121406s

Which issue(s) this PR fixes:

Fixes # b/483388410
Fixes # b/483387747
Special notes for your reviewer:

  • I added some temporary workarounds with TODO in gcsfuse_integration_file_cache.go. I will clean them up once GCSFuse fixes the upstream issues.
  • You can ignore the huge diff in the vendor/ directory, it's just auto-generated from go mod vendor.
  • This PR is currently based on my PR#1235, will change the base to main after it get merged.

Does this PR introduce a user-facing change?:

NONE

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.

@google-oss-prow
Copy link
Copy Markdown

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

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on refactoring the GCSFuse file cache e2e test suites to improve maintainability and reduce complexity. It introduces dynamic test command generation, enhances flag management, and synchronizes module dependencies. Additionally, it addresses ZB integration and improves GCSFuse version handling.

Highlights

  • E2E Test Refactor: Refactored GCSFuse file cache e2e test suites to use dynamic test command generation, fetching test cases from test_config.yaml in the GCSFuse repo, similar to parallel download tests.
  • Flag Management: Replaced disallowedFlagsMapping with an exportable DisallowedFlags in sidecar_mounter.go, changing its structure to map flags to their config file representations.
  • Dependency Sync: Ran go mod tidy and go mod vendor to synchronize module dependencies in both the main project and the test/ directory.
  • ZB Integration: Added logic to skip HNS test suites when ZB is enabled, as ZB automatically enables HNS, and the GCSFuseCSITestSuites already include HNS tests.
  • GCSFuse Version Handling: Improved GCSFuse version handling by fetching the version dynamically and setting it as an environment variable for tests.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist
Copy link
Copy Markdown

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@yaozile123 yaozile123 marked this pull request as ready for review March 20, 2026 17:54
@yaozile123 yaozile123 force-pushed the file-cache-testsuit-refactor branch from 83e7442 to 7ebbed8 Compare March 24, 2026 04:01
@uriel-guzman
Copy link
Copy Markdown
Collaborator

/gemini review

@yaozile123 yaozile123 force-pushed the file-cache-testsuit-refactor branch from 7ebbed8 to c211f5c Compare March 24, 2026 21:32
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the GCS-FUSE CSI driver's sidecar mounter configuration and enhances the e2e testing framework. The DisallowedFlags map has been moved to the sidecar_mounter package and updated to map flags to their config file representations. The e2e test suite now dynamically generates tests from GCSFuse's test_config.yaml, introducing new helper functions for test command generation and resource configuration. A review comment highlighted a potential issue where the cache directory naming in dynamic tests could lead to collisions if not made unique per test package and name.

@amacaskill
Copy link
Copy Markdown
Collaborator

amacaskill commented Mar 24, 2026

@yaozile123 As mentioned over chat please update PR description with how you tested on Managed driver as well. If it doesn't have any issues on managed driver, I am ok with merging once the other comments are addressed.

@yaozile123 yaozile123 force-pushed the file-cache-testsuit-refactor branch from c211f5c to b35b84c Compare March 24, 2026 23:22
@google-oss-prow google-oss-prow bot removed the lgtm label Mar 24, 2026
@yaozile123 yaozile123 force-pushed the file-cache-testsuit-refactor branch 5 times, most recently from 9150529 to 5727174 Compare March 26, 2026 16:37
@yaozile123 yaozile123 force-pushed the file-cache-testsuit-refactor branch from 5727174 to 1c384fd Compare March 26, 2026 21:36
@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: amacaskill, Sneha-at, yaozile123

The full list of commands accepted by this bot can be found 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

@yaozile123 yaozile123 merged commit 121c7e0 into GoogleCloudPlatform:main Mar 27, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants