abhishekbhakat commented on code in PR #58111:
URL: https://github.com/apache/airflow/pull/58111#discussion_r2523337456
##########
airflow-core/src/airflow/dag_processing/dagbag.py:
##########
@@ -552,7 +552,12 @@ def _process_modules(self, filepath, mods,
file_last_changed_on_disk):
pass
except Exception as e:
self.log.exception("Failed to bag_dag: %s", dag.fileloc)
- self.import_errors[relative_fileloc] = f"{type(e).__name__}:
{e}"
+ if self.dagbag_import_error_tracebacks:
+ self.import_errors[relative_fileloc] =
traceback.format_exc(
+ limit=-self.dagbag_import_error_traceback_depth
+ )
+ else:
+ self.import_errors[relative_fileloc] =
f"{type(e).__name__}: {e}"
Review Comment:
This helps raise the broken dag error on the UI
--
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]