From d686b1d1c87f84e08c7aa926536598f4c81d9819 Mon Sep 17 00:00:00 2001 From: Edward Lesmes Date: Tue, 26 Jan 2021 21:34:16 +0000 Subject: [PATCH] bot_update: Set encrypted debug headers when retrying fetch. Bug: b/178502800 Bug: 1170806 Change-Id: If66cf06b9954520ddd909dce869e2a15da3055ea Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2650965 Commit-Queue: Josip Sokcevic Reviewed-by: Josip Sokcevic Auto-Submit: Edward Lesmes --- recipes/recipe_modules/bot_update/resources/bot_update.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index f22326a28..9d0250601 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -720,6 +720,9 @@ def _git_checkout(sln, sln_dir, revisions, refs, no_fetch_tags, git_cache_dir, env = { 'GIT_TRACE': 'true', 'GIT_TRACE_PERFORMANCE': 'true', + 'GIT_TRACE_CURL': 'true', + 'GIT_TRACE_CURL_NO_DATA': 'true', + 'GIT_REDACT_COOKIES': 'o,SSO,GSSO_UberProxy,__Secure-GSSO_UberProxy', } branch, revision = get_target_branch_and_revision(name, url, revisions) @@ -745,7 +748,9 @@ def _git_checkout(sln, sln_dir, revisions, refs, no_fetch_tags, git_cache_dir, # TODO(tandrii): propagate the pin to git server per recommendation of # maintainers of *.googlesource.com (workaround git server replication # lag). - git(*populate_cmd, env=env) + with git_config_if_not_set( + 'http.extraheader', 'X-Return-Encrypted-Headers: all'): + git(*populate_cmd, env=env) if _has_in_git_cache(pin, refs, git_cache_dir, url): break overrun = time.time() - soft_deadline