uranusjr commented on code in PR #47275:
URL: https://github.com/apache/airflow/pull/47275#discussion_r2160682433
##########
airflow-core/src/airflow/dag_processing/bundles/manager.py:
##########
@@ -124,8 +126,9 @@ def parse_config(self) -> None:
@provide_session
def sync_bundles_to_db(self, *, session: Session = NEW_SESSION) -> None:
self.log.debug("Syncing DAG bundles to the database")
- stored = {b.name: b for b in session.query(DagBundleModel).all()}
- for name in self._bundle_config.keys():
+ stored = {b.name: b for b in
session.scalars(select(DagBundleModel)).all()}
+ active_bundle_names = set(self._bundle_config.keys())
+ for name in active_bundle_names:
Review Comment:
```suggestion
stored = dict(session.execute(select(DagBundleModel.name,
DagBundleModel)))
for name in self._bundle_config:
```
--
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]