dapr / python-sdk

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

[WORKFLOW QUESTION] RetryPolicy missing #718

Closed RamXX closed 2 months ago

RamXX commented 3 months ago

The Python example program here: https://github.com/dapr/python-sdk/tree/main/examples/demo_workflow performs this import: from dapr.ext.workflow.retry_policy import RetryPolicy, but the upon pip install of the latest version (dapr-ext-workflow-dev==0.2.0rc1.dev1781), RetryPolicy does not appear to be present. Looking at the init:

from dapr.ext.workflow.workflow_runtime import WorkflowRuntime
from dapr.ext.workflow.dapr_workflow_client import DaprWorkflowClient
from dapr.ext.workflow.dapr_workflow_context import DaprWorkflowContext, when_all, when_any
from dapr.ext.workflow.workflow_activity_context import WorkflowActivityContext
from dapr.ext.workflow.workflow_state import WorkflowState, WorkflowStatus

__all__ = [
    'WorkflowRuntime',
    'DaprWorkflowClient',
    'DaprWorkflowContext',
    'WorkflowActivityContext',
    'WorkflowState',
    'WorkflowStatus',
    'when_all',
    'when_any'
]

there is no Retry Policy. I look at all modules there and it doesn't appear to exist anymore, so the example fails. Please advice.

berndverst commented 2 months ago

Please use:

dapr-ext-workflow>=0.4.0
dapr>=1.13.0

The -dev version are in the examples to run our integration tests.

berndverst commented 2 months ago

Also note:

pip3 install dapr-ext-workflow-dev current installs dapr-ext-workflow-dev-0.2.0rc1.dev2031

And the import works there: from dapr.ext.workflow.retry_policy import RetryPolicy

Maybe your local dependencies were very outdated?

RamXX commented 1 month ago

Yes, this got solved recently. I now fix the dependency in the requirements file. Thanks!