The GitHub Actions job "Tests" on airflow.git/fix/dags-endpoint-performance has failed. Run started by GitHub user john-rodriguez-mgni (triggered by pierrejeambrun).
Head commit for run: f1a3a5c705ba7ee224838291ce3619d85d2ded60 / John Rodriguez <[email protected]> perf(api): optimize /ui/dags endpoint serialization This PR addresses a significant performance issue in the /ui/dags endpoint where page load times scaled poorly with the number of DAGs (12-16 seconds for just 25 DAGs in our testing). Two optimizations are implemented: 1. Cache URLSafeSerializer for file_token generation - Previously, a new URLSafeSerializer was instantiated and conf.get_mandatory_value() was called for every DAG - Now uses @lru_cache to create the serializer once and reuse it 2. Eliminate redundant Pydantic validation in response construction - The original pattern used model_validate -> model_dump -> model_validate which caused triple serialization overhead per DAG - Now validates once with DAGResponse.model_validate(), then uses model_construct() to build DAGWithLatestDagRunsResponse Together, these changes reduced page load time from 12-16 seconds to ~130ms in our dev environment. Co-authored-by: Cursor <[email protected]> Report URL: https://github.com/apache/airflow/actions/runs/21852266175 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
