Fetch the input commit ref when both ref and id are specified.
This causes --refs refs/head/master to be added to bot_update calls when the input build message contains a commit id and the refs/head/master ref. This is an effective no-op. Bug: 922150 Change-Id: I119d9b3cede727713a0b66bff83b5ee4e1848790 Recipe-Nontrivial-Roll: build Recipe-Nontrivial-Roll: infra Recipe-Nontrivial-Roll: build_limited_scripts_slave Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1884457 Commit-Queue: Garrett Beaty <gbeaty@chromium.org> Auto-Submit: Garrett Beaty <gbeaty@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>changes/57/1884457/4
							parent
							
								
									5eb757a742
								
							
						
					
					
						commit
						512f92b731
					
				@ -0,0 +1,58 @@
 | 
			
		||||
[
 | 
			
		||||
  {
 | 
			
		||||
    "cmd": [
 | 
			
		||||
      "python",
 | 
			
		||||
      "-u",
 | 
			
		||||
      "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
 | 
			
		||||
      "--spec-path",
 | 
			
		||||
      "cache_dir = '[GIT_CACHE]'\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",
 | 
			
		||||
      "[GIT_CACHE]",
 | 
			
		||||
      "--cleanup-dir",
 | 
			
		||||
      "[CLEANUP]/bot_update",
 | 
			
		||||
      "--output_json",
 | 
			
		||||
      "/path/to/tmp/json",
 | 
			
		||||
      "--revision",
 | 
			
		||||
      "got_revision@src",
 | 
			
		||||
      "--revision",
 | 
			
		||||
      "src@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
 | 
			
		||||
      "--refs",
 | 
			
		||||
      "refs/branch-heads/x",
 | 
			
		||||
      "--disable-syntax-validation"
 | 
			
		||||
    ],
 | 
			
		||||
    "env_suffixes": {
 | 
			
		||||
      "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@  \"manifest\": {@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@    \"src\": {@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://chromium.googlesource.com/chromium/src\", @@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@      \"revision\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@    }@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  }, @@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  \"properties\": {@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@    \"got_revision\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  }@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@}@@@",
 | 
			
		||||
      "@@@STEP_LOG_END@json.output@@@",
 | 
			
		||||
      "@@@SET_BUILD_PROPERTY@got_revision@\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmd": [],
 | 
			
		||||
    "name": "set_output_gitiles_commit",
 | 
			
		||||
    "~followup_annotations": [
 | 
			
		||||
      "@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"chromium.googlesource.com\", \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"project\": \"chromium/src\", \"ref\": \"refs/branch-heads/x\"}@@@"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "name": "$result"
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue