Skip to content

call_activity_with_retry does not work with serializable payloads #224

@carlvitzthum

Description

@carlvitzthum

Hello! We at Nasuni are trying to use DurableContext.call_activity_with_retry in an orchestrator that passes JSON-serializable objects as payloads. We are hitting the following exception when switching from call_activity (which works perfectly) to call_activity_with_retry. Our serializable payload class has the required to_json and from_json static methods.

Orchestrator function 'MPUOrchestrator' failed: One or more errors occurred.
Exception: TypeError: Object of type DurablePayload is not JSON serializable

I believe the problem is quite simple: the CallActivityWithRetryAction class does not serialize the input during initialization. The expected serialization is shown here in CallActivityAction.

@davidmrdavid Would you like me to open a PR?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    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