-
Notifications
You must be signed in to change notification settings - Fork 21
feat(Lifecycle): select plugin groups #978
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
Conversation
Add `dev-resolute` dependency group to allow development on Ubuntu Resolute, with `python-apt` version pinned to `3.0.0`.
This adds the ability to choose plugin groups to the Lifecycle service. This works differently from the default plugin setup in the Application, which is now deprecated in favour of this. Apps that move over will be rewarded with a happy fuzzy feeling and the ability to get the plugin group based simply on the BuildInfo object.
2aa2065 to
9a1b84b
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.
Pull request overview
This PR introduces plugin group selection capability to the Lifecycle service, allowing applications to dynamically choose plugin sets based on BuildInfo. This deprecates the previous Application-based plugin registration approach in favor of a more flexible, build-specific plugin configuration system.
- Adds
get_plugin_group()method to LifecycleService for dynamic plugin selection based on BuildInfo - Implements witchcraft-specific plugin groups (MERLIN for Ubuntu ≤22.04 with Python, MORGANA for Ubuntu >22.04 with Rust)
- Deprecates Application.register_plugins() with a warning directing users to the new Lifecycle service approach
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| witchcraft/services/lifecycle.py | New lifecycle service implementation with plugin group selection logic for witchcraft |
| witchcraft/services/init.py | Registers the custom lifecycle service with the ServiceFactory |
| craft_application/services/lifecycle.py | Adds base get_plugin_group() method and plugin group setup logic in LifecycleService |
| craft_application/application.py | Adds deprecation warning to register_plugins() method |
| tests/integration/services/test_lifecycle.py | Adds integration test for plugin group setup with different plugin configurations |
| tests/spread/witchcraft/plugin-groups/ | Adds spread tests validating plugin group behavior on Ubuntu 22.04 and 24.04 |
| pyproject.toml | Updates craft-parts dependency to git source (temporary development dependency) |
| uv.lock | Updates lockfile to reflect git-based craft-parts dependency |
| docs/reference/services/lifecycle.rst | New documentation page for LifecycleService |
| docs/reference/services/index.rst | Adds lifecycle service to documentation index |
| docs/reference/changelog.rst | Documents new feature and deprecation in 6.1.0 changelog |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
smethnani
left a comment
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.
Small nit re the warning message but the rest looks good to me. Thanks @lengau!
Co-authored-by: Michael DuBelko <[email protected]> Signed-off-by: Alex Lowe <[email protected]>
Signed-off-by: Alex Lowe <[email protected]>
This updates distro-support so that Ubuntu 26.04 (resolute raccoon) is included when testing.
jahn-junior
left a comment
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! Consider my suggestions optional :)
Co-authored-by: JJ Coldiron <[email protected]> Signed-off-by: Alex Lowe <[email protected]>
cmatsuoka
left a comment
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!
5861a46 to
8d3e4f4
Compare
Signed-off-by: Alex Lowe <[email protected]>
8d3e4f4 to
49c906f
Compare
|
Bypassing unrelated spread test failures. |
1 similar comment
|
Bypassing unrelated spread test failures. |
make lint && make test?docs/reference/changelog.rst)?This adds the ability to choose plugin groups to the Lifecycle service.
This works differently from the default plugin setup in the Application,
which is now deprecated in favour of this. Apps that move over will be
rewarded with a happy fuzzy feeling and the ability to get the plugin
group based simply on the BuildInfo object.
Fixes #966 CRAFT-4933