Skip to content

workflow_id is not automatically propagated to tasks submitted outside a block scope #88

Description

@AymenFJA

workflow_id is propagated to tasks via the _workflow_id_ctx ContextVar, which is only set inside execute_block for the duration of a block's execution. Tasks submitted directly via function_task(...) outside of any block context receive workflow_id = None, even when the submission code runs logically within a named workflow. The workflow_scope() async context manager exists but must be manually wrapped by every caller; there is no mechanism for the engine to automatically associate directly submitted tasks with a parent workflow context.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions