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:58:36 UTC
[GitHub] [airflow] ashb commented on a change in pull request #18084: Change XCom class methods to accept run_id argument
ashb commented on a change in pull request #18084:
URL: https://github.com/apache/airflow/pull/18084#discussion_r704348584
##########
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:
Yes, to avoid circular imports
--
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