From 48823c28549dd8055e16e4046215b929cd1eaeec Mon Sep 17 00:00:00 2001 From: John Budorick Date: Wed, 30 Oct 2019 19:48:57 +0000 Subject: [PATCH] Revert "Add more git tracing." This reverts commit 1e4dbf3f6432b8bf0a06877b8ae0ddd92a311197. Reason for revert: unlikely but possible cause of http://shortn/_sgL4PqICVB Original change's description: > Add more git tracing. > > This CL adds more perf tracing to `git fetch` from bot_update.py and > git_cache.py > > Change-Id: I9b69c60b6c81fc0c5f23f82fcc889b4d45a27556 > Recipe-Nontrivial-Roll: build_limited_scripts_slave > Recipe-Nontrivial-Roll: build > Recipe-Nontrivial-Roll: infra > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1888433 > Reviewed-by: Andrii Shyshkalov > Commit-Queue: Erik Chen > Auto-Submit: Erik Chen TBR=danakj@chromium.org,tandrii@google.com,erikchen@chromium.org Change-Id: I03b33bf1532212f83a6b89b1de32fafb6b8aafc4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1891001 Reviewed-by: John Budorick Commit-Queue: John Budorick --- git_cache.py | 9 +++++++++ .../recipe_modules/bot_update/resources/bot_update.py | 9 ++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/git_cache.py b/git_cache.py index 02a09beaa..772dbea12 100755 --- a/git_cache.py +++ b/git_cache.py @@ -552,6 +552,14 @@ class Mirror(object): spec = spec.decode() try: self.print('Fetching %s' % spec) + env = os.environ.copy() + env.update({ + 'GIT_TRACE_PACKET': '1', + 'GIT_TR2_EVENT': '1', + 'GIT_TRACE2_EVENT': '1', + 'GIT_TRACE_CURL': '1', + 'GIT_TRACE_CURL_NO_DATA': '1' + }) # Only print first 30000 packets. We can use nonlocal keyword once we # switch to python 3. packet_count = [0] @@ -570,6 +578,7 @@ class Mirror(object): fetch_cmd + [spec], cwd=rundir, retry=True, + env=env, filter_fn=FilterPacket) except subprocess.CalledProcessError: if spec == '+refs/heads/*:refs/heads/*': diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index 32ae948fe..b1d1fb854 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -666,11 +666,6 @@ def _git_checkout(sln, sln_dir, revisions, refs, git_cache_dir, cleanup_dir): env = { 'GIT_TRACE': 'true', 'GIT_TRACE_PERFORMANCE': 'true', - 'GIT_TRACE_PACKET': '1', - 'GIT_TRACE2_EVENT': '1', - 'GIT_TRACE_CURL': '1', - 'GIT_TRACE_CURL_NO_DATA': '1', - 'INFRA_GIT_WRAPPER_TRACE': '1', } # Step 1: populate/refresh cache, if necessary. @@ -728,11 +723,11 @@ def _git_checkout(sln, sln_dir, revisions, refs, git_cache_dir, cleanup_dir): else: _git_disable_gc(sln_dir) git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir) - git('fetch', 'origin', cwd=sln_dir, env=env) + git('fetch', 'origin', cwd=sln_dir) git('remote', 'set-url', '--push', 'origin', url, cwd=sln_dir) for ref in refs: refspec = '%s:%s' % (ref, ref.lstrip('+')) - git('fetch', 'origin', refspec, cwd=sln_dir, env=env) + git('fetch', 'origin', refspec, cwd=sln_dir) # Windows sometimes has trouble deleting files. # This can make git commands that rely on locks fail.