launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29047
[Merge] ~jugmac00/launchpad:remove-apt-repositories-remains into launchpad:master
Jürgen Gmach has proposed merging ~jugmac00/launchpad:remove-apt-repositories-remains into launchpad:master.
Commit message:
Remove `apt-repositories` remains
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~jugmac00/launchpad/+git/launchpad/+merge/428741
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad:remove-apt-repositories-remains into launchpad:master.
diff --git a/lib/lp/code/model/cibuildbehaviour.py b/lib/lp/code/model/cibuildbehaviour.py
index a3e2439..04ce888 100644
--- a/lib/lp/code/model/cibuildbehaviour.py
+++ b/lib/lp/code/model/cibuildbehaviour.py
@@ -55,23 +55,6 @@ def build_environment_variables(distribution_name: str) -> dict:
return rv
-def build_apt_repositories(distribution_name: str) -> list:
- # deprecated - will be removed in favor of `build_package_repositories`
- # once the renaming process had been finished
- # - load apt repository configuration lines from JSON Array
- # - replace authentication placeholder
- try:
- lines = config["cibuild." + distribution_name]["apt_repositories"]
- except NoSectionError:
- return []
- if lines is None:
- return []
- rv = []
- for line in json.loads(lines):
- rv.append(replace_auth_placeholder(line))
- return rv
-
-
def build_package_repositories(distribution_name: str) -> list:
# - load package repository configuration lines from JSON Array
# - replace authentication placeholder
@@ -207,9 +190,6 @@ class CIBuildBehaviour(BuilderProxyMixin, BuildFarmJobBehaviourBase):
args["environment_variables"] = build_environment_variables(
distribution_name
)
- args["apt_repositories"] = build_apt_repositories(
- distribution_name
- )
args["package_repositories"] = build_package_repositories(
distribution_name
)
diff --git a/lib/lp/code/model/tests/test_cibuildbehaviour.py b/lib/lp/code/model/tests/test_cibuildbehaviour.py
index d9cb423..46cea3c 100644
--- a/lib/lp/code/model/tests/test_cibuildbehaviour.py
+++ b/lib/lp/code/model/tests/test_cibuildbehaviour.py
@@ -333,12 +333,6 @@ class TestAsyncCIBuildBehaviour(StatsMixin, TestCIBuildBehaviourBase):
"SOME_PATH": "/bin/zip",
}
),
- apt_repositories=json.dumps(
- [
- "deb https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe", # noqa: E501
- "deb https://public_ppa.example.net/repository focal main",
- ]
- ),
package_repositories=json.dumps(
[
"deb https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe", # noqa: E501
@@ -365,7 +359,6 @@ class TestAsyncCIBuildBehaviour(StatsMixin, TestCIBuildBehaviourBase):
# make sure the distribution specific additional args are included
# but have no values set
self.assertEqual({}, args["environment_variables"])
- self.assertEqual([], args["apt_repositories"])
self.assertEqual([], args["package_repositories"])
self.assertEqual({}, args["plugin_settings"])
self.assertEqual({}, args["secrets"])
@@ -385,7 +378,6 @@ class TestAsyncCIBuildBehaviour(StatsMixin, TestCIBuildBehaviourBase):
with dbuser(config.builddmaster.dbuser):
args = yield job.extraBuildArgs()
self.assertEqual({}, args["environment_variables"])
- self.assertNotIn([], args["apt_repositories"])
self.assertNotIn([], args["package_repositories"])
@defer.inlineCallbacks
@@ -402,12 +394,6 @@ class TestAsyncCIBuildBehaviour(StatsMixin, TestCIBuildBehaviourBase):
"SOME_PATH": "/bin/zip",
}
),
- apt_repositories=json.dumps(
- [
- "deb https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe", # noqa: E501
- "deb https://public_ppa.example.net/repository focal main",
- ]
- ),
package_repositories=json.dumps(
[
"deb https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe", # noqa: E501
@@ -466,12 +452,6 @@ class TestAsyncCIBuildBehaviour(StatsMixin, TestCIBuildBehaviourBase):
"SOME_PATH": "/bin/zip",
}
),
- "apt_repositories": Equals(
- [
- "deb https://user:pass@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe", # noqa: E501
- "deb https://public_ppa.example.net/repository focal main", # noqa: E501
- ]
- ),
"package_repositories": Equals(
[
"deb https://user:pass@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe", # noqa: E501
diff --git a/lib/lp/services/config/schema-lazr.conf b/lib/lp/services/config/schema-lazr.conf
index 68aa6f5..3d2386c 100644
--- a/lib/lp/services/config/schema-lazr.conf
+++ b/lib/lp/services/config/schema-lazr.conf
@@ -244,13 +244,11 @@ salsa.debian.org.token: none
# example:
# environment_variables: {"PIP_INDEX_URL": "https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/api/pypi/soss-python-stable/simple/"}
environment_variables: none
+
# value is a JSON Array
-# example:
-# (deprecated - remove once the renaming into `package_repositories` had been done)
-# apt_repositories: ["deb https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe"]
-apt_repositories: none
# package_repositories: ["deb https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe"]
package_repositories: none
+
# value is a JSON Object
# example:
# plugin_settings: {"miniconda_conda_channel": "https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-conda-stable-local/"}