amoghrajesh commented on code in PR #59282:
URL: https://github.com/apache/airflow/pull/59282#discussion_r2625854984
##########
task-sdk/src/airflow/sdk/bases/xcom.py:
##########
@@ -318,7 +318,7 @@ def get_all(
raise TypeError(f"Expected XComSequenceSliceResult, received:
{type(msg)} {msg}")
if not msg.root:
- return None
+ return []
Review Comment:
This is intentional. If you check this part:
https://github.com/apache/airflow/blob/main/task-sdk/src/airflow/sdk/execution_time/task_runner.py#L373-L385,
we translate empty list (`msg.root` being None) to a None to later filter it
properly in task runner. AKA, we translate no xcoms found to be `None` to
indicate that no xcoms were found and to keep AF2 behaviour.
So we cannot make it return `[]`. A better thing to do would be to add a
comment here explaining why its done.
--
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]