Arunodoy18 commented on issue #60059: URL: https://github.com/apache/airflow/issues/60059#issuecomment-3708068734
Hi, thanks for the detailed report — I’m able to reproduce this behavior locally with GitDagBundle on Airflow 3.1.x using the provided DAG. The UnboundLocalError is correctly caught during DAG parsing (as seen in the dag-processor logs), but it appears the error is not persisted to import_error when the DAG originates from a GitDagBundle. As a result, the DAG silently disappears from the UI instead of being surfaced under Import Errors, which is inconsistent with the behavior of LocalDagBundle and syntax-level failures. From an initial read, this seems related to how bundle-backed DAG file paths are mapped back to bundle URIs when persisting import errors. In the failure path, the physical file path under the Git bundle may not be correctly resolved, causing the DB insert to be skipped. I’d like to take this issue and work on a fix that: Ensures runtime errors during DAG factory execution are consistently recorded in import_error for GitDagBundle Aligns error reporting behavior across bundle types (Git vs Local) Adds or updates coverage to prevent silent failures in the UI I’ll start by tracing the error persistence flow in DagBag and the bundle path resolution logic, and will follow up with findings before opening a PR. Please let me know if there’s any specific context or prior discussion I should be aware of before proceeding. -- 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]
