← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ines-almeida/launchpad-buildd:update-use-fetch-service-arg-typing into launchpad-buildd:master

 

Ines Almeida has proposed merging ~ines-almeida/launchpad-buildd:update-use-fetch-service-arg-typing into launchpad-buildd:master.

Commit message:
Update use-fetch-service arg name to use dashes instead of underscores

This makes the code more consistent.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad-buildd/+git/launchpad-buildd/+merge/475303

Replacing `--use_fetch_service` with `--use-fetch-service` for consistency.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad-buildd:update-use-fetch-service-arg-typing into launchpad-buildd:master.
diff --git a/lpbuildd/craft.py b/lpbuildd/craft.py
index cb4523a..991e0c5 100644
--- a/lpbuildd/craft.py
+++ b/lpbuildd/craft.py
@@ -56,7 +56,7 @@ class CraftBuildManager(BuildManagerProxyMixin, DebianBuildManager):
         if self.build_path is not None:
             args.extend(["--build-path", self.build_path])
         if self.use_fetch_service:
-            args.append("--use_fetch_service")
+            args.append("--use-fetch-service")
             args.extend(
                 [
                     "--fetch-service-mitm-certificate",
diff --git a/lpbuildd/rock.py b/lpbuildd/rock.py
index bf68348..b3448ff 100644
--- a/lpbuildd/rock.py
+++ b/lpbuildd/rock.py
@@ -56,7 +56,7 @@ class RockBuildManager(BuildManagerProxyMixin, DebianBuildManager):
         if self.build_path is not None:
             args.extend(["--build-path", self.build_path])
         if self.use_fetch_service:
-            args.append("--use_fetch_service")
+            args.append("--use-fetch-service")
             args.extend(
                 [
                     "--fetch-service-mitm-certificate",
diff --git a/lpbuildd/snap.py b/lpbuildd/snap.py
index af4d165..eb1a43f 100644
--- a/lpbuildd/snap.py
+++ b/lpbuildd/snap.py
@@ -104,7 +104,7 @@ class SnapBuildManager(BuildManagerProxyMixin, DebianBuildManager):
             for arch in self.target_architectures:
                 args.extend(["--target-arch", arch])
         if self.use_fetch_service:
-            args.append("--use_fetch_service")
+            args.append("--use-fetch-service")
             # XXX 2024-04-17 jugmac00: I do not think we need to add checks
             # whether this information is present, as otherwise the fetch
             # service won't work anyway
diff --git a/lpbuildd/target/build_craft.py b/lpbuildd/target/build_craft.py
index d6bfb89..3872ab9 100644
--- a/lpbuildd/target/build_craft.py
+++ b/lpbuildd/target/build_craft.py
@@ -45,7 +45,7 @@ class BuildCraft(
             help="name of sourcecraft package to build",
         )
         parser.add_argument(
-            "--use_fetch_service",
+            "--use-fetch-service",
             default=False,
             action="store_true",
             help="use the fetch service instead of the builder proxy",
diff --git a/lpbuildd/target/build_rock.py b/lpbuildd/target/build_rock.py
index 92208b3..31bdf6f 100644
--- a/lpbuildd/target/build_rock.py
+++ b/lpbuildd/target/build_rock.py
@@ -38,7 +38,7 @@ class BuildRock(
         )
         parser.add_argument("name", help="name of rock to build")
         parser.add_argument(
-            "--use_fetch_service",
+            "--use-fetch-service",
             default=False,
             action="store_true",
             help="use the fetch service instead of the builder proxy",
diff --git a/lpbuildd/target/build_snap.py b/lpbuildd/target/build_snap.py
index cd2e20a..3053788 100644
--- a/lpbuildd/target/build_snap.py
+++ b/lpbuildd/target/build_snap.py
@@ -101,7 +101,7 @@ class BuildSnap(
             help="disable proxy access after the pull phase has finished",
         )
         parser.add_argument(
-            "--use_fetch_service",
+            "--use-fetch-service",
             default=False,
             action="store_true",
             help="use the fetch service instead of the builder proxy",
diff --git a/lpbuildd/target/tests/test_build_craft.py b/lpbuildd/target/tests/test_build_craft.py
index 3d0edee..512056a 100644
--- a/lpbuildd/target/tests/test_build_craft.py
+++ b/lpbuildd/target/tests/test_build_craft.py
@@ -284,7 +284,7 @@ class TestBuildCraft(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -384,7 +384,7 @@ class TestBuildCraft(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -475,7 +475,7 @@ class TestBuildCraft(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -519,7 +519,7 @@ class TestBuildCraft(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -806,7 +806,7 @@ class TestBuildCraft(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
         ]
         build_craft = parse_args(args=args).operation
         build_craft.backend.build_path = self.useFixture(TempDir()).path
@@ -967,7 +967,7 @@ class TestBuildCraft(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
diff --git a/lpbuildd/target/tests/test_build_rock.py b/lpbuildd/target/tests/test_build_rock.py
index 4cc1555..6b6a934 100644
--- a/lpbuildd/target/tests/test_build_rock.py
+++ b/lpbuildd/target/tests/test_build_rock.py
@@ -289,7 +289,7 @@ class TestBuildRock(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -385,7 +385,7 @@ class TestBuildRock(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -472,7 +472,7 @@ class TestBuildRock(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -516,7 +516,7 @@ class TestBuildRock(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -803,7 +803,7 @@ class TestBuildRock(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
         ]
         build_rock = parse_args(args=args).operation
         build_rock.backend.build_path = self.useFixture(TempDir()).path
@@ -968,7 +968,7 @@ class TestBuildRock(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-image",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
diff --git a/lpbuildd/target/tests/test_build_snap.py b/lpbuildd/target/tests/test_build_snap.py
index 5c721f9..7ecff01 100644
--- a/lpbuildd/target/tests/test_build_snap.py
+++ b/lpbuildd/target/tests/test_build_snap.py
@@ -206,7 +206,7 @@ class TestBuildSnap(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-snap",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -304,7 +304,7 @@ class TestBuildSnap(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-snap",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -426,7 +426,7 @@ class TestBuildSnap(TestCase):
             "--branch",
             "lp:foo",
             "test-snap",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -462,7 +462,7 @@ class TestBuildSnap(TestCase):
             "--branch",
             "lp:foo",
             "test-snap",
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             # Base64 content_of_cert
             "Y29udGVudF9vZl9jZXJ0",
@@ -742,7 +742,7 @@ class TestBuildSnap(TestCase):
             "--proxy-url",
             "http://proxy.example:3128/";,
             "test-snap",
-            "--use_fetch_service",
+            "--use-fetch-service",
         ]
         build_snap = parse_args(args=args).operation
         build_snap.backend.build_path = self.useFixture(TempDir()).path
diff --git a/lpbuildd/tests/test_craft.py b/lpbuildd/tests/test_craft.py
index 723641f..8fad1b8 100644
--- a/lpbuildd/tests/test_craft.py
+++ b/lpbuildd/tests/test_craft.py
@@ -249,7 +249,7 @@ class TestCraftBuildManagerIteration(TestCase):
             "secrets": {"fetch_service_mitm_certificate": "content_of_cert"},
         }
         expected_options = [
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             "content_of_cert",
         ]
diff --git a/lpbuildd/tests/test_rock.py b/lpbuildd/tests/test_rock.py
index d4f8ad3..989dd01 100644
--- a/lpbuildd/tests/test_rock.py
+++ b/lpbuildd/tests/test_rock.py
@@ -248,7 +248,7 @@ class TestRockBuildManagerIteration(TestCase):
             "secrets": {"fetch_service_mitm_certificate": "content_of_cert"},
         }
         expected_options = [
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             "content_of_cert",
         ]
diff --git a/lpbuildd/tests/test_snap.py b/lpbuildd/tests/test_snap.py
index bf2adfa..724dd7f 100644
--- a/lpbuildd/tests/test_snap.py
+++ b/lpbuildd/tests/test_snap.py
@@ -763,7 +763,7 @@ class TestSnapBuildManagerIteration(TestCase):
             "secrets": {"fetch_service_mitm_certificate": "content_of_cert"},
         }
         expected_options = [
-            "--use_fetch_service",
+            "--use-fetch-service",
             "--fetch-service-mitm-certificate",
             "content_of_cert",
         ]

References