Repository navigation
Description
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 / gcsgcs / 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
-
Check out commit
19e028238cdc11398099bd25a8ef7895a15d68a7or a descendant that contains PR fix(services/gcs): stop double-encoding object paths in writer #7927. -
Configure a real GCS test backend:
OPENDAL_GCS_ROOT=<test-root> OPENDAL_GCS_BUCKET=<bucket> OPENDAL_GCS_CREDENTIAL=<service-account-credential> -
Run the GCS behavior tests from
core/:OPENDAL_TEST=gcs cargo test behavior --features tests,services-gcs -
Observe that the behavior test exits with status 101.
-
Optionally set
OPENDAL_GCS_DEFAULT_STORAGE_CLASS=STANDARDand repeat the test. This configuration also fails in CI.
Existing CI reproductions:
gcs / gcs: https://github.com/apache/opendal/actions/runs/29978908881/job/89116701334gcs / gcs_with_default_storage_class: https://github.com/apache/opendal/actions/runs/29978908881/job/89116701310- Release PR
gcs / gcs: https://github.com/apache/opendal/actions/runs/29981934084/job/89132023644?pr=7933
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:
- Commit checks: https://github.com/apache/opendal/commit/6611d6e3aec9d4700047188c81367c6d1efeffcc/checks
gcs / gcs: https://github.com/apache/opendal/actions/runs/29944243330/job/89005537913gcs / gcs_with_default_storage_class: https://github.com/apache/opendal/actions/runs/29944243330/job/89005538059
The first behavior-test run after merging 19e028238 failed both configurations:
PR and commit:
- PR fix(services/gcs): stop double-encoding object paths in writer #7927: fix(services/gcs): stop double-encoding object paths in writer #7927
- Commit
19e028238: 19e0282
The final commit modifies only:
core/services/gcs/src/writer.rscore/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
[-]bug: behavior test workflow passes without testing affected secret-backed services[/-][+]bug: gcs behavior test failure[/+]Xuanwo commentedon Jul 23, 2026
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.