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

Add sub-title for downloading and/or installing python packages #339

Merged
merged 6 commits into from
Nov 27, 2023

Conversation

dotNomad
Copy link
Collaborator

@dotNomad dotNomad commented Nov 2, 2023

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

  • Bug Fix
  • New Feature
  • Breaking Change

Approach

The status event message gives us a few details:

  • status which can be download, install, or a combination (denoted with download+install)
  • name which is the package name being downloaded and/or installed
  • potentially a version this can be an empty string, or contain a version

This 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)

@dotNomad dotNomad changed the title dotnomad/use python status events Add sub-title for downloading and/or installing python packages Nov 2, 2023
@dotNomad dotNomad marked this pull request as ready for review November 2, 2023 23:51
@dotNomad dotNomad force-pushed the dotnomad/use-python-status-events branch from 8869574 to 431a073 Compare November 3, 2023 00:35
Base automatically changed from dotnomad/status-events to main November 3, 2023 16:06
@dotNomad dotNomad force-pushed the dotnomad/use-python-status-events branch from 431a073 to 75ae661 Compare November 3, 2023 16:07
@dotNomad dotNomad linked an issue Nov 17, 2023 that may be closed by this pull request
Copy link
Collaborator

@sagerb sagerb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dotNomad dotNomad merged commit 21f8b43 into main Nov 27, 2023
17 checks passed
@dotNomad dotNomad deleted the dotnomad/use-python-status-events branch November 27, 2023 21:51
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.

Show Python package installs as PublishStep subtitle
2 participants