extensions: refactor
Metadata
Current evaluation
Merged refactoring of extensions to prevent future cyclic import issues. Approved by reviewer, passed CI, and integrated into main. Reduced code by 163 lines across six files with a minor coverage decrease.
Suggested action: —
No scores available.
Issue body
Avoid future cyclic import issues.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `make lint`?
- [ ] Have you successfully run `pytest tests/unit`?
-----
Part of https://github.com/snapcore/snapcraft/pull/3760
CRAFT-1114
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged refactoring of extensions to prevent future cyclic import issues. Approved by reviewer, passed CI, and integrated into main. Reduced code by 163 lines across six files with a minor coverage decrease. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to main. Refactored extensions to prevent cyclic imports as part of PR #3760 and CRAFT-1114. Code coverage dropped 0.08% but the refactoring was successfully integrated. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main. Refactored the extensions module to prevent future cyclic import issues, addressing CRAFT-1114 as part of PR #3760. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2355 extensions: cleanup and generic tests | snapcraft | merged | Resolved LP: #1791172 by ensuring extensions are properly installable and adding generic smoke tests for future extensions. Merged after approval and passing CI, modifying 10 files (+133/-17). | |
| #1608 fix: move bundle extension to a function | charmcraft | merged | Merged refactoring that moves bundle extension logic into a dedicated function. Changes affect six files with a net reduction of 51 lines. Approved by two reviewers, resolved all comments, and passed CI checks. | |
| #2705 extensions: rename extension classes to known names | snapcraft | merged | Merged changes renaming extension classes to known names, simplifying logic by removing string parsing for Extension class implementation. Approved, passed CI, and increased coverage by 0.01% across five files. | |
| #3197 experimental extension support | snapcraft | merged | Merged experimental extension support. Requires #3196. Approved by one reviewer, rebased by the author, and integrated with 102 additions and 8 deletions across seven files. | |
| #1572 refactor: remove unused extension command implementations | charmcraft | merged | Merged refactoring that removes unused extension command implementations. Tests were relocated to craft-application, with remote build fixes tracked in #1573. Approved by three reviewers, the change reduced 161 lines across six files. | |
| #2555 extensions: block direct use of private extensions | snapcraft | merged | Merged into master. Blocks direct loading of private extensions whose names start with an underscore to prevent unanticipated internal usage. Approved by reviewer, passed CI, and introduced 16 lines across two files. | |
| #4705 docs(extensions): improve docstrings and comments | snapcraft | merged | Improved docstrings and comments for extensions, clarifying the builtin parameter. Merged after approval by two reviewers, passing all CI checks and code coverage requirements. Modified two files with 28 additions and 4 deletions. | |
| #292 extensions: add cli commands | rockcraft | merged | Merged addition of list-extensions and expand-extensions CLI commands matching Snapcraft semantics, plus test refactoring. Resolves #274. Approved by two reviewers, passed CI, and modified 15 files (+452/-109 lines). | |
| #5454 docs: migrate 'Extensions' | snapcraft | merged | Merged documentation migration for Extensions. Approved by two reviewers with all CI checks passing. The update added 89 lines across six files. A maintainer suggested future scope improvements for related guides. | |
| #496 refactor: Reduce cyclomatic complexity | fetch-service | merged | Merged refactoring changes that reduced cyclomatic complexity by extracting logic into dedicated functions. Approved by two reviewers, passed CI checks, and modified four files (+248/-201 lines). |