-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Refactor Snapshot Module #5195
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
base: main
Are you sure you want to change the base?
Refactor Snapshot Module #5195
Conversation
55300a5
to
b5949dc
Compare
Signed-off-by: Gabriel Keller <[email protected]>
Signed-off-by: Gabriel Keller <[email protected]>
Signed-off-by: Gabriel Keller <[email protected]>
Signed-off-by: Gabriel Keller <[email protected]>
Signed-off-by: Gabriel Keller <[email protected]>
Signed-off-by: Gabriel Keller <[email protected]>
b5949dc
to
5036ba7
Compare
…x uses of snapshot Signed-off-by: Gabriel Keller <[email protected]>
Heya, thanks for picking this up, this is a great start! Our CI doesn't start running without one of us actually manually unblocking, so it's probably a quicker turnabout for you if you locally set up a rust toolchain via rustup. Even if you don't have a linux dev box, cargo's cross-target support for compile testing is pretty good, so you should be able to catch most problems that way (e.g. just doing I also had an early look and got some early feedback :)
|
Thanks for the feedback. I've gotten rustup set up, will be sure to run it more frequently to make sure build/lint/tests passes. Also, I do see the Git linting issues, good suggestion to squash all my commits once I get build/lint/tests passing and am ready for review. Are you also suggesting I squash @beamandala's commits in with my own? They said here that it would be okay for me to pick up the work, but I just wanted to check to see if it was appropriate to squash their commits with mine since they weren't signed off and may not have been passing. As for the missing definitions, duplicate definitions, etc., I'm not sure what happened here -- I must have misused a Git command somewhere down the line, I will fix this. My plan was to have Snapshot's load internally call SnapshotHdr's load so that the logic behind handling headers, recognizing magic values, etc. is separated. |
Draft PR as I finish the migration to new API and run linting/tests/build.
Changes
snapshot/mod.rs
to reflect structure noted in Rustify Snapshot Module #4523 and changes requested in draft PR Rustify snapshot module #4691:Reader
withCrcReader
and pass intoload_unchecked
)Reason
I took on @beamandala's draft PR with their permission to finish up the work. These changes were made so that the API would be easier to use / fall in line with general Rust conventions.
Instead of doing the following:
Which allows for incomplete variants of Snapshot (snapshots without data), the following is now done:
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md
.Runbook for Firecracker API changes.
integration tests.
TODO
.rust-vmm
.