← Back to issue list

lxd: add support for interim Ubuntu releases

View original Github issue

Metadata

Project
craft-providers
Number
#219
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #219 as commit c428f4b, adding RemoteImage/get_remote_image() support for interim and devel Ubuntu releases while retaining deprecated APIs.

Resolution: closed resolved

Reason: PR #219 was approved and merged as commit c428f4b. Its RemoteImage abstraction and interim-release support shipped in craft-providers 1.8.0, resolving #190.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- #### Overview This PR adds support for interim and devel Ubuntu releases with LXD. Broken into 6 separate commits to speed up review time. #### Details Previously, craft-providers maintained a list of valid LXD images with a simple enum. Now, the `remotes.py` module has a new dataclass called `RemoteImage` and a dictionary of valid `RemoteImages` to track what images are supported. It is designed in such a way that users can add custom remotes and we'll be able to add support for other bases (like a centos base) without breaking changes. #### Usage For applications using the `LxdProvider` class (snapcraft, charmcraft, and rockcraft), there are no changes in behavior or usage. You can simply pass in the new release names: ```python class BuilddBaseAlias(enum.Enum): XENIAL = "16.04" BIONIC = "18.04" FOCAL = "20.04" JAMMY = "22.04" KINETIC = "22.10" LUNAR = "23.04" ``` For other applications (lpcraft :eyes:), you'll need to use the replace the old `configure_buildd_image_remote()` function with the new `get_remote_image()` function. Note - the old function `configure_build_image_remote()` still exists and its behavior is unchanged, except for a deprecation notice. #### Example usage ```python remote_image = lxd.get_remote_image(BuilddBaseAlias.KINETIC.value) base_configuration = bases.BuilddBase(alias=BuildBaseAlias.KINETIC) instance = lxd.launch( name="my-instance", base_configuration=base_configuration, image_name=remote_image.image_name, image_remote=remote_image.remote_name, ) ``` #### TODO - [x] break into smaller commits #### Sources - [Provide build base support for interim releases #190](https://github.com/canonical/craft-providers/issues/190) - [Support new series of ubuntu including interim releases ](https://bugs.launchpad.net/lpcraft/+bug/1999694) (CRAFT-1601)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #219 as commit c428f4b, adding RemoteImage/get_remote_image() support for interim and devel Ubuntu releases while retaining deprecated APIs.
qwen/qwen3.6-35b-a3b — closed resolved Added LXD support for interim Ubuntu releases via RemoteImage dataclass and get_remote_image(), deprecating configure_buildd_image_remote().

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/craft-providers#190 (confidence 99%)

    The originating feature request for non-LTS Ubuntu release support was resolved in version 1.8.0.

Related issues

Issue Project State Summary Similarity
#318 lxd(remotes): fix deprecation warnings craft-providers merged Merged PR #318 corrected the configure_buildd_image_remote deprecation warning so its replacement advice was accurate, resolving #260.
74%