Enable set_output_commit to be used with RevisionFallbackChain.
When set_output_commit is True and the repo associated with the got_revision property does not use commit positions, buiders whose gclient config uses RevisionFallbackChain for that repo will raise an exception when attempting set the output commit because a string is expected for the revision value, not a RevisionFallbackChain object. This changes the set_output_commit code to resolve the revision so that the output commit can be set in those cases. Bug: 1159749, 1141886 Change-Id: Iddf1d49871028d9500eefb0eed07e36ce7e6b0d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2612223 Auto-Submit: Garrett Beaty <gbeaty@chromium.org> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>changes/23/2612223/2
parent
1c3c939119
commit
e856b6bba8
@ -0,0 +1,78 @@
|
||||
[
|
||||
{
|
||||
"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",
|
||||
"--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_TEXT@Some step text@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@{@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"src\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src.git\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
||||
"@@@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@ \"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\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
||||
"@@@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_revision@\"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmd": [],
|
||||
"name": "set_output_gitiles_commit",
|
||||
"~followup_annotations": [
|
||||
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$result"
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue