This is an automated email from the ASF dual-hosted git repository.

jasonliu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 5d9819fea58 Speed up 'Generate the FastAPI API spec' prek hook (~2min 
→ ~25s) (#64131)
5d9819fea58 is described below

commit 5d9819fea584df846a8f89d57d1b7137cd3b5ae4
Author: Daniel Standish <[email protected]>
AuthorDate: Mon Mar 23 20:16:03 2026 -0700

    Speed up 'Generate the FastAPI API spec' prek hook (~2min → ~25s) (#64131)
    
    The OpenAPI spec generation doesn't query the database — it only
    introspects FastAPI routes. Using postgres backend was adding ~90s of
    postgres container startup and migration overhead for no reason.
    Switching to sqlite cuts the hook from ~2 minutes to ~25 seconds.
---
 scripts/ci/prek/generate_openapi_spec.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ci/prek/generate_openapi_spec.py 
b/scripts/ci/prek/generate_openapi_spec.py
index b6ddcb64aed..b2d4d86df41 100755
--- a/scripts/ci/prek/generate_openapi_spec.py
+++ b/scripts/ci/prek/generate_openapi_spec.py
@@ -33,7 +33,7 @@ initialize_breeze_prek(__name__, __file__)
 
 cmd_result = run_command_via_breeze_shell(
     ["python3", 
"/opt/airflow/scripts/in_container/run_generate_openapi_spec.py"],
-    backend="postgres",
+    backend="sqlite",
     skip_environment_initialization=False,
 )
 

Reply via email to