uranusjr commented on code in PR #63030:
URL: https://github.com/apache/airflow/pull/63030#discussion_r3409297970


##########
task-sdk/tests/task_sdk/execution_time/test_task_runner.py:
##########
@@ -3644,6 +3644,35 @@ def deserialize_value(cls, result):
         ]
         assert result == expected
 
+    def test_xcom_pull_with_explicit_dag_id_and_run_id(self, 
create_runtime_ti, mock_supervisor_comms):
+        task = BaseOperator(task_id="parent_task")
+        runtime_ti = create_runtime_ti(task=task, dag_id="parent_dag", 
run_id="parent_run")
+        value = {"child_result": "hello world"}
+        ser_value = BaseXCom.serialize_value(value)
+
+        mock_supervisor_comms.send.return_value = 
XComSequenceSliceResult(root=[ser_value])
+
+        assert (

Review Comment:
   Separate the `xcom_pull` call to a separate statement for easier debugging.



##########
airflow-core/docs/core-concepts/xcoms.rst:
##########
@@ -49,6 +49,16 @@ Many operators will auto-push their results into an XCom key 
called ``return_val
     # Pulls the return_value XCOM from "pushing_task"
     value = task_instance.xcom_pull(task_ids='pushing_task')
 
+If you need to pull a value from a specific DAG run (for example, a DAG run 
triggered by
+``TriggerDagRunOperator``), specify both ``dag_id`` and ``run_id`` explicitly::

Review Comment:
   Prefer `.. code-block:: python` instead



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