uranusjr commented on code in PR #70066:
URL: https://github.com/apache/airflow/pull/70066#discussion_r3608534148
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -2768,6 +2768,17 @@ def _update_state(dag: SerializedDAG, dag_run: DagRun):
backfill_id = dag_run.backfill_id
dag = dag_run.dag = cached_get_dag(dag_run)
if not dag:
+ if dag_run.bundle_version is not None and
dag_run.created_dag_version_id is None:
+ self.log.error(
+ "Queued DagRun '%s' for DAG '%s' has an unresolvable
pinned version "
+ "(bundle_version=%s, created_dag_version_id=None);
marking run as failed",
+ dag_run.run_id,
+ dag_run.dag_id,
+ dag_run.bundle_version,
+ )
+ dag_run.state = DagRunState.FAILED
Review Comment:
This should use `set_state()` instead
--
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]