Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check for appReadyMessage before previewing app #5265

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sharon-wang
Copy link
Member

@sharon-wang sharon-wang commented Nov 4, 2024

Implementation Notes

  • adds optional appReadyMessage property to RunAppOptions and DebugAppOptions
  • specify an appReadyMessage of 'Application startup complete' for FastAPI and Shiny apps, which leverage uvicorn and output that message when the app is ready
  • delete empty DebugConfiguration object from the positron-run-app.d.ts files, as I think they are unused?
  • modified the logging level in api.ts for a few messages
  • previewUrlInExecutionOutput now checks for both the app url and the appReadyMessage if provided,
    • an app is considered ready if:
      • the appReadyMessage was not provided and the app url has been matched; or
      • the appReadyMessage was provided and matched, and the app url has been matched
    • if the appReadyMessage was provided but not matched, and the app url has been matched, we'll time out of the raceTimeout, but the url will have been matched, so we'll still try to open the app in the Viewer

QA Notes

For apps that may output the server url before the app is ready, we need to check for the appReadyMessage before previewing the app.

Otherwise, the preview may fail because the app server is not ready to serve the app when the preview is requested.

In testing, fastapi apps were sometimes being previewed before the app was ready to serve the app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant