Skip to content

Wire async task state access for AIP-98 async tasks #66842

@amoghrajesh

Description

@amoghrajesh

async tasks (AIP-98, in 3.2) run in the triggerer event loop but the current task state and asset state accessors are synchronous and calling them blocks the event loop. Currently, all context accessors — variables, connections, XCom, and task state, go through SUPERVISOR_COMMS.send() which is synchronous and blocks the event loop on every call. No async client path exists in the SDK yet.

The server-side async methods (aget/aset/adelete/aclear) on MetastoreStateBackend already exist. The gap is entirely client-side.

One potential approach would be to:

  • Add async methods to the relevant operations in task sdk client
  • Add async def get/set/delete/clear to TaskStateAccessor (and other accessors) that bypass supervisor comms and hit the execution API directly via async HTTP
  • Wire the async context at task startup when running in triggerer mode

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions