← Back to issue list

providers: translate rockcraft base to provider base

View original Github issue

Metadata

Project
rockcraft
Number
#85
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged. Centralized base translation from LXD and Multipass modules into craft-providers. Added a configurable supported bases list to decouple application definitions from provider image mapping. Approved by mr-cal.

Suggested action:

No scores available.

Issue body

- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- ### Overview *craft applications have a concept of a "base". This base is translated a `craft-providers` base and is passed to `craft-providers` so it can choose which base image (OS and release) to use for the instance. ### Problem Currently, each application translates its own base inside `_lxd.py` and `_multipass.py`. This application-specific code needs to be removed from these files. ### Solution To support this, I created a list of what bases `craft-providers` can accept. Right now, `18.04`, `20.04`, and `22.04` are supported. Other OSs and releases can be added in the future without breaking backwards compatibility. The image below shows how an application can translates its base to a `craft-providers` base. It also shows `craft-providers` translating it to the specific name needed for LXD and Multipass to download the base image. ![image](https://user-images.githubusercontent.com/60674096/191814611-e05cfcbd-7cd3-45a7-b544-8580d4746b79.png) --- CRAFT-1382

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Centralized base translation from LXD and Multipass modules into craft-providers. Added a configurable supported bases list to decouple application definitions from provider image mapping. Approved by mr-cal.
qwen3.6-35b-a3b-mtp-q6 Merged refactoring that centralizes base translation logic from application-specific LXD and Multipass files into craft-providers. Added explicit support for Ubuntu 18.04, 20.04, and 22.04 bases, enabling future extensibility without breaking compatibility.
qwen3.6-35b-a3b-mtp-q6 Merged. Centralized base translation logic in craft-providers, removing application-specific code from _lxd.py and _multipass.py. Supports Ubuntu 18.04, 20.04, and 22.04 bases, resolving CRAFT-1382.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
73%
#9 providers: add build provider support (CRAFT-28) rockcraft merged Merged integration of rockcraft with craft-providers to run build providers on LXD instances. The change ports Charmcraft glue code, hardwires execution to LXD, and defers user messages and log retrieval to follow-up PRs. Approved and passed CI.
73%
#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.
71%