From 23247b99321549c24e62ad45200409419423695d Mon Sep 17 00:00:00 2001 From: danakj Date: Wed, 6 Nov 2019 19:33:06 +0000 Subject: [PATCH] Don't fetch tags when fetching to deapply a patch. Bug: 1019824 Change-Id: Ibec0b47067345150dbd2083265c49fb9b6769a3a Recipe-Nontrivial-Roll: build Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1894408 Commit-Queue: danakj Reviewed-by: Aaron Gable --- recipes/recipe_modules/bot_update/api.py | 6 ++---- .../bot_update/examples/full.expected/clobber.json | 3 ++- .../full.expected/deprecated_got_revision_mapping.json | 3 ++- .../examples/full.expected/gerrit_no_rebase_patch_ref.json | 3 ++- .../bot_update/examples/full.expected/gerrit_no_reset.json | 3 ++- .../full.expected/input_commit_with_id_without_repo.json | 3 ++- .../examples/full.expected/multiple_patch_refs.json | 3 ++- .../examples/full.expected/no_apply_patch_on_gclient.json | 3 ++- .../bot_update/examples/full.expected/refs.json | 3 ++- .../full.expected/reset_root_solution_revision.json | 3 ++- .../examples/full.expected/tryjob_gerrit_angle.json | 3 ++- .../examples/full.expected/tryjob_gerrit_branch_heads.json | 3 ++- .../full.expected/tryjob_gerrit_feature_branch.json | 3 ++- .../full.expected/tryjob_gerrit_v8_feature_branch.json | 3 ++- .../examples/full.expected/tryjob_gerrit_webrtc.json | 3 ++- .../bot_update/examples/full.expected/tryjob_v8.json | 3 ++- .../examples/full.expected/tryjob_v8_head_by_default.json | 3 ++- .../bot_update/examples/full.expected/with_tags.json | 3 ++- 18 files changed, 36 insertions(+), 21 deletions(-) diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index 38acec94b8..b1f73851e4 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -510,7 +510,5 @@ class BotUpdateApi(recipe_api.RecipeApi): bot_update_json['properties'][rev_property]) self._resolve_fixed_revisions(bot_update_json) - # TODO(crbug.com/1019824): Pass |no_fetch_tags=True| here to prevent - # fetching 10k+ tags for chromium. This operation shouldn't need tags, it is - # removing a previously applied patch. - self.ensure_checkout(patch=False, update_presentation=False) + self.ensure_checkout( + patch=False, no_fetch_tags=True, update_presentation=False) diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json b/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json index 7f7ad42802..876fccdc41 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json @@ -119,7 +119,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json b/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json index 5a7faf4cd0..f0c9278699 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json @@ -125,7 +125,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json index 1d6fe688b4..633a2b3aec 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json @@ -119,7 +119,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json index b690d7cd10..a495898285 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json @@ -119,7 +119,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json b/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json index 65b96f5277..b57e5608a9 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json @@ -118,7 +118,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json b/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json index c8dbb1571c..da7de9af71 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json @@ -122,7 +122,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json b/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json index 1c496d3527..5e2ea87cf3 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json @@ -169,7 +169,8 @@ "--revision", "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", "--revision", - "src/third_party/angle@fac9503c46405f77757b9a728eb85b8d7bc6080c" + "src/third_party/angle@fac9503c46405f77757b9a728eb85b8d7bc6080c", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/refs.json b/recipes/recipe_modules/bot_update/examples/full.expected/refs.json index 081fe03152..780d274103 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/refs.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/refs.json @@ -120,7 +120,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json b/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json index e8f9435d80..3f9d8a5e6b 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json @@ -118,7 +118,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json index 1c496d3527..5e2ea87cf3 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json @@ -169,7 +169,8 @@ "--revision", "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", "--revision", - "src/third_party/angle@fac9503c46405f77757b9a728eb85b8d7bc6080c" + "src/third_party/angle@fac9503c46405f77757b9a728eb85b8d7bc6080c", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json index 621ef0fca5..67a66749b9 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json @@ -166,7 +166,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json index beed9a5111..047f77e1a5 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json @@ -166,7 +166,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json index 8bd5a4f317..d56f7441a3 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json @@ -169,7 +169,8 @@ "--revision", "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", "--revision", - "src/v8@801ada225ddc271c132c3a35f03975671d43e399" + "src/v8@801ada225ddc271c132c3a35f03975671d43e399", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json index a43fd3b2a5..c409202c46 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json @@ -169,7 +169,8 @@ "--revision", "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", "--revision", - "src/third_party/webrtc@HEAD" + "src/third_party/webrtc@HEAD", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json index a0f6e80fe6..c09ea78411 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json @@ -169,7 +169,8 @@ "--revision", "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", "--revision", - "src/v8@801ada225ddc271c132c3a35f03975671d43e399" + "src/v8@801ada225ddc271c132c3a35f03975671d43e399", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json index bba65b5178..7eefde5be3 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json @@ -169,7 +169,8 @@ "--revision", "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", "--revision", - "src/v8@801ada225ddc271c132c3a35f03975671d43e399" + "src/v8@801ada225ddc271c132c3a35f03975671d43e399", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [ diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json b/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json index 9053e92788..bd59fdbf0e 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json @@ -119,7 +119,8 @@ "--output_json", "/path/to/tmp/json", "--revision", - "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9" + "src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9", + "--no_fetch_tags" ], "env_suffixes": { "PATH": [