From 3589c484711b15feb427d36c61aa2257d8e167bc Mon Sep 17 00:00:00 2001 From: Ben Segall Date: Mon, 24 Jul 2023 17:42:55 +0000 Subject: [PATCH] [reclient] Workaround to remove mdproxy prodcertstatus from path mdproxy/bin/prodcertstatus confuses the automatic auth logic in reproxy This will be fixed in the next release but for now we remove mdproxy from the path for autoninja builds Test: Installed mdproxy locally and verified that gcert is not called Change-Id: I0912a3c8b00a0cda41a85a16f51b8f54b20f1974 Bug: b/292523514 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4712465 Auto-Submit: Ben Segall Reviewed-by: Ramy Medhat Commit-Queue: Ben Segall --- reclient_helper.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reclient_helper.py b/reclient_helper.py index eca6bdd7a..f7fb3a056 100644 --- a/reclient_helper.py +++ b/reclient_helper.py @@ -111,6 +111,12 @@ def set_reproxy_metrics_flags(tool): os.environ.setdefault("RBE_metrics_prefix", "go.chromium.org") +def remove_mdproxy_from_path(): + os.environ["PATH"] = os.pathsep.join( + d for d in os.environ.get("PATH", "").split(os.pathsep) + if "mdproxy" not in d) + + def set_reproxy_path_flags(out_dir, make_dirs=True): """Helper to setup the logs and cache directories for reclient. @@ -202,6 +208,9 @@ def build_context(argv, tool): print('WARNING: Using RBE_instance=%s\n' % os.environ.get('RBE_instance', '')) + # TODO(b/292523514) remove this once a fix is landed in reproxy + remove_mdproxy_from_path() + reproxy_ret_code = start_reproxy(reclient_cfg, reclient_bin_dir) if reproxy_ret_code != 0: yield reproxy_ret_code