Skip to content

[Bug] Missing Local Activites should fail WFT rather than retry-looping #845

Closed
@Sushisource

Description

@Sushisource

Describe the bug

Right now if an LA is invoked that doesn't exist, it will just retry at the activity level which doesn't make sense and will never work. It should fail the WFT. See temporalio/features#221

Minimal Reproduction

@workflow.defn
class MissingLocalActivityWorkflow:
    @workflow.run
    async def run(self, name: str) -> str:
        return await workflow.execute_local_activity(
            "whatever", name, schedule_to_close_timeout=timedelta(seconds=5)
        )


async def test_workflow_missing_local_activity(client: Client):
    async with new_worker(
        client, MissingLocalActivityWorkflow, activities=[say_hello]
    ) as worker:
        result = await client.execute_workflow(
            MissingLocalActivityWorkflow.run,
            "Temporal",
            id=f"workflow-{uuid.uuid4()}",
            task_queue=worker.task_queue,
        )
        assert result == "Hello, Temporal!"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions