You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/08 11:02:23 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #18084: Change XCom class methods to accept run_id argument

kaxil commented on a change in pull request #18084:
URL: https://github.com/apache/airflow/pull/18084#discussion_r704311443



##########
File path: airflow/models/xcom.py
##########
@@ -55,6 +56,17 @@ class BaseXCom(Base, LoggingMixin):
     task_id = Column(String(ID_LEN, **COLLATION_ARGS), primary_key=True)
     dag_id = Column(String(ID_LEN, **COLLATION_ARGS), primary_key=True)
 
+    # For _now_, we link this via execution_date, in 2.3 we will migrate this table to use run_id too
+    dag_run = relationship(
+        "DagRun",
+        primaryjoin="""and_(
+            BaseXCom.dag_id == foreign(DagRun.dag_id),
+            BaseXCom.execution_date == foreign(DagRun.execution_date)
+        )""",

Review comment:
       Is this passed as string for late evaluation?




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org