From b4102e43a02805cf7bcb100446d27caef1b4e51d Mon Sep 17 00:00:00 2001 From: Brian Sheedy Date: Wed, 17 Jul 2024 18:49:24 +0000 Subject: [PATCH] Revert "Add a recipe property to override bot_update's STALE_PROCESS_DURATION." This reverts commit 1c0a575c4c8d81efe442e1d4211a3a126759817c. Reason for revert: Suspected of causing infra failures on bots like https://ci.chromium.org/ui/p/dawn/builders/try/cmake-linux-clang-dbg-x64/b8742144151501823569/infra. Long-term should be fixed by removing the invalid configs, but need to prevent these infra failures for now. Original change's description: > Add a recipe property to override bot_update's STALE_PROCESS_DURATION. > > Bug: 353444802 > Change-Id: I8d174e28fbbd552be591c8a4c1308a29de47d0b6 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5713191 > Reviewed-by: Yiwei Zhang > Commit-Queue: Brian Ryner Bug: 353444802 Change-Id: I0a109304c6de16f96ceff7ca1e64e3cd10d6cf4a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5718634 Auto-Submit: Brian Sheedy Bot-Commit: Rubber Stamper Reviewed-by: Yiwei Zhang Commit-Queue: Yiwei Zhang Reviewed-by: Brian Ryner --- recipes/README.recipes.md | 12 +- recipes/recipe_modules/bot_update/__init__.py | 4 +- recipes/recipe_modules/bot_update/api.py | 4 - .../stale-process-duration-override.json | 149 ------------------ .../bot_update/examples/full.py | 6 - 5 files changed, 7 insertions(+), 168 deletions(-) delete mode 100644 recipes/recipe_modules/bot_update/examples/full.expected/stale-process-duration-override.json diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index fded3c6ca..98c2dfd2a 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -59,16 +59,16 @@ Recipe module to ensure a checkout is consistent on a bot. #### **class [BotUpdateApi](/recipes/recipe_modules/bot_update/api.py#71)([RecipeApi][recipe_engine/wkt/RecipeApi]):** -— **def [\_\_call\_\_](/recipes/recipe_modules/bot_update/api.py#80)(self, name, cmd, \*\*kwargs):** +— **def [\_\_call\_\_](/recipes/recipe_modules/bot_update/api.py#79)(self, name, cmd, \*\*kwargs):** Wrapper for easy calling of bot_update. -— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#672)(self, bot_update_result):** +— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#668)(self, bot_update_result):** Deapplies a patch, taking care of DEPS and solution revisions properly. -— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#191)(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, download_topics=False, recipe_revision_overrides=None, \*\*kwargs):** +— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#187)(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, download_topics=False, recipe_revision_overrides=None, \*\*kwargs):** Args: * gclient_config: The gclient configuration to use when running bot_update. @@ -104,7 +104,7 @@ Args: change's commit message to get this revision override requested by the author. -— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#649)(self, project_name, gclient_config=None):** +— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#645)(self, project_name, gclient_config=None):** Returns all property names used for storing the checked-out revision of a given project. @@ -118,9 +118,9 @@ Args: Returns (list of str): All properties that'll hold the checked-out revision of the given project. An empty list if no such properties exist. -  **@property**
— **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#99)(self):** +  **@property**
— **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#98)(self):** -— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#600)(self, bot_update_result, name):** +— **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#596)(self, bot_update_result, name):** Sets a fixed revision for a single dependency using project revision properties. diff --git a/recipes/recipe_modules/bot_update/__init__.py b/recipes/recipe_modules/bot_update/__init__.py index 9035c4533..74efdbc11 100644 --- a/recipes/recipe_modules/bot_update/__init__.py +++ b/recipes/recipe_modules/bot_update/__init__.py @@ -25,7 +25,6 @@ DEPS = [ ] from recipe_engine.recipe_api import Property -from recipe_engine.config import ConfigGroup, Single PROPERTIES = { # Gerrit patches will have all properties about them prefixed with patch_. @@ -35,10 +34,9 @@ PROPERTIES = { Property( help='Properties specific to bot_update module.', param_name='properties', - kind=ConfigGroup(stale_process_duration_override=Single(int)), default={}, ), } # Forward these types so that they can be used without importing api -from .api import RelativeRoot, Result +from .api import RelativeRoot, Result \ No newline at end of file diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py index 315ff89c1..a331475da 100644 --- a/recipes/recipe_modules/bot_update/api.py +++ b/recipes/recipe_modules/bot_update/api.py @@ -75,7 +75,6 @@ class BotUpdateApi(recipe_api.RecipeApi): self._last_returned_properties = {} super(BotUpdateApi, self).__init__(*args, **kwargs) - self._bot_update_properties = properties def __call__(self, name, cmd, **kwargs): """Wrapper for easy calling of bot_update.""" @@ -164,9 +163,6 @@ class BotUpdateApi(recipe_api.RecipeApi): self.m.buildbucket.build.builder.bucket, self.m.buildbucket.build.builder.builder, self.m.buildbucket.build.id) - if 'stale_process_duration_override' in self._bot_update_properties: - env['STALE_PROCESS_DURATION'] = self._bot_update_properties[ - 'stale_process_duration_override'] return env def _upload_traces(self): diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/stale-process-duration-override.json b/recipes/recipe_modules/bot_update/examples/full.expected/stale-process-duration-override.json deleted file mode 100644 index e723238d2..000000000 --- a/recipes/recipe_modules/bot_update/examples/full.expected/stale-process-duration-override.json +++ /dev/null @@ -1,149 +0,0 @@ -[ - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", - "--spec-path", - "cache_dir = '[CACHE]/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]", - "--revision_mapping_file", - "{\"got_angle_revision\": \"src/third_party/angle\", \"got_cr_revision\": \"src\", \"got_revision\": \"src\", \"got_v8_revision\": \"src/v8\"}", - "--git-cache-dir", - "[CACHE]/git", - "--cleanup-dir", - "[CLEANUP]/bot_update", - "--output_json", - "/path/to/tmp/json", - "--revision", - "infra@HEAD", - "--revision", - "src@2d72510e447ab60a9728aeea2362d8be2cbd7789", - "--refs", - "refs/heads/main" - ], - "env": { - "DEPOT_TOOLS_REPORT_BUILD": "chromium/src/ci/linux/8945511751514863184", - "GIT_BACKENDINFO": "1", - "GIT_DAPPER_TRACE": "1", - "GIT_HTTP_LOW_SPEED_LIMIT": "102400", - "GIT_HTTP_LOW_SPEED_TIME": "1800", - "GIT_SSH_COMMAND": "ssh -o SendEnv=GIT_DAPPER_TRACE -o SendEnv=GIT_BACKENDINFO", - "GIT_TRACE2_EVENT": "[CLEANUP]/trace2-event", - "GIT_TRACE_CURL": "[CLEANUP]/trace-curl", - "GIT_TRACE_CURL_NO_DATA": "1", - "GIT_TRACE_PACKET": "[CLEANUP]/trace-packet", - "STALE_PROCESS_DURATION": "3000" - }, - "env_suffixes": { - "DEPOT_TOOLS_UPDATE": [ - "0" - ], - "PATH": [ - "RECIPE_REPO[depot_tools]" - ] - }, - "infra_step": true, - "luci_context": { - "realm": { - "name": "chromium/src:ci" - }, - "resultdb": { - "current_invocation": { - "name": "invocations/build:8945511751514863184", - "update_token": "token" - }, - "hostname": "rdbhost" - } - }, - "name": "bot_update (without patch)", - "~followup_annotations": [ - "@@@STEP_TEXT@Some step text@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"did_run\": true,@@@", - "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"infra\": \"HEAD\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"infra\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/infra.git\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"5e03a58dc0850e5137a8ebbce29610670c756aed\"@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src.git\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"src/third_party/angle\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src/third_party/angle.git\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\"@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"src/v8\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src/v8.git\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"801ada225ddc271c132c3a35f03975671d43e399\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"patch_root\": null,@@@", - "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_angle_revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_angle_revision_cp\": \"refs/heads/main@{#297276}\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_cr_revision\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_cr_revision_cp\": \"refs/heads/main@{#170242}\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/main@{#170242}\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_v8_revision\": \"801ada225ddc271c132c3a35f03975671d43e399\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_v8_revision_cp\": \"refs/heads/main@{#43426}\"@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"root\": \"src\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"infra\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/infra.git\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"5e03a58dc0850e5137a8ebbce29610670c756aed\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"src\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/src.git\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"src/third_party/angle\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/src/third_party/angle.git\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"src/v8\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/src/v8.git\",@@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"801ada225ddc271c132c3a35f03975671d43e399\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"version\": 0@@@", - "@@@STEP_LOG_LINE@json.output@ },@@@", - "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@SET_BUILD_PROPERTY@got_angle_revision@\"fac9503c46405f77757b9a728eb85b8d7bc6080c\"@@@", - "@@@SET_BUILD_PROPERTY@got_angle_revision_cp@\"refs/heads/main@{#297276}\"@@@", - "@@@SET_BUILD_PROPERTY@got_cr_revision@\"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", - "@@@SET_BUILD_PROPERTY@got_cr_revision_cp@\"refs/heads/main@{#170242}\"@@@", - "@@@SET_BUILD_PROPERTY@got_revision@\"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", - "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/main@{#170242}\"@@@", - "@@@SET_BUILD_PROPERTY@got_v8_revision@\"801ada225ddc271c132c3a35f03975671d43e399\"@@@", - "@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/main@{#43426}\"@@@" - ] - }, - { - "cmd": [], - "name": "set_output_gitiles_commit", - "~followup_annotations": [ - "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/main\"}@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/bot_update/examples/full.py b/recipes/recipe_modules/bot_update/examples/full.py index e216069ca..1939e0b5b 100644 --- a/recipes/recipe_modules/bot_update/examples/full.py +++ b/recipes/recipe_modules/bot_update/examples/full.py @@ -341,9 +341,3 @@ def GenTests(api): ci_build(revision='HEAD'), api.bot_update.commit_positions(False), ) - - yield (api.test('stale-process-duration-override') + api.properties( - ** - {'$depot_tools/bot_update': { - 'stale_process_duration_override': 3000, - }}) + ci_build())