Merge ~jugmac00/lpci:fix-regression-from-adding-non-lts-support into lpci:main

Proposed by Jürgen Gmach
Status: Merged
Merged at revision: c0ac0032524a33a06b2c37887c5863b2f317ec6a
Proposed branch: ~jugmac00/lpci:fix-regression-from-adding-non-lts-support
Merge into: lpci:main
Diff against target: 44 lines (+11/-1)
3 files modified
NEWS.rst (+5/-0)
lpcraft/providers/_lxd.py (+5/-0)
setup.cfg (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+438696@code.launchpad.net

Commit message

Fix regression from adding support for non-LTS releases

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

I'm not entirely sure about the "little gain" argument given that this was a regression that caused all lpcraft builds on Launchpad to fail. But I'm OK with this for now (don't forget the `NEWS` entry).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/NEWS.rst b/NEWS.rst
2index c03513f..b6d46f8 100644
3--- a/NEWS.rst
4+++ b/NEWS.rst
5@@ -2,6 +2,11 @@
6 Version history
7 ===============
8
9+0.0.49 (2023-03-10)
10+===================
11+- Fix regression from adding support for non-LTS releases. With the latest
12+ release of `craft-providers` we need to explicitly add a remote for images.
13+
14 0.0.48 (2023-03-10)
15 ===================
16
17diff --git a/lpcraft/providers/_lxd.py b/lpcraft/providers/_lxd.py
18index bdbb5eb..565acac 100644
19--- a/lpcraft/providers/_lxd.py
20+++ b/lpcraft/providers/_lxd.py
21@@ -267,6 +267,11 @@ class LXDProvider(Provider):
22 image_remote = lxd.get_remote_image(alias.value)
23 except lxd.LXDError as error:
24 raise CommandError(str(error)) from error
25+ # XXX 2023-03-10 jugmac00: The following line is not explicitly covered
26+ # by our test suite. We probably need to add something like
27+ # `mock_lxd.get_remote_image` and then assert on `add_remote` being
28+ # called.
29+ image_remote.add_remote(lxc=self.lxc)
30 base_configuration = LPCraftBuilddBaseConfiguration(
31 alias=alias, environment=environment, hostname=instance_name
32 )
33diff --git a/setup.cfg b/setup.cfg
34index ac37263..2031491 100644
35--- a/setup.cfg
36+++ b/setup.cfg
37@@ -1,6 +1,6 @@
38 [metadata]
39 name = lpcraft
40-version = 0.0.48
41+version = 0.0.49
42 description = Runner for Launchpad CI jobs
43 long_description = file: README.rst
44 long_description_content_type = text/x-rst

Subscribers

People subscribed via source and target branches