uranusjr commented on code in PR #46626:
URL: https://github.com/apache/airflow/pull/46626#discussion_r1953984130
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -1695,7 +1697,8 @@ def _verify_integrity_if_dag_changed(self, dag_run:
DagRun, session: Session) ->
latest_dag_version = DagVersion.get_latest_version(dag_run.dag_id,
session=session)
if TYPE_CHECKING:
assert latest_dag_version
- if dag_run.dag_version_id == latest_dag_version.id:
+ dag_version_ids = dag_run.dag_versions(session=session)
+ if latest_dag_version.id in dag_version_ids:
Review Comment:
This is quite inefficient. We should have a way to do this in one query that
simply returns True or False instead of an entire list.
--
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]