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

Use rich cli in runserver #102

Merged
merged 4 commits into from
Apr 29, 2024
Merged

Use rich cli in runserver #102

merged 4 commits into from
Apr 29, 2024

Conversation

piercefreeman
Copy link
Owner

@piercefreeman piercefreeman commented Apr 29, 2024

Build CLI

This PR cleans up the runserver build processes to make it clearer what is occurring during project compilation and give users a time estimate for the remaining work. Right now we log:

  • App spawn duration (when we fully initialize the client application in new process space)
  • Frontend support file generation
  • Compilation of each SSR and frontend file via esbuild

The compilation of frontend files in particular is known to take some time, even with our parallel refactor. We show a per-file progress bar to incrementally update the status, which required a refactor to our rust/golang build layer to add a new python callback argument for the javascript builder. Rust handles the parallelism now instead of golang, which avoids the need to do unsafe pointer manipulation during the python->rust->go FFI.

Screenshot 2024-04-28 at 9 06 05 PM

Verbosity

As part of cleaning up the build pipeline, this PR reduces the verbosity of our regular logger to warnings and above. To modify the logging on a per-run basis users can override the MOUNTAINEER_LOG_LEVEL environment variable. This doesn't change the default log level for general instantiations of setup_logger, in case users are relying on the default level to log everything.

MOUNTAINEER_LOG_LEVEL="DEBUG" poetry run runserver

@piercefreeman piercefreeman force-pushed the feature/cli-verbosity branch from f332098 to 43ac126 Compare April 29, 2024 04:07
@piercefreeman piercefreeman added the Full Build Kick off a full build in CI label Apr 29, 2024
@piercefreeman piercefreeman force-pushed the feature/cli-verbosity branch from df0a7e9 to a792e07 Compare April 29, 2024 04:25
@piercefreeman piercefreeman force-pushed the feature/cli-verbosity branch from d2afcf4 to fb27240 Compare April 29, 2024 05:41
@piercefreeman piercefreeman merged commit 1692785 into main Apr 29, 2024
18 checks passed
@piercefreeman piercefreeman deleted the feature/cli-verbosity branch April 29, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Full Build Kick off a full build in CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant