providers: move `get_provider()` to providers.py
Metadata
Current evaluation
Merged the refactoring that moves get_provider() to providers.py. Aligned with rockcraft, the change passed code review and CI checks, modified 7 files, and was successfully integrated into main.
Suggested action: —
No scores available.
Issue body
- [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/)?
- [X] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
Move `get_provider()` to `providers.py`.
Similar to [this rockcraft PR](https://github.com/canonical/rockcraft/pull/92)
(CRAFT-1409)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged the refactoring that moves get_provider() to providers.py. Aligned with rockcraft, the change passed code review and CI checks, modified 7 files, and was successfully integrated into main. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged the refactoring that moves get_provider() to providers.py, aligning with rockcraft. The change passed all checks, achieved 100% diff coverage, and was integrated into main with a negligible 0.01% overall coverage decrease. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to main. Moved get_provider() to providers.py to align with rockcraft refactoring and address CRAFT-1409. The change reduced overall coverage by 0.01% while maintaining 100% diff coverage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #898 providers: move `get_provider()` to providers.py | charmcraft | merged | Merged after approval. Moved the get_provider() function to providers.py as part of CRAFT-1410. The refactoring touched 10 files, adding 178 lines and removing 226, and was previously blocked by PR 896. | |
| #92 providers: refactor get_provider() | rockcraft | merged | Merged after approval and passing CI. Refactored and moved get_provider() from _get_provider.py to providers.py across seven files, reducing code by 25 lines. Resolves CRAFT-1375. | |
| #91 providers: move `confirm_with_user()` call to providers.py | rockcraft | merged | Merged after approval and passing CI. Moved the rockcraft-specific confirm_with_user logic out of the craft-providers interface into providers.py. Renamed is_provider_available to is_provider_installed across ten files. | |
| #81 providers: move base configuration logic to providers.py | rockcraft | merged | Merged refactoring that moves base configuration logic to providers.py. The logic is now encapsulated in a single function called by lifecycle.py instead of individual provider classes, resolving CRAFT-1380. Approved and passed CI. | |
| #74 providers: move get_instance_name() to providers.py | rockcraft | merged | Merged after approval and passing CI. Moved the rockcraft-specific get_instance_name() function to providers.py, changing 8 files. Resolves CRAFT-1350. | |
| #110 providers: move lxd project name out of craft-providers interface | rockcraft | merged | Merged refactoring that moves rockcraft's project name from lxd.py to providers.py in the craft-providers interface. Approved by one reviewer, passed CI, and successfully integrated. | |
| #80 providers: move `get_instance_name()` call to lifecycle.py | rockcraft | merged | Merged. Moved the rockcraft-specific get_instance_name() call from provider classes to lifecycle.py to separate application-specific logic. Approved by reviewer, CI passed, spanning 6 files with 57 additions and 34 deletions. | |
| #3938 providers: move `confirm_with_user()` call to providers.py (#91) | snapcraft | merged | Merged changes moving the snapcraft-specific confirm_with_user() call out of the craft-providers interface into providers.py. The update was approved, passed CI, and aligns with parallel rockcraft modifications. | |
| #896 providers: move `is_base_available()` to providers.py | charmcraft | merged | Merged after approval. Moved the charmcraft-specific is_base_available() function from the craft-providers interface to providers.py to separate concerns. The change affects 8 files, adding 149 lines and removing 201. | |
| #3926 providers: move `get_instance_name()` to providers.py | snapcraft | merged | Merged. Moved get_instance_name() to snapcraft/providers/providers.py, removing snapcraft-specific logic from provider modules. This refactoring prepares the codebase for the new craft-providers API. Approved by reviewers and passed all CI checks. |