-
Notifications
You must be signed in to change notification settings - Fork 590
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
many: support creating recovery systems with components from the store #14883
base: master
Are you sure you want to change the base?
many: support creating recovery systems with components from the store #14883
Conversation
97dcdbc
to
f5b4456
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14883 +/- ##
==========================================
+ Coverage 78.20% 78.23% +0.02%
==========================================
Files 1151 1155 +4
Lines 151396 152952 +1556
==========================================
+ Hits 118402 119659 +1257
- Misses 25662 25906 +244
- Partials 7332 7387 +55
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
f5b4456
to
ff1739f
Compare
ff1739f
to
44f4ac7
Compare
44f4ac7
to
24552e7
Compare
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.
couple of questions
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, the required predicates need a bit more commenting I think
… creating recovery systems with components from the store
… that require snaps that are at least in the model
8d163e4
to
e4735ed
Compare
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.
Some minor comment, mostly about the spread tests
@@ -53,7 +53,7 @@ execute: | | |||
boot_id="$(tests.nested boot-id)" | |||
|
|||
# create the system | |||
change_id=$(post_json_data /v2/systems '{"action": "create", "label": "new-system", "validation-sets": ["test-snapd/recovery-system-pinned=1"], "test-system": %s, "mark-default": %s}' "${TEST_SYSTEM}" "${MARK_DEFAULT}") | |||
change_id=$(post_json_data /v2/systems '{"action": "create", "label": "new-system", "validation-sets": ["test-snapd/recovery-system-pinned=2"], "test-system": %s, "mark-default": %s}' "${TEST_SYSTEM}" "${MARK_DEFAULT}") |
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.
Why is this change needed?
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.
This was a bug in the test, found by me fixing a bug in the code. The old version of the validation set was requiring "core20", which doesn't make sense as this test is used on multiple systems with various bases.
overlord/devicestate/systems.go
Outdated
// * passed into the task via a list of side infos (these would have | ||
// come from a user posting components via the API) |
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.
Where is this case handled? I'm not sure if I see that in this method.
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.
That comment contains too much, this PR doesn't implement the offline case where we provide components. It'll be in the next one, but I'll fix this comment for now.
…creating recovery systems from locally provided components
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.
LGTM, thanks!
This PR allows us to create recovery systems that contain components using the /v2/systems API.