anasatzemoso opened a new pull request, #55262: URL: https://github.com/apache/airflow/pull/55262
This closes Airflow UI is broken when keeping url_prefix as empty string while registering FastAPI plugin https://github.com/apache/airflow/issues/55137 closes: https://github.com/apache/airflow/issues/55137 What happened: Registering a FastAPI plugin with an empty string as url_prefix caused the Airflow UI to break instead of failing safely. Root cause: The FastAPI plugin initialization logic did not validate the url_prefix field against empty string values, leading to invalid mounting of sub-applications and breaking the UI. The fix: This PR adds an explicit check for empty string url_prefix. If the value is empty, the plugin is skipped, an error is logged, and the failure is captured in plugins_manager.import_errors. These errors are also surfaced on the Plugins UI page, ensuring users are notified about the misconfiguration without the UI breaking. <img width="3065" height="1788" alt="ui-3" src="https://github.com/user-attachments/assets/d3ad9ee2-51f8-46f1-bb33-5557d2d05557" /> <img width="3065" height="1788" alt="ui-2" src="https://github.com/user-attachments/assets/1374b088-b26e-46b1-9a64-73044c1e67c5" /> <img width="3053" height="1831" alt="ui-1" src="https://github.com/user-attachments/assets/17420674-8c95-4daa-a0ef-9a093bc7addf" /> -- 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]
