Xuanwo opened a new pull request, #9329:
URL: https://github.com/apache/opendal/pull/9329

   # Which issue does this PR close?
   
   Part of #9319. This PR addresses GCS compose. The issue also tracks write 
and presigned write.
   
   # Rationale for this change
   
   GCS compose uses one `ifGenerationMatch` query parameter for two destination 
conditions. Create-only requires `0`, while a version match requires the 
caller's generation. Previously, requesting both caused the request builder to 
encode only the version match. The conditional operations contract requires 
`Unsupported` when a service cannot enforce every requested condition.
   
   # What changes are included in this PR?
   
   The GCS service checks the conditions when it creates the composer, before 
it accepts any sources. A recording HTTP transport verifies that 
`if_not_exists` paired with either an explicit `if_version_match` or a version 
match derived from `if_not_changed` returns `Unsupported` with zero transport 
calls in each case.
   
   The same transport verifies that each condition alone still sends one 
compose POST. Create-only sends `ifGenerationMatch=0`, and matching generation 
`33` sends `ifGenerationMatch=33`.
   
   On earlier `main` commit `4625e0a1aad6`, the official live GCS job passed 
`test_compose_with_if_not_exists` and `test_compose_with_if_version_match` 
separately. The evidence for the combined conditions comes from client-side 
tests on this candidate. [Live GCS 
job](https://github.com/apache/opendal/actions/runs/46049003202/job/140679347365)
   
   # Are there any user-facing changes?
   
   Callers that request both destination conditions now receive `Unsupported` 
at composer creation. Callers can request `if_not_exists` to create a new 
destination or `if_version_match` to replace a specific generation.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Pi through T3 Code, `magpie/codex/gpt-6.2-sol`, `max` effort. Implemented 
and verified the hardening and performed an independent review in a separate 
session.
   - Pi through T3 Code, `magpie/codex/gpt-6.2-astra`, `high` effort. 
Coordinated the work and prepared the PR for publication.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to