ambika-garg commented on code in PR #45779:
URL: https://github.com/apache/airflow/pull/45779#discussion_r1948130319


##########
airflow/cli/commands/remote_commands/dag_command.py:
##########
@@ -328,7 +332,10 @@ def dag_list_dags(args, session=NEW_SESSION) -> None:
             f"List of valid columns: {list(dag_schema.fields.keys())}",
             file=sys.stderr,
         )
-    dagbag = DagBag(process_subdir(args.subdir))
+
+    dagbag = DagBag(read_dags_from_db=True)
+    dagbag.collect_dags_from_db()
+
     if dagbag.import_errors:

Review Comment:
   I see that import errors are stored in the `import_error` table, and 
`collect_dags_from_db()` collects DAGs from the `serialized_dag` table. Should 
I create a function like `collect_import_errors_from_db()`?  
   
   We would also need to update `list-import-errors`.



-- 
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]

Reply via email to