kaxil commented on code in PR #45509:
URL: https://github.com/apache/airflow/pull/45509#discussion_r1909068359


##########
task_sdk/tests/execution_time/test_task_runner.py:
##########
@@ -551,6 +551,40 @@ def execute(self, context):
     )
 
 
[email protected](
+    "task_ids",
+    [
+        "push_task",
+        ["push_task1", "push_task2"],
+        {"push_task1", "push_task2"},
+    ],
+)
+def test_xcom_pull_behavior(mocked_parse, make_ti_context, 
mock_supervisor_comms, spy_agency, task_ids):

Review Comment:
   I meant we should have a test that fails if you didn't handle the string 
case in the code.
   
   As an example, comment the handling of `string` code as below, and run this 
test, it still passes -- which isn't ideal 
   
   ```diff
   diff --git a/task_sdk/src/airflow/sdk/execution_time/task_runner.py 
b/task_sdk/src/airflow/sdk/execution_time/task_runner.py
   index 09b663cd12..c557b0a769 100644
   --- a/task_sdk/src/airflow/sdk/execution_time/task_runner.py
   +++ b/task_sdk/src/airflow/sdk/execution_time/task_runner.py
   @@ -215,8 +215,8 @@ class RuntimeTaskInstance(TaskInstance):
            if task_ids is None:
                # default to the current task if not provided
                task_ids = self.task_id
   -        elif isinstance(task_ids, str):
   -            task_ids = [task_ids]
   +        # elif isinstance(task_ids, str):
   +        #     task_ids = [task_ids]
            if map_indexes is None:
                map_indexes = self.map_index
            elif isinstance(map_indexes, Iterable):
   
   ```



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

Reply via email to