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

[I] Allow retrieving Variable from Task Context [airflow]

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

   Similar to https://github.com/apache/airflow/pull/45043, we need a similar thing for Task SDK to fetch Variable from Task Context.
   
   Requirement:
   - A minimal `Variable` user-facing object in Task SDK definition for use in the DAG file
   - Logic to get `Variable` in the context. 
   
   https://github.com/apache/airflow/blob/f03b1d4d996cf2b3f62c21f8c6a38aa53ba1e3be/airflow/models/taskinstance.py#L1043-L1046
   
   https://github.com/apache/airflow/blob/f03b1d4d996cf2b3f62c21f8c6a38aa53ba1e3be/airflow/utils/context.py#L117-L138
   
   
   Now, we will need following 3 related objects:
   - `VariableResponse` is auto-generated and tightly coupled with the API schema.
   - `VariableResult` is runtime-specific and meant for internal communication between Supervisor & Task Runner.
   - `Variable` class here is where the public-facing, user-relevant aspects are exposed, hiding internal details.
   


-- 
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] Allow retrieving Variable from Task Context [airflow]

Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh closed issue #45421: Allow retrieving Variable from Task Context
URL: https://github.com/apache/airflow/issues/45421


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