Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dapr workflow doesn't work when Amazon DynamoDB is used as actor state store #3643

Open
distkloc opened this issue Jan 9, 2025 · 0 comments · May be fixed by #3658
Open

Dapr workflow doesn't work when Amazon DynamoDB is used as actor state store #3643

distkloc opened this issue Jan 9, 2025 · 0 comments · May be fixed by #3658
Labels
kind/bug Something isn't working

Comments

@distkloc
Copy link

distkloc commented Jan 9, 2025

Expected Behavior

Dapr workflow should complete without error when the actor state store is DynamoDB.
If the value which is saved in DynamoDB state store is any binary data, save it as DynamoDB binary data type.

Actual Behavior

The following error occurs when the workflow quickstart code runs.

2025/01/10 00:05:00 failed to start workflow: failed to start orchestrator: rpc error: code = Unknown desc = error from internal actor: InternalFailure: The request processing has failed because of an unknown error, exception or failure.
== APP - order-processor ==     status code: 500, request id: 263b9cb8-2ddd-4ef1-9bcc-402853c8319c
== APP - order-processor == exit status 1
The App process exited with error code: exit status 1

This is because DynamoDB state store doesn't fully support binary data value.
When a state is saved in DynamoDB state store, the value is converted to string. If the string contains invalid UTF-8 sequences, DynamoDB throws error.

スクリーンショット 2025-01-10 1 13 29

Steps to Reproduce the Problem

  1. Create DynamoDB table with primary key (attribute name: key)
  2. git clone https://github.com/dapr/quickstarts.git
  3. Remove workflows/components/statestore_redis.yaml
  4. Add workflows/components/statestore_dynamodb.yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: statestore
spec:
  type: state.aws.dynamodb
  version: v1
  metadata:
  - name: region
    value: ap-northeast-1
  - name: table
    value: dapr_state
  - name: actorStateStore
    value: "true"
  1. cd workflows/go/sdk
  2. dapr run -f .

Release Note

RELEASE NOTE:

@distkloc distkloc added the kind/bug Something isn't working label Jan 9, 2025
@distkloc distkloc linked a pull request Jan 27, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant