amoghrajesh commented on code in PR #47407:
URL: https://github.com/apache/airflow/pull/47407#discussion_r1984486831
##########
task_sdk/tests/execution_time/test_task_runner.py:
##########
@@ -1153,10 +1160,12 @@ def execute(self, context):
run(runtime_ti, log=mock.MagicMock())
- if isinstance(task_ids, str):
+ if not isinstance(task_ids, Iterable) or isinstance(task_ids, str):
task_ids = [task_ids]
for task_id in task_ids:
+ if task_id is None or isinstance(task_id, ArgNotSet):
+ task_id = runtime_ti.task_id
Review Comment:
Would just setting it to the "params" from pytest be more "correct"? This
assumes an internal logic that the `runtime_ti` would have it set, which is
correct but I'd like it to be more "readable" and "direct"
##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -292,7 +292,7 @@ def xcom_pull(
if task_ids is None:
# default to the current task if not provided
- task_ids = self.task_id
+ task_ids = [self.task_id]
Review Comment:
Ah its silly this was missed!
--
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]