Add sub-title for downloading and/or installing python packages #339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR uses the
publish/restorePythonEnv/status
event to fill out a subtitle for the "Restore Python Environment" progress step. You can see a preview of it in action below:Preview
CleanShot.2023-11-02.at.15.19.32.mp4
Intent
Resolves #299
Type of Change
Approach
The status event message gives us a few details:
status
which can be download, install, or a combination (denoted withdownload+install
)name
which is the package name being downloaded and/or installedversion
this can be an empty string, or contain a versionThis information is converted into a nicer, human readable string like: "Downloading and installing package: fastapi (0.103.2)"
Frequently the version isn't available.
Directions for Reviewers
Do a new deployment using the UI, and check out the new subtitle being generated. It must be a new deployment - if a python environment is cached then no status events get fired since no packages are being installed or downloaded, they are just used from cache.
To do this frequently I pointed the UI to publish to Yeti and would clear out the python environments that were created after each deployment with
rm -rf /yeti-volume/dev-saml/data/python-environments/pip/3.11.3/mAmALwYH07p1w_JRq4GU3g/
inside the yeti shell (just shell dev-saml
)