Repository navigation
fix(cli): report backend readiness after startup - #7416
kr1shna-exe wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Merging this PR will not alter performance
Comparing Footnotes
|
| notify_backend() | ||
| if backend_present and should_use_granian(): | ||
| console.print( | ||
| f"Frontend running at: [bold green]{url.rstrip('/')}/[/bold green]" |
There was a problem hiding this comment.
In dev mode with Granian (the default whenever uvicorn or gunicorn isn't installed), App running at: is never printed now. Nothing replaces it later either: the backend announces itself only through Backend running at:.
Tools outside this repo parse that line. docs/enterprise/testing.md:318 says the reflex-enterprise pytest plugin builds reflex_app.url, including frontend_path, by reading reflex's own "App running at:" line, and its default run_mode is dev. That plugin would stop finding the URL. reflex-bench needed a regex change in this PR for the same reason. The PR's own test confirms the line is gone: test_exec.py:177-178 asserts "App running at:" not in message for granian with a backend.
Fix: keep the App running at: text. One option is to print the frontend line as before and only move the backend line to lifespan startup. If the rename has to stay, treat it as a breaking change for log parsers, with a deprecation path.
Generated by Claude Code
Log parsers (the reflex-enterprise pytest plugin, reflex-bench) read the frontend URL from it. Only the backend line moves to lifespan startup.
Comments Outside DiffThese findings could not be posted inline.
|
|
@greptile-apps the "App Running" banner is unchanged from main. This push only reverted my earlier rename so dev output stays the same for anything reading it, so I'm leaving it as is here. |
|
That’s fair. Since the |
Summary
Fixes #7252.
The dev CLI could report a running backend after its worker failed to import the app. Granian readiness now follows successful ASGI lifespan startup.
What changed
Verification
/pingreturned 200. All test processes were stopped.Deployment notes
Tools parsing Granian dev logs should recognize
Frontend running at:for the frontend URL and wait forBackend running at:for backend startup. Production and legacy Uvicorn messages are unchanged.