bbovenzi opened a new pull request, #76868: URL: https://github.com/apache/airflow/pull/76868
Two places in the UI hid Dag import errors. **Failed request looked like "no import errors".** `DagImportErrors` and `PluginImportErrors` defaulted the count to 0 and returned nothing before their `ErrorAlert` could render, so when the import-errors request failed, the Dashboard stats, the Dags list header badge and the Plugins page showed nothing at all. They now show the error alert, including next to an already-loaded count if a later refetch fails. A 403 still renders nothing, so users without permission to read import errors see no change (this was already the case for plugins and is now explicit for Dags). **Active Dags whose latest parse failed showed no import error.** The Dag header's status chip only looked up import errors for stale Dags. A Dag whose file starts failing to parse stays active (it keeps running its last good version), so its header showed no sign of the failure. The chip now looks up import errors for every Dag with a file location, and shows the parse error with error severity. A Dag that has gone from its file without a parse error is still reported as deactivated, as before. No new strings, no newsfragment (bug fix). ### Screenshots Bug 1, import-errors request returning 500 (mocked): | | Before | After | |---|---|---| | Dashboard | <img width="480" alt="dashboard-import-errors-request-failed-before" src="https://github.com/user-attachments/assets/4c2fda49-6451-4da4-bf65-81508233d6cc" /> | <img width="480" alt="dashboard-import-errors-request-failed-after" src="https://github.com/user-attachments/assets/b839a7d1-9e85-41fc-8268-4cef22deab39" /> | | Dags list | <img width="480" alt="dags-list-import-errors-request-failed-before" src="https://github.com/user-attachments/assets/326f18d1-a4bb-418a-8455-b7fccc4b3bf8" /> | <img width="480" alt="dags-list-import-errors-request-failed-after" src="https://github.com/user-attachments/assets/dfeb69bb-63b1-49a1-bbb3-bd43365bd5e3" /> | Bug 2, active `example_bash_operator` with a parse error for its file (mocked): | Before | After | After, chip opened | |---|---|---| | <img width="480" alt="active-dag-latest-parse-failed-before" src="https://github.com/user-attachments/assets/b4a745df-1c78-4f5d-a4eb-043271c6b17c" /> | <img width="480" alt="active-dag-latest-parse-failed-after" src="https://github.com/user-attachments/assets/729757c6-270f-437f-a5de-81ed7a9ccd0e" /> | <img width="480" alt="active-dag-latest-parse-failed-modal-after" src="https://github.com/user-attachments/assets/be4956d8-0a49-47e0-b687-be34c373ebce" /> | --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
