sjyangkevin commented on code in PR #54568:
URL: https://github.com/apache/airflow/pull/54568#discussion_r2286928114
##########
task-sdk/tests/task_sdk/execution_time/test_context.py:
##########
@@ -154,6 +154,26 @@ def test_context_to_airflow_vars_all_context(self,
create_runtime_ti):
"AIRFLOW_CTX_DAG_EMAIL": "[email protected]",
}
+ def test_get_template_context_return_same_context_object(self,
create_runtime_ti):
Review Comment:
still working on it, will push an update later this week. The followings are
the things I am looking at
* replace the test case with a test for outlet event extra
* understand the check `_iter_template_context_keys_from_original_return` in
pre-commit hook (or, prek) for `check_template_context_variable_in_sync.py`.
Since the change made in this PR update the assignment from `context: Context =
{ ... }` to `self._context = self._context or { ... }`. The AST is different
for static code analysis.
* This is related to the second item, whether I should implement the idea of
cache in this way. Is it intended to keep that context as a variable rather
than attribute. Or is it expected to create a new context object every time the
function is called?
Thanks,
--
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]