ashb commented on code in PR #58111:
URL: https://github.com/apache/airflow/pull/58111#discussion_r2532037491


##########
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:
   Can you give me a full dag I can test myself please @abhishekbhakat? (Sorry 
to be a pain, but my spidey sense is tingling that something else is going on 
here, and this is just papering over the cracks)



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