-
Notifications
You must be signed in to change notification settings - Fork 2
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
[RPD-273] Improvements to the provision
user experience
#173
[RPD-273] Improvements to the provision
user experience
#173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far, are the INFRA_FACTS
meant to stack?:
✔ Matcha 🍵 initialized!
Samurai's drank Matcha before battles
Did you know that Matcha tea was created by accident?
Everything being provisioned is fully open source
Everything being provisioned is fully open source
The brewing temperature of the affects the taste of Matcha
Samurai's drank Matcha before battles
⠦ 0:02:59 Applying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far, haven't run it end to end yet but will before approving
src/matcha_ml/cli/constants.py
Outdated
|
||
INFRA_FACTS = [ | ||
"Did you know that Matcha tea was created by accident?", | ||
"The brewing temperature of the affects the taste of Matcha", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: brewing temperature of the what?
@@ -27,12 +27,14 @@ class AnalyticsEvent(str, Enum): | |||
|
|||
|
|||
def execute_analytics_event( | |||
func: Callable, *args, **kwargs | |||
func: Callable, *args: dict, **kwargs: dict # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what's going on with the type hints here, but should *args really be a dict not a list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/matcha_ml/cli/ui/spinner.py
Outdated
@@ -30,9 +30,14 @@ def __init__(self, status: str): | |||
) | |||
self.progress.add_task(description=status, total=None) | |||
|
|||
def __enter__(self) -> None: | |||
"""Call when a spinner object is created using a `with` statement.""" | |||
def __enter__(self): # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Just a thought - you could type this return with TypeVar or with a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I'll give it a try 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Love that you ran with this idea! 🙌 |
* [RPD-261] [BUG] destroy leads to missing matcha config file error (#165) * Update context managers to avoid erroring on destroy after remote bucket is removed * Update docstrings * Add tests for context managers new destroy parameter * [RPD-272] Updates to documentation (#166) * RPD-272 updates to pages based on ticket description * RPD-272 updated permissions * [RPD-276] [BUG] Turning analytics on causes hanging in the analytics service (#168) * [RPD-271] [BUG] Fix orphaned NetworkWatcherRG resource group (#167) * [RPD-279] [BUG] Automatically deal with stale states #170 * [RPD-273] Improvements to the `provision` user experience (#173) * RPD-273 added a terraform state update function and minor improvements to terraform service * RPD-273 updated typing and fixed pre-commit issues * RPD-273 undoing a change to the gitignore * RPD-273 updated docstrings + grammar * RPD-272 updated typing on context manager for Spinner * [RPD-274] [BUG] Fix inaccurate provisioning messages (#177) * Update message on Terraform apply for clarity * Update test with new message * Update base_runner.py * Fix test * Revert message parameter to empty string * [RPD-263] add inference of zenml version from environment (#178) * function checking local zenml version. * function checking local zenml version. * function checking local zenml version. * remove return from ds as there is none --------- Co-authored-by: Jonathan Carlton <[email protected]> Co-authored-by: KirsoppJ <[email protected]>
While
provision
is running, there isn't much output to the user besides the spinner. This is great, it gives them a sense of time but there's no context. In this PR, we add some output to the provision process to improve the experience for the user.There's a set of facts in the backend about the stack and Matcha (the drink) which are randomly selected and displayed to the user at a regular interval. For this to work, a separate thread is created while the
apply
call is running. This is then terminated once Terraform has finished.This PR also introduces
TerraformResult
which is an object containing the outcome of the calls to the Terraform Python library.Checklist
Please ensure you have done the following:
Type of change
Tick all those that apply: