kevinhongzl commented on code in PR #56346:
URL: https://github.com/apache/airflow/pull/56346#discussion_r2429960294


##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -2981,6 +2982,8 @@ def _deepcopy_task(t) -> SerializedOperator:
             return copy.deepcopy(t, memo)
 
         # Compiling the unique list of tasks that made the cut
+        if exclude_original:
+            matched_tasks = []

Review Comment:
   We calculate upstream and downstream tasks using task ids. Before this 
change, the original task ids were returned along with relative task ids. This 
clears all other mapped task instances that share the same task ids, even if 
they are not specified. (For instance, if `["task_a", 1]` is included in a 
payload, `["task_a"]` is returned and tis like`["task_a", 0]` and `["task_a", 
2]` will be selected as well.) Therefore we should exclude the original task 
ids, which is the `matched_task` here.



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