You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jason810496 (via GitHub)" <gi...@apache.org> on 2026/06/09 06:10:21 UTC

[PR] Go-SDK: Expose task runtime context to coordinator-mode tasks [airflow]

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

   ## Why
   
   Java-SDK support accessing current context (TI, DagRun info). The Go-SDK should support the same functionality.
   
   ## What
   
   - Add a public `sdk.CurrentContext(ctx)` accessor returning a typed `RuntimeContext{TI, DagRun}`; it takes `ctx` explicitly since Go has no goroutine-local storage.
   - Populate it in the coordinator runtime (`RunTask`) from `StartupDetails`, stored under a dedicated context key.
   - Fix `StartupDetails` decoding, which read the scheduling timestamps from the top level of `ti_context` instead of the nested `dag_run` object the supervisor actually sends (so the dates were always empty).
   - Add e2e test asserting the fields surface end-to-end.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes, with help of Claude Code (Opus 4.8) 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Go-SDK: Expose task runtime context to coordinator-mode tasks [airflow]

Posted by "jason810496 (via GitHub)" <gi...@apache.org>.
jason810496 merged PR #68271:
URL: https://github.com/apache/airflow/pull/68271


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org