Skip to content

Conversation

@georgeliao
Copy link
Contributor

@georgeliao georgeliao commented Mar 19, 2025

https://warthogs.atlassian.net/browse/MULTI-1882

This PR introduces blueprint deprecation warnings to relevant commands, specifically multipass find and multipass 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:

  1. multipass launch a image does not show the warning message.
  2. multipass launch a blueprint shows the warning message.
  3. multipass find commands that involve blueprint (multipass find, multipass find --only-blueprints) show the blueprints (deprecated) label in all supported output formats, including table, ymal, josn, and csv.

repeated Alias aliases_to_be_created = 10;
repeated string workspaces_to_be_created = 11;
bool password_requested = 12;
bool is_blueprint = 13;
Copy link
Collaborator

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?

Copy link
Collaborator

Choose a reason for hiding this comment

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

See

W reply{};
reply.set_log_line(deprecation_warning);
server.Write(reply);

Copy link
Contributor Author

@georgeliao georgeliao Mar 19, 2025

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.

@townsend2010
Copy link
Contributor

RIP Blueprints 🙁

@codecov
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.53%. Comparing base (7cb6b2b) to head (4a0f004).
Report is 3491 commits behind head on main.

Files with missing lines Patch % Lines
src/daemon/daemon.cpp 85.71% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@georgeliao georgeliao requested review from ricab and sharder996 March 19, 2025 16:37
sharder996
sharder996 previously approved these changes Mar 21, 2025
@georgeliao georgeliao force-pushed the blueprint_deprecation_warning branch from ee950e1 to 8a74d79 Compare April 7, 2025 11:02
"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"
Copy link
Contributor Author

@georgeliao georgeliao Apr 7, 2025

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.

@georgeliao georgeliao force-pushed the blueprint_deprecation_warning branch from 6c217a1 to 0e6b69f Compare April 8, 2025 09:52
@georgeliao georgeliao changed the title Blueprint deprecation warning added Blueprint deprecation warning cmd Apr 8, 2025
@georgeliao
Copy link
Contributor Author

@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.

georgeliao and others added 3 commits April 11, 2025 11:45
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 ricab requested review from ricab and sharder996 April 14, 2025 14:47
@georgeliao
Copy link
Contributor Author

@ricab @sharder996 , Can you guys quickly review the last commit so we can get this merged as soon as possible? Thanks.

sharder996
sharder996 previously approved these changes Apr 23, 2025
Copy link
Collaborator

@ricab ricab left a 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>
Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

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

Alright, LGTM!

@ricab ricab enabled auto-merge April 23, 2025 16:12
@ricab ricab added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@sharder996 sharder996 added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@georgeliao georgeliao added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 24, 2025
@georgeliao georgeliao added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@georgeliao georgeliao added this pull request to the merge queue Apr 24, 2025
@sharder996
Copy link
Collaborator

@georgeliao This might be failing because of the disk space issue @ricab mentioned.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 25, 2025
@georgeliao
Copy link
Contributor Author

@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.

@georgeliao georgeliao added this pull request to the merge queue Apr 25, 2025
Merged via the queue into main with commit dbf3c7c Apr 25, 2025
15 checks passed
@georgeliao georgeliao deleted the blueprint_deprecation_warning branch April 25, 2025 12:00
@ricab ricab added this to the 1.16.0 milestone Jun 13, 2025
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.

4 participants