Skip to content
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

snapshot: deprecate forward compatibility #4122

Merged

Conversation

bchalios
Copy link
Contributor

Changes

Forward compatibility refers to the ability of Firecracker to create snapshots for older version formats. This feature is now deprecated and it will be removed in a subsequent release. Snapshot support is in developer preview, so dropping support for it does not require us to increase Firecracker's major version.

In practice, deprecating this feature means that we deprecate the version field of the PUT /snapshot/create request. This commit, adds the "deprecated" header in the response of the endpoint if version is defined and documents the deprecation in CHANGELOG and snapshot documentation.

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

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet contribution quality standards.

  • This functionality cannot be added in rust-vmm.

@bchalios bchalios force-pushed the drop_snapshot_forward_compatibility branch from a67d36f to 7350c65 Compare September 21, 2023 15:10
@bchalios bchalios added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Sep 21, 2023
kalyazin
kalyazin previously approved these changes Sep 21, 2023
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (8f0c1b7) 83.10% compared to head (53f9dcf) 83.11%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4122   +/-   ##
=======================================
  Coverage   83.10%   83.11%           
=======================================
  Files         225      225           
  Lines       28545    28559   +14     
=======================================
+ Hits        23722    23736   +14     
  Misses       4823     4823           
Flag Coverage Δ
4.14-c7g.metal 78.69% <100.00%> (+0.01%) ⬆️
4.14-m5d.metal 80.48% <100.00%> (+0.01%) ⬆️
4.14-m6a.metal 79.63% <100.00%> (+0.01%) ⬆️
4.14-m6g.metal 78.69% <100.00%> (+0.01%) ⬆️
4.14-m6i.metal 80.47% <100.00%> (+0.01%) ⬆️
5.10-c7g.metal 81.59% <100.00%> (+0.01%) ⬆️
5.10-m5d.metal 83.14% <100.00%> (+<0.01%) ⬆️
5.10-m6a.metal 82.39% <100.00%> (+<0.01%) ⬆️
5.10-m6g.metal 81.59% <100.00%> (+0.01%) ⬆️
5.10-m6i.metal 83.14% <100.00%> (+<0.01%) ⬆️
6.1-c7g.metal 81.59% <100.00%> (+0.01%) ⬆️
6.1-m5d.metal 83.14% <100.00%> (+<0.01%) ⬆️
6.1-m6a.metal 82.39% <100.00%> (+<0.01%) ⬆️
6.1-m6g.metal 81.59% <100.00%> (+0.01%) ⬆️
6.1-m6i.metal 83.14% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/api_server/src/request/snapshot.rs 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ShadowCurse ShadowCurse left a comment

Choose a reason for hiding this comment

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

Shouldn't there be also changes in vmm/src/persist.rs? At least extra_version_check ant get_snapshot_data_version can be removed. Or do you want to do it in separate PR?

@bchalios
Copy link
Contributor Author

Shouldn't there be also changes in vmm/src/persist.rs? At least extra_version_check ant get_snapshot_data_version can be removed. Or do you want to do it in separate PR?

We are not dropping support for this now. We are calling it deprecated. I don't think we should remove anything at this point. Am I missing something?

@ShadowCurse
Copy link
Contributor

Oh yeah, my mistake. We should remove it in the next release, not this one.

@bchalios bchalios force-pushed the drop_snapshot_forward_compatibility branch 2 times, most recently from 9e80c09 to 178806f Compare September 22, 2023 08:49
Forward compatibility refers to the ability of Firecracker to create
snapshots for older version formats. This feature is now deprecated and
it will be removed in a subsequent release. Snapshot support is in
developer preview, so dropping support for it does not require us to
increase Firecracker's major version.

In practice, deprecating this feature means that we deprecate the
`version` field of the `PUT /snapshot/create` request. This commit, adds
the "deprecated" header in the response of the endpoint if `version` is
defined and documents the deprecation in CHANGELOG and snapshot
documentation.

Signed-off-by: Babis Chalios <[email protected]>
@bchalios bchalios force-pushed the drop_snapshot_forward_compatibility branch from 178806f to 20a4dc8 Compare September 22, 2023 08:52
@bchalios bchalios requested a review from kalyazin September 26, 2023 10:25
@bchalios bchalios merged commit 5b70cf9 into firecracker-microvm:main Sep 26, 2023
5 checks passed
@bchalios bchalios deleted the drop_snapshot_forward_compatibility branch September 26, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants