providers: move base configuration logic to providers.py
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Configuring a base is specific to rockcraft, so it is:
1. encapsulated in a function and moved to `providers.py`
2. called by `lifecycle.py` instead of the Provider classes `lxd.py` and `multipass.py`
(CRAFT-1380)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Centralized base configuration logic by moving it from lxd.py and multipass.py into a dedicated function in providers.py, now called by lifecycle.py. Resolves CRAFT-1380. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Base configuration logic was consolidated into a centralized function in providers.py. Lifecycle.py now invokes this function instead of individual provider classes, streamlining rockcraft-specific setup per CRAFT-1380. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #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. | |
| #3940 providers: move `get_provider()` to providers.py | snapcraft | merged | 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. | |
| #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. | |
| #120 providers: use new craft-providers interface | rockcraft | merged | Merged after review and CI approval. Replaced custom Provider classes with the new craft-providers interface, relocated providers.py, and refactored 17 files. Reduced codebase by over 1200 lines, resolving CRAFT-1349. | |
| #484 providers: refactor to better support multiple providers (CRAFT-362) | charmcraft | merged | Merged following two approvals and passing CI. Refactored the providers module into a package introducing a common Provider interface and LXDProvider subclass to accommodate future providers like Multipass. No behavioral changes. Minor naming adjustments applied during review. | |
| #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. | |
| #899 providers: use new craft-providers interface | charmcraft | merged | Merged after replacing internal Provider classes with the new craft-providers interface. Refactored by moving providers.py to the package root, removing 1253 lines across 17 files. Resolved CRAFT-1279. |