Skip to content

[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError) #2183

Backlog

Description

@antmendoza

Description:

The workflow runs a Local Activity that times out (start_to_close_timeout, retries exhausted), catches ActivityError, and calls workflow.sleep() in the except.

 try:
            # Attempt 1 times out; its 10s backoff is over the 5s threshold, so the worker records a
            # failure marker and a backoff timer. Attempt 2 times out and the error reaches this code.
            await workflow.execute_local_activity(
                slow_check,
                start_to_close_timeout=timedelta(seconds=5),
                retry_policy=RetryPolicy(initial_interval=timedelta(seconds=10), maximum_attempts=2),
                local_retry_threshold=timedelta(seconds=5),
            )
        except ActivityError:
            await workflow.sleep(timedelta(seconds=1), summary="sleep in except ActivityError")
        # Fails this workflow task so the worker evicts the run; the retry replays the whole history.
        raise RuntimeError("injected bug")

After the run is evicted and its history is replayed, the worker fails with [TMPRL1100]

Reproduced on version 1.34.0 and 1.37.0.

I've attached the reproduction.
_la_timeout_nde.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsdk-python

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions