Conversation
There was a problem hiding this comment.
Pull request overview
Adds new craft-parts plugins to run snap prepare-image for Ubuntu Core (uc-prepare) and Ubuntu Classic (snap-preseed), plus coverage in unit and spread tests and a new system-seed volume role.
Changes:
- Introduce
UcPreparePluginandSnapPreseedPluginimplementations and register them in the plugin setup. - Add unit tests for both plugins’ command generation plus new spread tasks/configs to exercise them end-to-end.
- Extend
Volume.Rolewithsystem-seedand update the related validation expectation in tests.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
imagecraft/plugins/uc_prepare_plugin.py |
New Ubuntu Core snap prepare-image plugin implementation (with preseed-related options). |
imagecraft/plugins/snap_preseed_plugin.py |
New Ubuntu Classic snap prepare-image --classic plugin implementation. |
imagecraft/plugins/_setup.py |
Registers the new plugins so Imagecraft can use them by name. |
imagecraft/models/volume.py |
Adds system-seed to supported partition roles. |
tests/unit/models/test_volume.py |
Updates expected validation message to include system-seed. |
tests/unit/plugins/test_uc_prepare_plugin.py |
Unit tests for uc-prepare properties validation and command assembly. |
tests/unit/plugins/test_snap_preseed_plugin.py |
Unit tests for snap-preseed properties validation and command assembly. |
tests/spread/plugins/uc-prepare/* |
Spread task + fixtures to validate uc-prepare plugin output. |
tests/spread/plugins/snap-preseed/* |
Spread task + fixtures to validate snap-preseed plugin output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mr-cal
left a comment
There was a problem hiding this comment.
All non-blocking feedback. Looks good!
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Initial plan * Extract _resolve_snap to shared helper in imagecraft/plugins/_utils.py Agent-Logs-Url: https://github.com/canonical/imagecraft/sessions/4615f0f5-ebf0-4d3b-86ea-03f5a729dd29 Co-authored-by: lengau <4305943+lengau@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
…tion plugin options (#323) * Initial plan * Add tests for snap-preseed-channel and snap-preseed-validation options Agent-Logs-Url: https://github.com/canonical/imagecraft/sessions/34e3782d-fe61-42fb-8630-aac0f0238e49 Co-authored-by: lengau <4305943+lengau@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
lengau
left a comment
There was a problem hiding this comment.
Thanks Shams! This was a very big one with SO MANY little edge cases.
Adds snap prepare-image plugins for core and classic images
(IMAGECRAFT-109)
make lint && make test.