Handle failures in the bot_update script.
Currently, if the bot_update script fails, then recipe code that makes assumptions about the returned output JSON cause exceptions to be raised. This fixes a couple instances in the code so that the bot_update failure should surface instead of an uncaught exception. Change-Id: I031e613841b03e5eb4f6d9ca7adb5085088a3077 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2405708 Auto-Submit: Garrett Beaty <gbeaty@chromium.org> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>changes/08/2405708/2
parent
970bf5ad2c
commit
71198cd4a2
@ -0,0 +1,49 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-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",
|
||||
"src@2d72510e447ab60a9728aeea2362d8be2cbd7789",
|
||||
"--revision",
|
||||
"src/v8@HEAD",
|
||||
"--refs",
|
||||
"refs/heads/master",
|
||||
"--disable-syntax-validation"
|
||||
],
|
||||
"env": {
|
||||
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
|
||||
"GIT_HTTP_LOW_SPEED_TIME": "300"
|
||||
},
|
||||
"env_suffixes": {
|
||||
"DEPOT_TOOLS_UPDATE": [
|
||||
"0"
|
||||
],
|
||||
"PATH": [
|
||||
"RECIPE_REPO[depot_tools]"
|
||||
]
|
||||
},
|
||||
"infra_step": true,
|
||||
"name": "bot_update (without patch)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LOG_LINE@json.output@{@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@}@@@",
|
||||
"@@@STEP_LOG_END@json.output@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$result"
|
||||
}
|
||||
]
|
@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-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",
|
||||
"src@2d72510e447ab60a9728aeea2362d8be2cbd7789",
|
||||
"--refs",
|
||||
"refs/heads/master",
|
||||
"--disable-syntax-validation"
|
||||
],
|
||||
"env": {
|
||||
"GIT_HTTP_LOW_SPEED_LIMIT": "102400",
|
||||
"GIT_HTTP_LOW_SPEED_TIME": "300"
|
||||
},
|
||||
"env_suffixes": {
|
||||
"DEPOT_TOOLS_UPDATE": [
|
||||
"0"
|
||||
],
|
||||
"PATH": [
|
||||
"RECIPE_REPO[depot_tools]"
|
||||
]
|
||||
},
|
||||
"infra_step": true,
|
||||
"name": "bot_update (without patch)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LOG_LINE@json.output@{@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@}@@@",
|
||||
"@@@STEP_LOG_END@json.output@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$result"
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue