Support the binary store API (alpha) from Dapr 1.19
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by regenerating the protos with tools/regen_grpcclient.sh (DAPR_BRANCH=release-1.19) and confirm binarystore.proto appears. Then study the existing gRPC methods in dapr/clients/grpc/client.py and dapr/aio/clients/grpc/client.py to see how client-streaming and server-streaming calls are wrapped. Done means set, get and delete *_alpha1 methods exist in both clients, with tests and an examples/ app that uses binarystore.in-memory.
索引モデルが issue の本文から書いたものです。
説明
Summary
Dapr 1.19 adds the binary store building block as an alpha API. An app uses it to store, read and delete files as byte streams through a binary store component. The Python SDK has no client API for it yet. The .NET SDK already supports it, so its implementation is a reference for this work.
Runtime API
gRPC, in the Dapr service (binarystore.proto):
SetBinaryFileAlpha1is a client stream. The first message must containinitial_requestwithcomponent_name,file_nameandoverwrite, and it must arrive within 5 seconds. Each later message contains onepayloadchunk (common.v1.StreamPayload). Itsseqstarts at 0 and goes up by 1 for each chunk. Ifoverwriteis false (the default), the call fails when the file exists. Ifoverwriteis true, the call replaces the file.GetBinaryFileAlpha1returns a server stream ofpayloadchunks of up to 32 KiB, withseqfrom 0.DeleteBinaryFileAlpha1is a unary call.
HTTP, on /v1.0-alpha1/binarystore/{name}/{fileName}:
PUTstores the request body and replaces an existing file.POSTstores the request body, and returns 409 if the file exists.GETreturns the file asapplication/octet-stream.DELETEdeletes the file.
Components in 1.19: binarystore.aws.s3, binarystore.azure.blobstorage, binarystore.azure.datalake, binarystore.gcp.bucket, binarystore.oci.objectstorage and binarystore.in-memory.
Reference: the .NET SDK
- dapr/dotnet-sdk#1933 (merged) adds the
Dapr.BinaryStore.*packages.IDaprBinaryStoreClienthas these methods:SetBinaryFileAsync, from a stream or a byte buffer, withoverwriteand a 32 KiB default chunk sizeGetBinaryFileChunksAsync,GetBinaryFileAsync(to a stream) andGetBinaryFileBytesAsyncDeleteBinaryFileAsync
- dapr/dotnet-sdk#1935 (in review) adds an example app.
- dapr/docs#5388 (in review) adds the .NET SDK docs.
Related links: the proposal (dapr/proposals#88), the runtime implementation (dapr/dapr#10367) and the components (dapr/components-contrib#4559 and dapr/components-contrib#4637). dapr/dotnet-sdk#1934 stores workflow data references in the binary store. That is a separate feature (dapr/dapr#8706), and it is not part of this issue.
Scope
- Generate the protos from Dapr 1.19 with
tools/regen_grpcclient.sh(for exampleDAPR_BRANCH=release-1.19). The script takes everyruntime/v1proto, so it picks upbinarystore.proto.mainandrelease-1.19do not have it yet. - Add set, get and delete
*_alpha1methods to the sync client (dapr/clients/grpc/client.py) and the async client (dapr/aio/clients/grpc/client.py). Set takes bytes or a file-like object and anoverwriteflag. Get returns bytes or an iterator of chunks. - Send the upload chunks in order after the initial request, with
seqfrom 0. - Add tests, and an example in
examples/that uses thebinarystore.in-memorycomponent. - Add docs to the Python SDK section of dapr/docs.
The API is alpha, so its names and behavior can change in a later release.
- 主要言語
- Python
- スター
- 274
- フォーク
- 157
- 平均マージ
- 5日 20時間
- マージ済み PR(30日)
- 71
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dapr/python-sdk のほかの issue
-
SDK Alignment of Workflow Examples再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンdapr-ext-workflow good first issue kind/enhancement P2
難易度 2/5 1〜2日 初心者へのやさしさ 72/100
dapr/python-sdk#853 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
ci/release-failure release
難易度 2/5 1〜3時間 初心者へのやさしさ 49/100
dapr/python-sdk#1311 ·
メンテナーはふだん 2 日以内に返信
-
[WORKFLOW SDK FEATURE REQUEST] Retry WaitForInstanceCompletion/Start on a server-sent CANCELLEDオープンdapr-ext-workflow kind/enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
dapr/python-sdk#1246 ·
メンテナーはふだん 2 日以内に返信
-
[BUG] subscribe_with_handler stops silently: async task can die or be collected, sync retry path exits, handler errors reconnect the stream対応中かも @CasperGN が 23 日前に担当しました。 オープンkind/bug
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
dapr/python-sdk#1233 ·
メンテナーはふだん 2 日以内に返信
-
[BUG] Configuration subscription stops permanently after the daprd sidecar restarts対応中かも @CasperGN が 19 日前に担当しました。 オープンkind/bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
dapr/python-sdk#1232 ·
メンテナーはふだん 2 日以内に返信
dapr/python-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#140958 ·
メンテナーはふだん 1 日以内に返信
-
Bisect issue233186オープンbisect
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dtcxzyw/llvm-bisect-service#548 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sallowayma-git/IELTS-practice#248 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
anthropics/claude-plugins-official#6763 · コメント 10 件 · リアクション 10 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信