googleapis / googleapis/google-cloud-rust
Feature Request: Configurable Idempotency Policy for Storage Client
- Dominant language
- Rust
- Stars
- 955
- Forks
- 144
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 279
Description
**Is your feature request related to a problem? Please describe.**
The `google-cloud-storage` Rust SDK currently lacks a public API for configuring an "Idempotency Policy" to govern retry behavior. While basic retries exist, users cannot customize how the client determines if an operation is safe to retry upon transient failures.
**Describe the solution you'd like**
To align with the public [Cloud Storage Retry Strategy](https://docs.cloud.google.com/storage/docs/retry-strategy), the Rust SDK should support a comprehensive idempotency framework, including:
1. **Configurable Policies:** A public API allowing users to dictate custom retry behaviors (e.g., enabling an "Always Retry" strategy).
2. **Conditional Evaluation:** Automatic inspection of [request preconditions](https://docs.cloud.google.com/storage/docs/request-preconditions) (e.g., `ifGenerationMatch`) to conditionally determine if an operation is safe to retry.
3. **Idempotency Tokens:** Automatic injection of the `x-goog-gcs-idempotency-token` header for applicable operations.
**Additional context**
Other official Google Cloud Storage SDKs (such as C++, Go, Java, and Python) natively support idempotency policy configurations. Bringing this to Rust will ensure feature parity and provide developers with safer retry mechanics.
- b/486788021, b/486789384, b/486789587, b/486821003
Contributor guide
Assessment
This issue has not been assessed yet.