launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #21268
[Merge] lp:~cjwatson/launchpad/snap-optional-proxy into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/snap-optional-proxy into lp:launchpad.
Commit message:
Make the snap builder proxy optional.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/snap-optional-proxy/+merge/312476
It's due to go away eventually, and this makes local testing less painful.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/snap-optional-proxy into lp:launchpad.
=== modified file 'lib/lp/snappy/model/snapbuildbehaviour.py'
--- lib/lp/snappy/model/snapbuildbehaviour.py 2016-09-21 02:50:41 +0000
+++ lib/lp/snappy/model/snapbuildbehaviour.py 2016-12-05 15:34:23 +0000
@@ -83,17 +83,18 @@
"""
build = self.build
args = {}
- token = yield self._requestProxyToken()
- args["proxy_url"] = (
- "http://{username}:{password}@{host}:{port}".format(
- username=token['username'],
- password=token['secret'],
- host=config.snappy.builder_proxy_host,
- port=config.snappy.builder_proxy_port))
- args["revocation_endpoint"] = (
- "{endpoint}/{token}".format(
- endpoint=config.snappy.builder_proxy_auth_api_endpoint,
- token=token['username']))
+ if config.snappy.builder_proxy_host:
+ token = yield self._requestProxyToken()
+ args["proxy_url"] = (
+ "http://{username}:{password}@{host}:{port}".format(
+ username=token['username'],
+ password=token['secret'],
+ host=config.snappy.builder_proxy_host,
+ port=config.snappy.builder_proxy_port))
+ args["revocation_endpoint"] = (
+ "{endpoint}/{token}".format(
+ endpoint=config.snappy.builder_proxy_auth_api_endpoint,
+ token=token['username']))
args["name"] = build.snap.name
args["arch_tag"] = build.distro_arch_series.architecturetag
# XXX cjwatson 2015-08-03: Allow tools_source to be overridden at
Follow ups