Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ch-remote: Make snapshot and restore config arguments required - #8331

Merged
rbradford merged 2 commits into
cloud-hypervisor:mainfrom
avagin:ch-remote
Jun 4, 2026
Merged

rbradford merged 2 commits into
cloud-hypervisor:mainfrom
avagin:ch-remote

Conversation

@avagin

@avagin avagin commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

The snapshot and restore commands in ch-remote had optional snapshot_config and restore_config arguments, but the implementation was unconditionally unwrapping them.

This change marks these arguments as required to handle the missing argument validation and report a proper error message instead of letting the application panic.

@avagin
avagin requested a review from a team as a code owner June 3, 2026 23:36

@likebreath likebreath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes are looking good. But please remove the Change-Id from the commit message, as that's not meaningful for upstream code base. Thank you.

avagin added 2 commits June 3, 2026 21:18
The snapshot and restore subcommands in ch-remote had optional
snapshot_config and restore_config arguments, but the implementation was
unconditionally unwrapping them.

This change marks these arguments as required to handle the missing
argument validation and report a proper error message instead of letting
the application panic.

Signed-off-by: Andrei Vagin <[email protected]>
server_api_error_display_modifier deserialized the JSON error response
into a `Vec<&str>`.  However, if the error message contained escaped
characters, it could not deserialize it into a borrowed string `&str`
because unescaping requires allocation. This resulted in a
deserialization error and a failure to print the error chain.

This change switches the deserialization target to `Vec<String>` to
allow allocation.

Signed-off-by: Andrei Vagin <[email protected]>
@avagin

avagin commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@likebreath Fixed. Thanks.

@rbradford rbradford left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! 🚀

@rbradford
rbradford added this pull request to the merge queue Jun 4, 2026
Merged via the queue into cloud-hypervisor:main with commit f9709d6 Jun 4, 2026
41 checks passed
@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Done in Cloud Hypervisor Roadmap Jul 8, 2026
@rbradford rbradford added the bug-fix Bug fix to include in release notes label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Bug fix to include in release notes

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants