ephraimbuddy commented on code in PR #42913:
URL: https://github.com/apache/airflow/pull/42913#discussion_r1827481779
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -1760,18 +1760,19 @@ def _verify_integrity_if_dag_changed(self, dag_run:
DagRun, session: Session) ->
Return True if we determine that DAG still exists.
"""
- latest_version =
SerializedDagModel.get_latest_version_hash(dag_run.dag_id, session=session)
- if dag_run.dag_hash == latest_version:
+ latest_dag_version = DagVersion.get_latest_version(dag_run.dag_id,
session=session)
+ latest_dag_version_id = latest_dag_version.id if latest_dag_version
else None
+ if dag_run.dag_version_id == latest_dag_version_id:
Review Comment:
I decided to use `if TYPE_CHECKING` since we cannot have a non-existing
dag_version inside the scheduler. A PR is coming that will remove the deletion
of SerializedDAG with `airflow dags reserialize` command.
--
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]