Andrushika opened a new pull request, #73464:
URL: https://github.com/apache/airflow/pull/73464

   ## Why
   
   Airflow 3.3 added the task state store (AIP-103). A task can save a value 
under a key, and the value survives retries.
   
   The supervisor already handles the four `*TaskStateStore` messages and the 
Java SDK `schema.json` already has them. But nothing on the Kotlin side sends 
them. So Java tasks cannot use the store and `capabilities.yaml` lists 
`task-state-store` as unsupported.
   
   ## What
   
   Add `client.taskStateStore` with `get`, `set`, `delete` and `clear`. It is 
wired the same way as variables. `get` returns `null` when the key is not 
there. `set` takes an optional `java.time.Duration` retention.
   
   `SetTaskStateStore` is added to `REQUIRED_NULLABLE_REQUESTS`. Without it 
Jackson drops a null `expires_at` and the supervisor rejects the message. I 
checked this with the supervisor decoder.
   
   `java.rst` notes two differences from Python:
   - If users did not set retention, it means never expire. The JVM cannot read 
`default_retention_days` as Python does, so the coordinator would need to pass 
it to the JVM. I would rather keep that as a follow-up PR.
   - `[workers] state_store_backend` is not supported. The backend hooks run 
inside the Python task process today, so supporting it in the Java SDK needs a 
further design discussion.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Fable 5.1)
   
   Generated-by: Claude Code (Fable 5.1) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to