ashb commented on code in PR #46032:
URL: https://github.com/apache/airflow/pull/46032#discussion_r1930688744
##########
task_sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -315,3 +316,22 @@ def set_current_context(context: Context) ->
Generator[Context, None, None]:
expected=context,
got=expected_state,
)
+
+
+def context_update_for_unmapped(context: Context, task: BaseOperator) -> None:
+ """
+ Update context after task unmapping.
+
+ Since ``get_template_context()`` is called before unmapping, the context
+ contains information about the mapped task. We need to do some in-place
+ updates to ensure the template context reflects the unmapped task instead.
+
+ :meta private:
+ """
+ # TODO: Task-SDK this need to live in sdk too
+ from airflow.models.param import process_params
Review Comment:
Yeah, I just have been leaving `TODO task-sdk` comments all over the place
in my PRs so I have a string we can grep for is all
--
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]