dapr / python-sdk

Dapr SDK for Python
Apache License 2.0
221 stars 125 forks source link

[WORKFLOW SDK BUG] None Check is missing in the WorkflowState to_json #691

Closed amichel closed 2 months ago

amichel commented 4 months ago

Expected Behavior

Always get a valid JSON using the to_json method

Actual Behavior

When workflow completes successfully, to_json (and str) methods fail with Exception calling application: 'NoneType' object has no attribute 'message'

Steps to Reproduce the Problem

  1. Run any Workflow to completion, such that failure_details is absent from the workflow state.
  2. Call either get_state or wait_for_workflow_completion
  3. Call to_json on the returned state object

Release Note

RELEASE NOTE:

elena-kolevska commented 3 months ago

LGTM. It's a simple enough change, I also confirmed it locally, but I would feel better if we added a little test for it, though.

berndverst commented 2 months ago

@akshaya-a please reply on this issue with /assign to get credit for addressing it.

berndverst commented 1 month ago

dapr-ext-workflow release candidate version v0.5.0rc1 with this change is now released. FYI