Lee-W commented on code in PR #46633:
URL: https://github.com/apache/airflow/pull/46633#discussion_r1957475144
##########
providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:
##########
@@ -268,18 +266,16 @@ def execute(self, context: Context):
@provide_session
def execute_complete(self, context: Context, session: Session, event:
tuple[str, dict[str, Any]]):
- # This logical_date is parsed from the return trigger event
- provided_logical_date = event[1]["logical_dates"][0]
+ # This run_ids is parsed from the return trigger event
+ provided_run_id = event[1]["run_ids"][0]
try:
# Note: here execution fails on database isolation mode. Needs
structural changes for AIP-72
dag_run = session.execute(
- select(DagRun).where(
- DagRun.dag_id == self.trigger_dag_id, DagRun.logical_date
== provided_logical_date
- )
+ select(DagRun).where(DagRun.dag_id == self.trigger_dag_id,
DagRun.run_id == provided_run_id)
).scalar_one()
except NoResultFound:
raise AirflowException(
- f"No DAG run found for DAG {self.trigger_dag_id} and logical
date {self.logical_date}"
+ f"No DAG run found for DAG {self.trigger_dag_id} and run ID
{provided_run_id}"
Review Comment:
```suggestion
f"No dag run found for dag {self.trigger_dag_id} and run ID
{provided_run_id}"
```
##########
providers/standard/src/airflow/providers/standard/triggers/external_task.py:
##########
@@ -42,7 +42,7 @@ class WorkflowTrigger(BaseTrigger):
A trigger to monitor tasks, task group and dag execution in Apache Airflow.
:param external_dag_id: The ID of the external DAG.
- :param logical_dates: A list of logical dates for the external DAG.
+ :param run_ids: A list of run ids for the external DAG.
Review Comment:
```suggestion
:param run_ids: A list of run ids for the external dag.
```
--
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]