uranusjr commented on code in PR #54383:
URL: https://github.com/apache/airflow/pull/54383#discussion_r2304560627
##########
airflow-core/src/airflow/cli/commands/dag_command.py:
##########
@@ -192,7 +193,11 @@ def dag_dependencies_show(args) -> None:
@providers_configuration_loaded
def dag_show(args) -> None:
"""Display DAG or saves its graphic representation to the file."""
- dag = get_dag(bundle_names=None, dag_id=args.dag_id, from_db=True)
+ from airflow.models.serialized_dag import SerializedDagModel
+
+ if not (dag := SerializedDagModel.get_dag(dag_id=args.dag_id)):
+ raise SystemExit(f"Can not find dag {args.dag_id!r} in database")
Review Comment:
Looks like it’s changed in #46849 (first released in 3.0.0). Before that,
this read from the dag bag (containing real dags) instead (read_from_db
defaults to False).
The PR seems to be related to dag bundles but I’m not exactly sure why it
needed to change this flag. Maybe @jedcunningham or @ambika-garg can provide
some context.
--
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]