← Back to issue list

plugins: extract common code from kernel plugins

View original Github issue

Metadata

Project
snapcraft
Number
#4053
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged after extracting and normalizing common functions from legacy v2 and craft-parts kernel plugins, reducing code by over 700 lines across five files. Review approved. Author addressed feedback by reverting an unnecessary codespell pin commit.

Suggested action:

No scores available.

Issue body

Normalize and extract common functions from the legacy v2 kernel plugin and the craft-parts kernel plugin to create a simpler, more maintenable code base. Further changes are required: refactor constructs to allow easier extraction of additional common code, normalize patterns, adjust styling, and fix typos. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint`? - [ ] Have you successfully run `pytest tests/unit`? ----- CRAFT-1617 CRAFT-1618

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged after extracting and normalizing common functions from legacy v2 and craft-parts kernel plugins, reducing code by over 700 lines across five files. Review approved. Author addressed feedback by reverting an unnecessary codespell pin commit.
qwen3.6-35b-a3b-mtp-q6 Merged after extracting and normalizing shared functions from legacy v2 and craft-parts kernel plugins. The codespell pin commit was reverted per reviewer request prior to final merge.
qwen3.6-35b-a3b-mtp-q6 Merged. Extracted and normalized common functions from legacy v2 and craft-parts kernel plugins to improve maintainability. Addressed reviewer feedback by reverting a codespell pin commit prior to merge.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4111 plugins: merge kernel plugin snapcraft merged Merged craft-parts and v2 kernel plugins from a feature branch into main. Approved by one reviewer, passed CI checks, and updated 27 files. Codecov reported a 0.12% coverage increase with 98.32% diff coverage.
80%
#4081 Kernel plugin improvements 1 snapcraft merged Merged after approval. The update reorganizes kernel plugin code by moving implementations to a common module and improves readability with textwrap.dedent. Changes affect 5 files, resulting in a net reduction of 259 lines.
74%
#837 kernel plugin: allow collecting the same mod deps snapcraft merged Merged kernel plugin fix eliminating duplicate module dependencies via set conversion. Approved by one reviewer. Modifies two files: +36/-1 lines.
71%
#366 New plugin: kernel snapcraft merged Merged into master, introducing a new kernel plugin with two examples. Jointly developed by Alexander Sack and Sergio Schvezov, the update maintained 95% coverage. After reviewer approval, local test issues were resolved and the code integrated.
71%