← Back to Pull requests

feat(clients): add Binary Store alpha APIs #1329

Closed
unknown closed this pull request without merging on Oct 27, 2026 10:18 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 11:39 UTC
Author

Description

This PR adds support for the Binary Store alpha API in the Python SDK, allowing developers to upload, download, and delete files through Dapr.

It introduces set_binary_file_alpha1, get_binary_file_alpha1, and delete_binary_file_alpha1 for both synchronous and asynchronous clients.

Uploads support bytes and binary file-like objects, while downloads can be streamed in chunks without loading the entire file into memory. The implementation also handles overwrites, timeouts, authentication, cancellation, and resource cleanup.

I've added unit and integration tests, sync/async examples, documentation, and dedicated CI validation for Dapr 1.19.

Updates after review:

  • Improved async cancellation handling to distinguish RPC cancellation from caller-initiated task cancellation.

  • Added safe cleanup for generator-wrapped downloads.

  • Added regression tests for API-token handling on existing configuration streaming RPCs. Configured tokens now reach SubscribeConfiguration and SubscribeConfigurationAlpha1 in both sync and async clients, without duplicating an identical caller-provided token.

  • Updated integration tests to use the actual sidecar endpoint instead of a hard-coded port.

  • Included Binary Store validation in the required CI check and added runtime version verification.

  • Clarified installation instructions for the examples.
  • Generated protobuf files:

    PR #1327 has already merged the Dapr v1.19.0-rc.5 generated bindings upstream, so they no longer appear as changes in this PR. I verified that regenerating all 57 files produces identical output. Integration CI uses the Dapr 1.19.0-rc.4 runtime.

    Validation:

  • Full non-e2e suite: 2,148 tests and 142 subtests passed.

  • Feature, integration, and example suite: 77 tests and 58 subtests passed.

  • Python 3.10 and minimum-supported gRPC compatibility checks passed, including actor reconnection tests.

  • Verified 5 MiB sync/async transfers with matching SHA-256 hashes.

  • Ruff, formatting, mypy, actionlint, protocol regeneration, and package build checks passed.
  • A corresponding documentation update is prepared for the Dapr 1.19 documentation branch.

    Known limitation: An upstream gRPC issue ([grpc/grpc#36066](https://github.com/grpc/grpc/issues/36066)) can occasionally return INTERNAL instead of the original server error during early async upload failures. This behavior remains documented and covered by regression tests.

    Issue reference

    Closes #1296

    Checklist

  • Code compiles correctly

  • Created/updated tests

  • Extended the documentation
  • Diff: 334 lines (+250 / -84) across 4 files Reviewer: sicoyle Review duration: 8558m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 334 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.348
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1329"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%