launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29739
[Merge] ~jugmac00/lpcraft:interims_releases into lpcraft:main
Jürgen Gmach has proposed merging ~jugmac00/lpcraft:interims_releases into lpcraft:main.
Commit message:
Add support for interims release
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/438664
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/lpcraft:interims_releases into lpcraft:main.
diff --git a/NEWS.rst b/NEWS.rst
index 347d876..60c97ca 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -2,9 +2,13 @@
Version history
===============
-0.0.48 (unreleased)
+0.0.48 (2023-03-10)
===================
+- Add support for interims releases, that is currently lunar and kinetic.
+ Please note daily cloud images are used for that, so we cannot guarantee
+ stability, see https://cloud-images.ubuntu.com/daily/.
+
- Fix various ``mypy`` errors.
0.0.47 (2023-03-01)
diff --git a/lpcraft/config.py b/lpcraft/config.py
index 8a3865c..5b8d126 100644
--- a/lpcraft/config.py
+++ b/lpcraft/config.py
@@ -116,6 +116,10 @@ class PackageSuite(str, Enum):
e.g. xenial, focal, ...
"""
+ # XXX jugmac00 2023-03-10 the intention of this class was to verify that
+ # only supported distroseries are present in the .launchpad.yaml file
+ # but this does not work as intended, as you can specify arbitrary
+ # strings which later possibly result in a KeyError
bionic = "bionic" # 18.04
focal = "focal" # 20.04
jammy = "jammy" # 22.04
diff --git a/lpcraft/providers/_buildd.py b/lpcraft/providers/_buildd.py
index 78a5140..bd6b2df 100644
--- a/lpcraft/providers/_buildd.py
+++ b/lpcraft/providers/_buildd.py
@@ -18,6 +18,8 @@ SERIES_TO_BUILDD_IMAGE_ALIAS = {
"bionic": bases.BuilddBaseAlias.BIONIC,
"focal": bases.BuilddBaseAlias.FOCAL,
"jammy": bases.BuilddBaseAlias.JAMMY,
+ "kinetic": bases.BuilddBaseAlias.KINETIC,
+ "lunar": bases.BuilddBaseAlias.LUNAR,
}
diff --git a/lpcraft/providers/_lxd.py b/lpcraft/providers/_lxd.py
index a2e0927..bdbb5eb 100644
--- a/lpcraft/providers/_lxd.py
+++ b/lpcraft/providers/_lxd.py
@@ -264,7 +264,7 @@ class LXDProvider(Provider):
)
environment = self.get_command_environment()
try:
- image_remote = lxd.configure_buildd_image_remote(lxc=self.lxc)
+ image_remote = lxd.get_remote_image(alias.value)
except lxd.LXDError as error:
raise CommandError(str(error)) from error
base_configuration = LPCraftBuilddBaseConfiguration(
@@ -301,7 +301,7 @@ class LXDProvider(Provider):
name=instance_name,
base_configuration=base_configuration,
image_name=series,
- image_remote=image_remote,
+ image_remote=image_remote.remote_name,
auto_clean=True,
auto_create_project=True,
map_user_uid=True,
diff --git a/lpcraft/providers/tests/test_lxd.py b/lpcraft/providers/tests/test_lxd.py
index 3b32768..f72fdbf 100644
--- a/lpcraft/providers/tests/test_lxd.py
+++ b/lpcraft/providers/tests/test_lxd.py
@@ -430,7 +430,6 @@ class TestLXDProvider(TestCase):
architecture="amd64",
) as instance:
self.assertIsNotNone(instance)
- mock_lxc.remote_add.assert_called_once()
mock_lxc.project_list.assert_called_once_with("test-remote")
mock_lxc.project_create.assert_called_once_with(
project="test-project", remote="test-remote"
@@ -700,7 +699,7 @@ class TestLXDProvider(TestCase):
self, mock_lxd
): # noqa: E501
error = LXDError(brief="Boom")
- mock_lxd.configure_buildd_image_remote.side_effect = error
+ mock_lxd.get_remote_image.side_effect = error
# original behavior has to be restored as lxd is now a mock
mock_lxd.LXDError = LXDError
provider = makeLXDProvider()
diff --git a/requirements.in b/requirements.in
index 7a73bd5..0b5a3c6 100644
--- a/requirements.in
+++ b/requirements.in
@@ -1,5 +1,5 @@
craft-cli
-craft-providers
+craft-providers>=1.8.0 # support of interims releases
pydantic
PyYAML
python-dotenv
diff --git a/requirements.txt b/requirements.txt
index 9930c45..283bba5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -10,7 +10,7 @@ charset-normalizer==3.0.1
# via requests
craft-cli==1.2.0
# via -r requirements.in
-craft-providers==1.7.2
+craft-providers==1.8.0
# via -r requirements.in
idna==3.4
# via requests
diff --git a/setup.cfg b/setup.cfg
index c9f86c9..ac37263 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = lpcraft
-version = 0.0.48.dev0
+version = 0.0.48
description = Runner for Launchpad CI jobs
long_description = file: README.rst
long_description_content_type = text/x-rst