Repository navigation
Description
Description
[workers] state_store_backend lets a deployment keep large task and asset state store values in external storage. In a Python task, the task process calls the backend. On set, it stores the value and writes only a marker like {"__airflow_state_ref__": "<ref>"} to the metadata DB. On get, it reads the value back from that ref (task-sdk/src/airflow/sdk/execution_time/context.py).
Java and Go tasks do not run this code. They send SetTaskStateStore / GetTaskStateStore to the supervisor, and the supervisor stores and returns the value as-is. The Java and Go docs list this as a limitation, and the TypeScript SDK in #73618 has the same note.
Use case/motivation
When [workers] state_store_backend is configured, Task State Store behaves differently for Python tasks and language SDK tasks:
- When a language SDK task reads a value stored as a backend reference, the supervisor returns the reference as-is instead of resolving it through the configured worker-side backend.
- When a language SDK task writes a value, the supervisor forwards the unprocessed value to the Execution API, so the full value is stored in the metadata database without invoking the configured worker-side backend.
The backend is implemented as a Python class, so reimplementing it in every language SDK would be impractical. One possible solution is to let the supervisor invoke the backend while handling Task State Store messages, allowing every language SDK to honor the worker configuration without implementing the backend itself.
Python tasks currently invoke the backend inside the task process, so moving or adding this handling to the supervisor requires further design discussion to avoid processing Python requests twice. I would appreciate maintainers' thoughts on the appropriate architecture.
Related issues
related: #73464, #73420, #73618, #74217
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
adityamukesh commentedon Oct 7, 2026
Hi maintainers, I would like to work on this issue.
🔍 Analysis & Requirement
Airflow introduces
[workers] state_store_backendto allow deployments to offload large task outputs and asset state values to remote object stores (S3, GCS, DB). However, in external language SDK tasks (Python / custom task execution runners), the task execution wrapper does not currently deserialize or configure the state store backend context, causing tasks relying on external state storage to fail to resolve or store outputs.🛠️ Proposed Implementation Plan
airflow/task/task_runner/and Python SDK interfaces to propagatestate_store_backendsettings.🧪 Testing Plan
tests/task/task_runner/validating that language SDK tasks correctly persist and retrieve values through a configured mock state store backend.Could you please assign this issue to me? Thanks!
Andrushika commentedon Oct 7, 2026
This is not a good first issue and need further discussion from maintainers. I suggest finding other issues to solve.