Proposal: Google Cloud Storage external storage driver in contrib (mirror of aws/s3driver)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng việc đọc temporalio/contrib/aws/s3driver và prototype hiện có tại src/storage_gcs.py, sau đó xem lại snippet external-storage được liên kết trong temporalio/features. Thống nhất với các maintainer về bố cục khóa namespace, thư viện client và lựa chọn emulator cho các bài kiểm thử tích hợp; được xem là hoàn tất khi có thiết kế GCS driver được chấp thuận, triển khai SDK, các bài kiểm thử và snippet features song song.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
I'd like to contribute a Google Cloud Storage external-storage driver to temporalio/contrib, mirroring the structure and conventions of temporalio.contrib.aws.s3driver.
The s3driver landed via #1388 (#1390 was the proposal issue) and has been the obvious template for any cloud-provider object store. Filing this issue first per the contributor guidance — happy to defer the implementation until the design questions below have a maintainer-accepted answer.
What
A new contrib module at temporalio/contrib/gcp/gcsdriver/ that:
- Stores and retrieves Temporal payloads in GCS, gated by
ExternalStorage.payload_size_threshold. - Splits the same way s3driver does —
_client.pyABC (no GCS dependency),_driver.pydriver, plus a built-in concrete client implementation (see design Q2 below for which library). - Ships under a
temporalio[google-cloud-storage](or similar) extra so the GCS dependency is opt-in. - Adds a parallel setup snippet to
temporalio/features. - Marked Experimental on first release, same as s3driver.
Why
We're running on Google Cloud and need GCS for external storage. With no first-party driver, we built one — the prototype linked below started as our own implementation. Rather than keep maintaining it as a one-off, we'd like to get it into contrib alongside s3driver so the rest of the GCP community doesn't have to repeat the work. Today the options for Temporal users on GCP are roll your own driver or run an S3-compatible proxy in front of GCS; a first-party GCS driver matches what s3driver already provides for AWS — content-addressed dedup, integrity verification, atomic writes, async-safe under concurrent workflows.
Existing prototype
I've built a working version that I plan to fully rework against your conventions: https://github.com/gamepop/adk-temporal-demo/blob/main/src/storage_gcs.py
The structural choices that match s3driver: ABC + adapter split, content-addressed keys, SHA-256 integrity verification on retrieve, custom user-agent and blob metadata for forensic tooling. The structural choices that don't match s3driver are the basis of the design questions below — I'd rather align with your patterns than ship divergence.
Design questions for maintainers
I'd appreciate guidance on these before I open a PR:
1. Key structure: should we adopt s3driver's namespace/workflow scoping?
s3driver writes under v0/ns/{namespace}/wfi/{workflow_id}/d/sha256/{hash}. My prototype uses pure content addressing (v0/d/sha256/{hash}) which dedups across workflows and namespaces. The s3driver pattern preserves namespace isolation — important in multi-tenant deployments. I'd default to matching s3driver unless there's a reason GCS should diverge.
2. Built-in client: sync google-cloud-storage + asyncio.to_thread, or async gcloud-aio-storage?
s3driver uses aioboto3 (natively async). The official Google library google-cloud-storage is sync-only; the community library gcloud-aio-storage is fully async and well-maintained but isn't a Google project. My prototype wraps the sync library in asyncio.to_thread — works but adds thread-pool pressure under heavy concurrency. Strong preference here from the team?
3. Test infrastructure: storage-testbench for integration tests?
Following s3driver's pattern (moto for integration, in-process fake for unit tests), I'd plan to use storage-testbench as the integration layer. It's maintained by the googleapis org, used by Google's own client libraries for their CI, and supports STORAGE_EMULATOR_HOST for the official Python library. It also offers failure injection via x-goog-emulator-instructions headers (e.g. return-503-after-256K/retry-1) — the parallel of moto's retry-test API, which we'd want for testing DEFAULT_RETRY_IF_GENERATION_SPECIFIED behavior under transient failures. fake-gcs-server is a more widely-known community alternative; I'd treat it as a fallback if storage-testbench has CI friction, but it doesn't explicitly document the if_generation_match semantics the driver relies on. For unit tests we'd keep an in-process fake client, mirroring s3driver's split.
What I'd commit to
- Sign the CLA.
- Open the SDK PR with the file structure, key layout, and built-in client choice that you've signed off on here.
- Open the parallel snippet PR against
temporalio/features. - Maintain the driver — happy to be on the hook for follow-up issues post-merge.
Thanks!
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 252
- Merge trung bình
- 4 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 50
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của temporalio/sdk-python
-
Workflow sandbox re-imports annotated_types, so pydantic silently drops constraintsCó thể đã có người làm @tconley1428 đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
temporalio/sdk-python#1897 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
temporalio/sdk-python#496 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Heartbeat Task Slot information is not pulled when MetricBuffer is configuredCó thể đã có người làm @Sushisource đã nhận 25 ngày trước. Đang mởbug
temporalio/sdk-python#1817 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cloud CI Skips Nexus TestsCó thể làm lại được @tconley1428 đã nhận 53 ngày trước và không có pull request nào đang mở. Đang mở
temporalio/sdk-python#1704 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows ARM64 wheel supportĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
temporalio/sdk-python#1592 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của temporalio/sdk-python
Issue tương tự
-
camlight produces degenerate target camera and light framesCó thể đã có người làm @kavyabhand đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google-deepmind/mujoco_warp#1743 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
netbird: Update to 0.80.0Đang mởPackage: Update Request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
getsolus/packages#10933 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[work-item] adam-adae-serious-events: pin missing-AESER filter semanticsCó thể đã có người làm @muse-yamaa-bot đã nhận hôm nay. Đang mởwork-item
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Non-vision image fallback calls vision_analyze with an empty source for oversized inline images and tells the model the image is corruptCó thể đã có người làm @liuhao1024 đã nhận hôm nay. Đang mởcomp/agent P2 tool/vision type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#132605 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pymc-labs/pymc-marketing#3102 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày