Skip to content

[Bug] External Storage S3 driver claimData hash keys are camelCase; Go/Python use snake_case — cross-SDK retrieval fails #2277

Description

@enikey87

What are you really trying to do?

Use External Storage (S3) across SDKs: a TypeScript client/worker offloads payloads that Python (or Go) workers must retrieve, per the cross-SDK claim-check design.

Describe the bug

The official S3 drivers disagree on the claimData key names for the content hash:

  • Go (contrib/aws/s3driver/driver.go): claimKeyHashAlgorithm = "hash_algorithm", claimKeyHashValue = "hash_value"
  • Python (temporalio.contrib.aws.s3driver._driver): "hash_algorithm" / "hash_value"
  • TypeScript (@temporalio/external-storage-s3, 1.21.1 and current main, contrib/external-storage-s3/src/driver.ts): hashAlgorithm / hashValue (camelCase)

bucket and key match everywhere, so the mismatch surfaces only at integrity validation: a Python worker retrieving a TS-offloaded payload fails with

ValueError: S3StorageDriver claim is missing required content hash information [bucket=..., key=v0/ns/default/wt/...]: claim_data must contain 'hash_algorithm' and 'hash_value'

and the activity task retries forever ("Failed decoding arguments"). The reverse direction (TS retrieving a Python/Go-written claim) fails the same way inside the TS driver (claimData must contain 'hashAlgorithm' and 'hashValue').

Minimal Reproduction

  1. TS client with externalStorage (S3 driver, MinIO endpoint) starts a workflow with an input above the threshold; workflow calls an activity on a Python worker configured with the same bucket via temporalio.contrib.aws.s3driver.
  2. Python worker fails to decode the activity input with the error above. Inspecting the stored claim shows {"bucket": ..., "key": ..., "hashAlgorithm": "sha256", "hashValue": ...}.

Environment/Versions

  • TypeScript SDK 1.21.1 (@temporalio/external-storage-s3@1.21.1), also present on main
  • Python SDK 1.31.0 (also 1.28.0)
  • Go contrib/aws/s3driver on master agrees with Python

Additional context

Since Go and Python both use snake_case, aligning the TS driver to hash_algorithm/hash_value (ideally with a tolerant reader for claims already written in camelCase) seems like the compatible fix. Happy to PR if that direction is confirmed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions