googleapis / googleapis/google-cloud-rust

Feature Request: Configurable Idempotency Policy for Storage Client

Open
#5,974 0 comments 0 reactions 1 assignee Claimed by @xlai20 View on GitHub
api: storage priority: p3 type: feature request
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.