-
Notifications
You must be signed in to change notification settings - Fork 482
build providers: add API for friendly instance type names #2522
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
Conversation
Signed-off-by: Sergio Schvezov <[email protected]>
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.
Using friendly names is a good idea and it's necessary because "Launching a VM" is not technically accurate for lxd. Added a pondering about adding the action to it as well, considering other future build providers, but feel free to disagree.
snapcraft/cli/lifecycle.py
Outdated
@@ -100,7 +100,11 @@ def _execute( # noqa: C901 | |||
else: | |||
raise provider_error | |||
|
|||
echo.info("Launching a VM.") | |||
echo.info( | |||
"Launching a {}.".format( |
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.
I wonder if we should include the action itself in the per-provider supplied string. "Launching a VM" and "Launching a provider" sound correct, but if we have host or remote build providers, "Building on local host" could sound better than "Launching a local build". This could be supplied by e.g. get_instance_type_friendly_action() or something like that. It also could help translations if we get into this path later on.
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.
Sounds like a plan, but let me come up with a better classmethod name :-)
Codecov Report
@@ Coverage Diff @@
## master #2522 +/- ##
=========================================
Coverage ? 89.16%
=========================================
Files ? 201
Lines ? 13615
Branches ? 2057
=========================================
Hits ? 12140
Misses ? 1039
Partials ? 436
Continue to review full report at Codecov.
|
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.
It's a simpler solution that seems to do everything we need!
Signed-off-by: Sergio Schvezov [email protected]
./runtests.sh static
?./runtests.sh tests/unit
?