From ffeef9001edb33e16e6a72db746cdb8d2cf6c568 Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Wed, 6 Apr 2022 01:33:23 +0000 Subject: [PATCH] bot_update: change set_output_commit to True by default This is for https://crbug.com/1310066#c7 Bug: 1310066 Recipe-Nontrivial-Roll: infra Recipe-Nontrivial-Roll: build_limited Recipe-Nontrivial-Roll: build Change-Id: I874e1a4c2ca53a7da04d6c24533429d7508088a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3565259 Reviewed-by: Robbie Iannucci Reviewed-by: Josip Sokcevic Commit-Queue: Takuto Ikuta Auto-Submit: Takuto Ikuta --- recipes/README.recipes.md | 2 +- recipes/recipe_modules/bot_update/api.py | 2 +- .../bot_update/examples/full.expected/clobber.json | 7 +++++++ .../examples/full.expected/gerrit_no_rebase_patch_ref.json | 7 +++++++ .../bot_update/examples/full.expected/gerrit_no_reset.json | 7 +++++++ .../full.expected/input_commit_with_id_without_repo.json | 7 +++++++ .../examples/full.expected/multiple_patch_refs.json | 7 +++++++ .../examples/full.expected/no_apply_patch_on_gclient.json | 7 +++++++ .../bot_update/examples/full.expected/refs.json | 7 +++++++ .../full.expected/reset_root_solution_revision.json | 7 +++++++ .../examples/full.expected/tryjob_gerrit_angle.json | 7 +++++++ .../examples/full.expected/tryjob_gerrit_branch_heads.json | 7 +++++++ .../full.expected/tryjob_gerrit_feature_branch.json | 7 +++++++ .../full.expected/tryjob_gerrit_v8_feature_branch.json | 7 +++++++ .../examples/full.expected/tryjob_gerrit_webrtc.json | 7 +++++++ .../bot_update/examples/full.expected/tryjob_v8.json | 7 +++++++ .../examples/full.expected/tryjob_v8_head_by_default.json | 7 +++++++ .../examples/full.expected/with_experiments.json | 7 +++++++ .../bot_update/examples/full.expected/with_tags.json | 7 +++++++ 19 files changed, 121 insertions(+), 2 deletions(-) diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 9656f32648..08dbe90cac 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -64,7 +64,7 @@ Wrapper for easy calling of bot_update. Deapplies a patch, taking care of DEPS and solution revisions properly. -— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#81)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, with_branch_heads=False, with_tags=False, no_fetch_tags=False, refs=None, clobber=False, root_solution_revision=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, assert_one_gerrit_change=True, patch_refs=None, ignore_input_commit=False, add_blamelists=False, set_output_commit=False, step_test_data=None, enforce_fetch=False, \*\*kwargs):** +— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#81)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, with_branch_heads=False, with_tags=False, no_fetch_tags=False, refs=None, clobber=False, root_solution_revision=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, assert_one_gerrit_change=True, patch_refs=None, ignore_input_commit=False, add_blamelists=False, set_output_commit=True, step_test_data=None, enforce_fetch=False, \*\*kwargs):** Args: * gclient_config: The gclient configuration to use when running bot_update. diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index 4a3cfbd505..21e5e390c0 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -96,7 +96,7 @@ class BotUpdateApi(recipe_api.RecipeApi): patch_refs=None, ignore_input_commit=False, add_blamelists=False, - set_output_commit=False, + set_output_commit=True, step_test_data=None, enforce_fetch=False, **kwargs): 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 85836e51b8..76c7dd080c 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json @@ -206,6 +206,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 8d2121f72f..d4cd50a0d5 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 @@ -206,6 +206,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 588a4fdda9..80c5a82dc2 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 @@ -206,6 +206,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 feea56f4e5..07e5032a66 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 @@ -227,6 +227,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 d9290ef395..f1ed17fa43 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 @@ -209,6 +209,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 2530ac7431..d1c10b27ed 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 @@ -296,6 +296,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 94bf91c299..6bac4217dc 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/refs.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/refs.json @@ -207,6 +207,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 3bae564783..b2bbda6c6a 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 @@ -205,6 +205,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"b0ff6a5b8b2bd8a31e9b5e29710da5275f0a9322\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 2530ac7431..d1c10b27ed 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 @@ -296,6 +296,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 e66b6cbd7f..4071262379 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 @@ -292,6 +292,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 690f046fa7..b8e978ca51 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 @@ -292,6 +292,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 928e1cebae..d83dd3f685 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 @@ -296,6 +296,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 732942b286..302da23311 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 @@ -316,6 +316,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 6240d43e27..c8d4354f49 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 @@ -296,6 +296,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 062ea61d6f..41ed7dd9b1 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 @@ -296,6 +296,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/with_experiments.json b/recipes/recipe_modules/bot_update/examples/full.expected/with_experiments.json index fb4e15655c..46b624516f 100644 --- a/recipes/recipe_modules/bot_update/examples/full.expected/with_experiments.json +++ b/recipes/recipe_modules/bot_update/examples/full.expected/with_experiments.json @@ -207,6 +207,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" } 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 502f4beea7..ba3b687f13 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 @@ -206,6 +206,13 @@ "@@@STEP_LOG_END@json.output@@@" ] }, + { + "cmd": [], + "name": "set_output_gitiles_commit (2)", + "~followup_annotations": [ + "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" + ] + }, { "name": "$result" }