Skip the GCP availability lookup on non-interactive deploys

Merged
FA
3d ago
+36-8

Split out of #7054. Two-line change in the hosting CLI.

Changes

_resolve_deploy_provider called hosting.gcp_deploy_available(client) before checking interactive; a non-interactive deploy then threw the answer away and kept the app's current provider. Only make the request when a prompt can actually use it. Tests cover the non-interactive path for apps on no provider, fly, and gcp, and assert the interactive prompt still performs the lookup.

Measurement

One fewer authenticated HTTPS request (GET /orgs/{org}/provider-accounts/gcp/status) per non-interactive deploy, i.e. every CI deploy. I could not time it from the sandbox this was prepared in (the hosting host is blocked by its network policy); it is one round trip to build.reflex.dev, serialized before the export starts.

Type of change

  • Performance improvement (non-breaking)

Checklist

  • Tests added for the change; the full tests/units suite passes locally except the 14 reflex_bench/drivers/test_browser.py cases that need a Playwright browser launch, which fail identically on untouched main in this sandbox
  • ruff check, ruff format --check, codespell, and pyright reflex tests pass locally
  • News fragment added for every package touched

https://claude.ai/code/session_018nWB9r2HcC5tkT72UxWgGj


Generated by Claude Code