← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad-buildd:lpci-rename into launchpad-buildd:master

 

Colin Watson has proposed merging ~cjwatson/launchpad-buildd:lpci-rename into launchpad-buildd:master.

Commit message:
Use lpci rather than lpcraft, following its rename

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/441328
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:lpci-rename into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index 43148d0..991207d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ launchpad-buildd (231) UNRELEASED; urgency=medium
 
   * Only ignore .bzr and .git when building source packages from recipes,
     not all the things that "dpkg-buildpackage -I" ignores.
+  * Use lpci rather than lpcraft, following its rename.
 
  -- Colin Watson <cjwatson@xxxxxxxxxx>  Mon, 27 Mar 2023 17:56:08 +0100
 
diff --git a/lpbuildd/target/run_ci.py b/lpbuildd/target/run_ci.py
index 21b8640..54aca19 100644
--- a/lpbuildd/target/run_ci.py
+++ b/lpbuildd/target/run_ci.py
@@ -66,11 +66,11 @@ class RunCIPrepare(
         if self.backend.supports_snapd:
             self.snap_store_set_proxy()
         for snap_name, channel in sorted(self.args.channels.items()):
-            if snap_name not in ("lxd", "lpcraft"):
+            if snap_name not in ("lxd", "lpci"):
                 self.backend.run(
                     ["snap", "install", "--channel=%s" % channel, snap_name]
                 )
-        for snap_name, classic in (("lxd", False), ("lpcraft", True)):
+        for snap_name, classic in (("lxd", False), ("lpci", True)):
             cmd = ["snap", "install"]
             if classic:
                 cmd.append("--classic")
@@ -167,7 +167,7 @@ class RunCI(BuilderProxyOperationMixin, Operation):
         )
 
     def run_build_command(self, args, **kwargs):
-        # Run build commands as the `buildd` user, since `lpcraft` can only
+        # Run build commands as the `buildd` user, since `lpci` can only
         # start containers with `nvidia.runtime=true` if it's run as a
         # non-root user.
         super().run_build_command(
@@ -182,14 +182,14 @@ class RunCI(BuilderProxyOperationMixin, Operation):
         job_id = f"{self.args.job_name}:{self.args.job_index}"
         logger.info("Running %s" % job_id)
         output_path = os.path.join("/build", "output")
-        # This matches the per-job output path used by lpcraft.
+        # This matches the per-job output path used by lpci.
         job_output_path = os.path.join(
             output_path, self.args.job_name, str(self.args.job_index)
         )
         self.backend.run(["mkdir", "-p", job_output_path])
         self.backend.run(["chown", "-R", "buildd:buildd", output_path])
-        lpcraft_args = [
-            "lpcraft",
+        lpci_args = [
+            "lpci",
             "-v",
             "run-one",
             "--output-directory",
@@ -198,30 +198,28 @@ class RunCI(BuilderProxyOperationMixin, Operation):
             str(self.args.job_index),
         ]
         for repository in self.args.package_repositories:
-            lpcraft_args.extend(["--package-repository", repository])
+            lpci_args.extend(["--package-repository", repository])
 
         environment_variables = dict(
             pair.split("=", maxsplit=1)
             for pair in self.args.environment_variables
         )
         for key, value in environment_variables.items():
-            lpcraft_args.extend(["--set-env", f"{key}={value}"])
+            lpci_args.extend(["--set-env", f"{key}={value}"])
 
         plugin_settings = dict(
             pair.split("=", maxsplit=1) for pair in self.args.plugin_settings
         )
         for key, value in plugin_settings.items():
-            lpcraft_args.extend(["--plugin-setting", f"{key}={value}"])
+            lpci_args.extend(["--plugin-setting", f"{key}={value}"])
 
         if self.args.secrets:
-            lpcraft_args.extend(["--secrets", self.args.secrets])
+            lpci_args.extend(["--secrets", self.args.secrets])
 
         if "gpu-nvidia" in self.backend.constraints:
-            lpcraft_args.append("--gpu-nvidia")
+            lpci_args.append("--gpu-nvidia")
 
-        escaped_lpcraft_args = " ".join(
-            shell_escape(arg) for arg in lpcraft_args
-        )
+        escaped_lpci_args = " ".join(shell_escape(arg) for arg in lpci_args)
         tee_args = ["tee", os.path.join(job_output_path, "log")]
         escaped_tee_args = " ".join(shell_escape(arg) for arg in tee_args)
         args = [
@@ -229,7 +227,7 @@ class RunCI(BuilderProxyOperationMixin, Operation):
             "-o",
             "pipefail",
             "-c",
-            f"{escaped_lpcraft_args} 2>&1 | {escaped_tee_args}",
+            f"{escaped_lpci_args} 2>&1 | {escaped_tee_args}",
         ]
         self.run_build_command(args, env=env)
 
diff --git a/lpbuildd/target/tests/test_run_ci.py b/lpbuildd/target/tests/test_run_ci.py
index bf61e99..4f42382 100644
--- a/lpbuildd/target/tests/test_run_ci.py
+++ b/lpbuildd/target/tests/test_run_ci.py
@@ -57,7 +57,7 @@ class TestRunCIPrepare(TestCase):
                 [
                     RanAptGet("install", "git"),
                     RanSnap("install", "lxd"),
-                    RanSnap("install", "--classic", "lpcraft"),
+                    RanSnap("install", "--classic", "lpci"),
                     RanCommand(["lxd", "init", "--auto"]),
                 ]
             ),
@@ -104,7 +104,7 @@ class TestRunCIPrepare(TestCase):
                     RanSnap("ack", "/dev/stdin", input_text=store_assertion),
                     RanSnap("set", "core", "proxy.store=store-id"),
                     RanSnap("install", "lxd"),
-                    RanSnap("install", "--classic", "lpcraft"),
+                    RanSnap("install", "--classic", "lpci"),
                     RanCommand(["lxd", "init", "--auto"]),
                 ]
             ),
@@ -136,7 +136,7 @@ class TestRunCIPrepare(TestCase):
                 [
                     RanAptGet("install", "python3", "socat", "git"),
                     RanSnap("install", "lxd"),
-                    RanSnap("install", "--classic", "lpcraft"),
+                    RanSnap("install", "--classic", "lpci"),
                     RanCommand(["lxd", "init", "--auto"]),
                 ]
             ),
@@ -158,7 +158,7 @@ class TestRunCIPrepare(TestCase):
             "--channel=core=candidate",
             "--channel=core20=beta",
             "--channel=lxd=beta",
-            "--channel=lpcraft=edge",
+            "--channel=lpci=edge",
             "--git-repository",
             "lp:foo",
         ]
@@ -172,9 +172,7 @@ class TestRunCIPrepare(TestCase):
                     RanSnap("install", "--channel=candidate", "core"),
                     RanSnap("install", "--channel=beta", "core20"),
                     RanSnap("install", "--channel=beta", "lxd"),
-                    RanSnap(
-                        "install", "--classic", "--channel=edge", "lpcraft"
-                    ),
+                    RanSnap("install", "--classic", "--channel=edge", "lpci"),
                     RanCommand(["lxd", "init", "--auto"]),
                 ]
             ),
@@ -199,7 +197,7 @@ class TestRunCIPrepare(TestCase):
                 [
                     RanAptGet("install", "git", "clamav"),
                     RanSnap("install", "lxd"),
-                    RanSnap("install", "--classic", "lpcraft"),
+                    RanSnap("install", "--classic", "lpci"),
                     RanCommand(["lxd", "init", "--auto"]),
                     RanCommand(["freshclam", "--quiet"]),
                 ]
@@ -239,7 +237,7 @@ class TestRunCIPrepare(TestCase):
                 [
                     RanAptGet("install", "python3", "socat", "git", "clamav"),
                     RanSnap("install", "lxd"),
-                    RanSnap("install", "--classic", "lpcraft"),
+                    RanSnap("install", "--classic", "lpci"),
                     RanCommand(["lxd", "init", "--auto"]),
                     RanCommand(["freshclam", "--quiet"], **env),
                 ]
@@ -270,7 +268,7 @@ class TestRunCIPrepare(TestCase):
                 [
                     RanAptGet("install", "git", "clamav"),
                     RanSnap("install", "lxd"),
-                    RanSnap("install", "--classic", "lpcraft"),
+                    RanSnap("install", "--classic", "lpci"),
                     RanCommand(["lxd", "init", "--auto"]),
                     RanCommand(["freshclam", "--quiet"]),
                 ]
@@ -520,7 +518,7 @@ class TestRunCIPrepare(TestCase):
         self.assertThat(
             run_ci_prepare.backend.run.calls,
             MatchesAll(
-                AnyMatch(RanSnap("install", "--classic", "lpcraft")),
+                AnyMatch(RanSnap("install", "--classic", "lpci")),
                 AnyMatch(
                     RanBuildCommand(
                         ["git", "clone", "-n", "lp:foo", "tree"], cwd="/build"
@@ -607,7 +605,7 @@ class TestRunCI(TestCase):
                             "-o",
                             "pipefail",
                             "-c",
-                            "lpcraft -v run-one --output-directory /build/output test 0 2>&1 "  # noqa: E501
+                            "lpci -v run-one --output-directory /build/output test 0 2>&1 "  # noqa: E501
                             "| tee /build/output/test/0/log",
                         ],
                         cwd="/build/tree",
@@ -658,7 +656,7 @@ class TestRunCI(TestCase):
                             "-o",
                             "pipefail",
                             "-c",
-                            "lpcraft -v run-one --output-directory /build/output test 0 2>&1 "  # noqa: E501
+                            "lpci -v run-one --output-directory /build/output test 0 2>&1 "  # noqa: E501
                             "| tee /build/output/test/0/log",
                         ],
                         cwd="/build/tree",
@@ -706,7 +704,7 @@ class TestRunCI(TestCase):
                             "-o",
                             "pipefail",
                             "-c",
-                            "lpcraft -v run-one --output-directory "
+                            "lpci -v run-one --output-directory "
                             "/build/output test 0 "
                             "--set-env PIP_INDEX_URL=http://example "
                             "--set-env SOME_PATH=/etc/some_path "
@@ -757,7 +755,7 @@ class TestRunCI(TestCase):
                             "-o",
                             "pipefail",
                             "-c",
-                            "lpcraft -v run-one --output-directory "
+                            "lpci -v run-one --output-directory "
                             "/build/output test 0 "
                             "--package-repository 'deb http://archive.ubuntu.com/ubuntu/ focal main restricted' "  # noqa: E501
                             "--package-repository 'deb http://archive.ubuntu.com/ubuntu/ focal universe' "  # noqa: E501
@@ -806,7 +804,7 @@ class TestRunCI(TestCase):
                             "-o",
                             "pipefail",
                             "-c",
-                            "lpcraft -v run-one --output-directory "
+                            "lpci -v run-one --output-directory "
                             "/build/output test 0 "
                             "--plugin-setting "
                             "miniconda_conda_channel=https://user:pass@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-conda-stable-local/ "  # noqa: E501
@@ -855,7 +853,7 @@ class TestRunCI(TestCase):
                             "-o",
                             "pipefail",
                             "-c",
-                            "lpcraft -v run-one --output-directory "
+                            "lpci -v run-one --output-directory "
                             "/build/output test 0 "
                             "--secrets /build/.launchpad-secrets.yaml "
                             "2>&1 "
@@ -902,7 +900,7 @@ class TestRunCI(TestCase):
                             "-o",
                             "pipefail",
                             "-c",
-                            "lpcraft -v run-one --output-directory "
+                            "lpci -v run-one --output-directory "
                             "/build/output test 0 "
                             "2>&1 "
                             "| tee /build/output/test/0/log",
@@ -986,7 +984,7 @@ class TestRunCI(TestCase):
                             "-o",
                             "pipefail",
                             "-c",
-                            "lpcraft -v run-one --output-directory "
+                            "lpci -v run-one --output-directory "
                             "/build/output test 0 "
                             "--gpu-nvidia "
                             "2>&1 "