Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: scripts/master/buildbucket/client.py

Issue 2133263002: buildbucket: always bypass cloud endpoints server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/buildbucket/client.py
diff --git a/scripts/master/buildbucket/client.py b/scripts/master/buildbucket/client.py
index f91f26d319d355b5ff453f1dafd486da6997575d..6d476ef722629130ee3570241cf7fd83ac3c1786 100644
--- a/scripts/master/buildbucket/client.py
+++ b/scripts/master/buildbucket/client.py
@@ -22,12 +22,6 @@ THIS_DIR = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
DISCOVERY_DOC_PATH = os.path.join(THIS_DIR, 'discovery_doc.json')
-# A list of buckets for which we bypass Cloud Endpoints proxy.
-BYPASS_ENDPOINTS_WHITELIST = {
- 'master.tryserver.infra',
-}
-
-
def get_default_buildbucket_hostname(master):
return (
BUILDBUCKET_HOSTNAME_PRODUCTION if master.is_production_host
@@ -53,13 +47,14 @@ def create_buildbucket_service(master, hostname=None, verbose=None):
# This block of code is adapted from
# https://chromium.googlesource.com/chromium/tools/build/+/08b404f/third_party/google_api_python_client/googleapiclient/discovery.py#146
# https://chromium.googlesource.com/chromium/tools/build/+/08b404f/third_party/google_api_python_client/googleapiclient/discovery.py#218
- baseUrl = 'https://%s/%sapi/buildbucket/v1/' % (
- hostname,
- '' if master.buildbucket_bucket in BYPASS_ENDPOINTS_WHITELIST else '_ah/',
- )
resource = apiclient.discovery.Resource(
http=httplib2.Http(),
- baseUrl=baseUrl,
+ # Note that this does not include _ah/ in URL path, which means
+ # we bypass Cloud Endpoints proxy server. See also:
+ # https://bugs.chromium.org/p/chromium/issues/detail?id=626650
+ # https://codereview.chromium.org/2117833003/
+ # https://codereview.chromium.org/2116783003/
+ baseUrl='https://%s/api/buildbucket/v1/' % hostname,
model=apiclient.model.JsonModel(False),
requestBuilder=apiclient.http.HttpRequest,
developerKey=None,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698