uranusjr commented on code in PR #61464:
URL: https://github.com/apache/airflow/pull/61464#discussion_r2839510928
##########
airflow-core/src/airflow/models/backfill.py:
##########
@@ -542,34 +615,94 @@ def _create_backfill(
session.add(br)
session.commit()
+ dag_model = session.scalar(select(DagModel).where(DagModel.dag_id ==
dag_id))
+ if not dag_model:
+ raise RuntimeError(f"Dag {dag_id} not found")
Review Comment:
Is this supposed to never happen? Maybe change this to
`session.scalars(...).one()` instead and let SQLAlchemy do its thing.
--
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]