Skip to content

bug: gcs behavior test failure #7942

Closed

Description

@erickguan

Describe the bug

Both GCS behavior-test configurations started failing after commit 19e028238 from PR #7927 changed how the GCS writer encodes object paths.

The affected configurations are:

  • gcs / gcs
  • gcs / gcs_with_default_storage_class

Both configurations passed on the parent commit, 6611d6e3, and failed on the first main branch behavior-test run after 19e028238 was merged. The release PR reproduced the gcs / gcs failure.

The failing Test Core step exits with Cargo status 101. The public GitHub Actions view does not expose the failed Rust test name or assertion without authentication.

PR #7927 changed the writer to pass the raw object path to gcs_insert_object_request and gcs_initiate_multipart_upload. It also changed multipart initiation to percent-encode the path inside GcsCore. The failure correlation indicates that the new encoding behavior is incompatible with at least one operation exercised against the real GCS backend.

Steps to Reproduce

  1. Check out commit 19e028238cdc11398099bd25a8ef7895a15d68a7 or a descendant that contains PR fix(services/gcs): stop double-encoding object paths in writer #7927.

  2. Configure a real GCS test backend:

    OPENDAL_GCS_ROOT=<test-root>
    OPENDAL_GCS_BUCKET=<bucket>
    OPENDAL_GCS_CREDENTIAL=<service-account-credential>
    
  3. Run the GCS behavior tests from core/:

    OPENDAL_TEST=gcs cargo test behavior --features tests,services-gcs
  4. Observe that the behavior test exits with status 101.

  5. Optionally set OPENDAL_GCS_DEFAULT_STORAGE_CLASS=STANDARD and repeat the test. This configuration also fails in CI.

Existing CI reproductions:

Expected Behavior

The GCS behavior suite should pass for both the default configuration and the configuration with OPENDAL_GCS_DEFAULT_STORAGE_CLASS=STANDARD.

The GCS writer should encode each object path exactly once while preserving consistent object names across:

  • Single-request writes.
  • Multipart initiation.
  • Multipart part uploads.
  • Multipart completion and abort.
  • Read and stat operations.

Objects written with nested paths or reserved characters should be readable and statable using the same OpenDAL path.

Additional Context

The last tested parent commit before the change passed both GCS configurations:

The first behavior-test run after merging 19e028238 failed both configurations:

PR and commit:

The final commit modifies only:

  • core/services/gcs/src/writer.rs
  • core/services/gcs/src/core.rs

The PR initially included request-construction regression tests, but those tests and their supporting helpers were removed during review. The final commit contains no regression test for nested object paths. The existing test_write_with_special_chars behavior test also uses a flat filename without /, so it does not specifically cover encoding of nested path separators.

The PR's GCS behavior tests did not run before merge because it originated from an external fork and the real GCS configurations require repository secrets. This explains why the regression was first observed on main, but it is not the subject of this report.

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.

Activity

  1. changed the title [-]bug: behavior test workflow passes without testing affected secret-backed services[/-] [+]bug: gcs behavior test failure[/+] on Jul 23, 2026
  2. added
    bug
    releases-note/ci
    on Jul 23, 2026
  3. Xuanwo commented on Jul 23, 2026

    @Xuanwo
    Member

    I think it's better to revert that PR and wait for the reqsign's fix later. And in the meantime, we can work on 0.58.1 first.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleases-note/ci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions