You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ashb (via GitHub)" <gi...@apache.org> on 2024/11/29 16:25:27 UTC

[I] Pass "real" TaskInstance object with xcom methods in context to task execute functions [airflow]

ashb opened a new issue, #44481:
URL: https://github.com/apache/airflow/issues/44481

   The K8s system tests are running https://github.com/apache/airflow/blob/cd5ccf0abf5027cf457b36a8a2bee397dcb538b4/airflow/example_dags/example_xcom.py and this is currently failing as we don't pass `ti` to the operator `execute()` function.
   
   (We currently pass `task_isntance,` not `ti`, but even passing it as `ti` wouldn't work as the simple class we have for TI in TaskSDK doesn't have `xcom_pull` or `xcom_push` methods.


-- 
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.apache.org

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


Re: [I] Pass "real" TaskInstance object with xcom methods in context to task execute functions [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed issue #44481: Pass "real" TaskInstance object with xcom methods in context to task execute functions
URL: https://github.com/apache/airflow/issues/44481


-- 
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: [I] Pass "real" TaskInstance object with xcom methods in context to task execute functions [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on issue #44481:
URL: https://github.com/apache/airflow/issues/44481#issuecomment-2532826658

   
   https://github.com/apache/airflow/blob/b3f36493aec69e34d68a248ec8257bff498665a5/airflow/models/taskinstance.py#L1009-L1048
   
   
   Template ref: https://airflow.apache.org/docs/apache-airflow/stable/templates-ref.html
   
   The plan is to:
   
   - Get certain `key:value` pairs from the API Server and pass it as a response to start the request to the API server (with `TIEnterRunningPayload`)
   - Augment it with `key:value` pairs from the Task Execution Interface (execution side of the Task SDK)
   
   As a goal: I am planning to get as much info as possible on the Execution side itself as opposed to getting it from the API server


-- 
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: [I] Pass "real" TaskInstance object with xcom methods in context to task execute functions [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on issue #44481:
URL: https://github.com/apache/airflow/issues/44481#issuecomment-2537364046

   WIP branch: https://github.com/apache/airflow/compare/main...astronomer:airflow:task-context?expand=1


-- 
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: [I] Pass "real" TaskInstance object with xcom methods in context to task execute functions [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on issue #44481:
URL: https://github.com/apache/airflow/issues/44481#issuecomment-2563440240

   Next set of sub-tasks:
   
   - [ ] Push XCom if `BaseOperator.do_xcom_push` is True and if task returns a value
   - [ ] Move XCom serialization and deserialization methods to the Task SDK
   - [ ] Add support for Taskflow API in Task SDK & template rendering
   - [ ] Add support for getting connections via BaseHook (AIP-72)
   - [ ] Add support for `ti.get_current_context` in Task SDK


-- 
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