-
Notifications
You must be signed in to change notification settings - Fork 736
Blueprint deprecation warning cmd #3988
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
src/rpc/multipass.proto
Outdated
| repeated Alias aliases_to_be_created = 10; | ||
| repeated string workspaces_to_be_created = 11; | ||
| bool password_requested = 12; | ||
| bool is_blueprint = 13; |
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.
Do we really need to go to all this trouble? Wouldn't a simple reply.set_log_line(warning_str); work in daemon::create_vm?
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.
See
multipass/src/daemon/daemon.cpp
Lines 987 to 989 in 6575e2c
| W reply{}; | |
| reply.set_log_line(deprecation_warning); | |
| server.Write(reply); |
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 think your approach is better. For some reason, I was under the impression that this is cmd only so the warning should be appended by the cmd client. That is why we have this protobuf message. However, that is not the case because one: the gui did not have the blueprint, two: even though it has, it should include the warning as well. So all in all, adding the warning message in the daemon is fine.
Second thing is at which reply message should we add the warning, I think yours which is just adding a new reply ahead of the original reply stream is simpler. The current implementation that made the first reply of original reply stream prepended with the warning is more cumbersome.
|
RIP Blueprints 🙁 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3988 +/- ##
==========================================
+ Coverage 89.34% 89.53% +0.19%
==========================================
Files 260 260
Lines 14738 14749 +11
==========================================
+ Hits 13167 13205 +38
+ Misses 1571 1544 -27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This reverts commit 8e603f7.
Co-authored-by: ScottH <59572507+sharder996@users.noreply.github.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
Co-authored-by: Ricardo Abreu <6698114+ricab@users.noreply.github.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
ee950e1 to
8a74d79
Compare
src/daemon/daemon.cpp
Outdated
| "Run `multipass help launch` for help, or find out more at:\n" | ||
| "- " | ||
| "https://documentation.ubuntu.com/multipass/en/latest/how-to-guides/manage-instances/" | ||
| "launch-customized-virtual-machines-with-multipass-and-cloud-init/\n" |
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.
The link is not working now but it should be working after the merge of the corresponding doc PR.
6c217a1 to
0e6b69f
Compare
|
@ricab @sharder996 I separated the doc part to another PR. So this PR is almost ready to merge. Since the last review, the only change is the last commit which is a change of the doc link. Can you guys quickly review that so we can get this merged as soon as possible? Thanks. |
Co-authored-by: ScottH <59572507+sharder996@users.noreply.github.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
Co-authored-by: ScottH <59572507+sharder996@users.noreply.github.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
|
@ricab @sharder996 , Can you guys quickly review the last commit so we can get this merged as soon as possible? Thanks. |
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.
Thanks Jia, this is what we need. Just a minor suggestion inline.
Co-authored-by: Ricardo Abreu <6698114+ricab@users.noreply.github.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
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.
Alright, LGTM!
|
@georgeliao This might be failing because of the disk space issue @ricab mentioned. |
|
@sharder996 I followed that loosely. Is it an issue on the "One Repo To Rule Them All" PR? Besides, the merge failure occurs across different machines (linux, macos, windows). Therefore, it is hard to link these two together. I will try a few times more and see what happens. |
https://warthogs.atlassian.net/browse/MULTI-1882
This PR introduces blueprint deprecation warnings to relevant commands, specifically
multipass findandmultipass launch.For
multipass find, the column header in the output table has been changed from "Blueprint" to "Blueprint (deprecated)" to reflect the deprecation status.For
multipass launch, the daemon determines whether the launch target is an image or a blueprint via an internal check. With that information, the code immediately send the first reply with the warning message ahead of the original reply stream. This enables the warning message shows up at the very beginning of the launch process.The functional testing should cover at least the cases below:
multipass launcha image does not show the warning message.multipass launcha blueprint shows the warning message.multipass findcommands that involve blueprint (multipass find,multipass find --only-blueprints) show theblueprints (deprecated)label in all supported output formats, including table, ymal, josn, and csv.