Skip to content

[v3-1-test] Speed up 'Generate the FastAPI API spec' prek hook (~2min → ~25s) (#64131)#64132

Merged
jason810496 merged 1 commit intov3-1-testfrom
backport-5d9819f-v3-1-test
Mar 24, 2026
Merged

[v3-1-test] Speed up 'Generate the FastAPI API spec' prek hook (~2min → ~25s) (#64131)#64132
jason810496 merged 1 commit intov3-1-testfrom
backport-5d9819f-v3-1-test

Conversation

@github-actions
Copy link

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.
(cherry picked from commit 5d9819f)

Co-authored-by: Daniel Standish 15932138+dstandish@users.noreply.github.com

… → ~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.
(cherry picked from commit 5d9819f)

Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com>
@boring-cyborg boring-cyborg bot added area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels Mar 24, 2026
@jason810496 jason810496 marked this pull request as ready for review March 24, 2026 03:26
@jason810496 jason810496 merged commit a10b2c6 into v3-1-test Mar 24, 2026
6 checks passed
@jason810496 jason810496 deleted the backport-5d9819f-v3-1-test branch March 24, 2026 03:27
vatsrahul1001 pushed a commit that referenced this pull request Mar 25, 2026
… → ~25s) (#64131) (#64132)

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.
(cherry picked from commit 5d9819f)

Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants