Skip to content

[Bug] Helper execute activity doesn't work as expected #855

Open
@fernando0315

Description

@fernando0315

What are you really trying to do?

I'm having issue with creating helper function to execute activity. My main goal is to have execute activities with the same configuration. Without helper function it works just fine, but after creating a helper function and called it inside workflow, it asks to provide task queue. I would expect the code to behave exactly the same way.

Describe the bug

Code

async def execute_activity_base(
    temporal_activity,
    job_id,
    start_to_close_timeout=timedelta(hours=1),
):
    return await workflow.execute_activity(
        temporal_activity,
        job_id,
        start_to_close_timeout=start_to_close_timeout,
        retry_policy=RetryPolicy(
            initial_interval=timedelta(seconds=30),
            backoff_coefficient=2.0,
            maximum_attempts=3,
            maximum_interval=timedelta(seconds=10),
        ),
    )

Error message

2025-05-06T03:01:36.718693Z WARN temporal_sdk_core::worker::workflow: Error while completing workflow activation error=status: InvalidArgument, message: "invalid TaskQueue on ScheduleActivityTaskCommand: missing task queue name. ActivityId=3 ActivityType=estimated_generation", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "server": "temporal", "date": "Tue, 06 May 2025 03:01:36 GMT"} }

Minimal Reproduction

  1. Instead of calling workflow.execute_activity in workflow call the helper method defined above. And the method is define in a different file.

Environment/Versions

  • Temporal Version: 1.9.0

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