[bot_update] Untie revision and repository properties
repository and revision have less to do with each other than it seems: revision is for checkout and the part of code that reads revision does not read repository. repository property is used to determine what to apply the patchset to. When initializing their values from buildbucket.build.input, do it separately. Also, initialize repository from Gerrit changes, not Gitiles commit. See also https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/1199854 https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/1199856 Bug: 877161, 694348 Change-Id: I4907a31ce055a3526b15f1a3c8e8f15c2c831437 Reviewed-on: https://chromium-review.googlesource.com/1200065 Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: Nodir Turakulov <nodir@chromium.org>changes/65/1200065/8
							parent
							
								
									4259762b35
								
							
						
					
					
						commit
						efc95d6b9a
					
				@ -0,0 +1,55 @@
 | 
			
		||||
[
 | 
			
		||||
  {
 | 
			
		||||
    "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': 'v8', 'url': 'https://chromium.googlesource.com/v8/v8'}]",
 | 
			
		||||
      "--patch_root",
 | 
			
		||||
      "v8",
 | 
			
		||||
      "--revision_mapping_file",
 | 
			
		||||
      "{}",
 | 
			
		||||
      "--git-cache-dir",
 | 
			
		||||
      "[GIT_CACHE]",
 | 
			
		||||
      "--cleanup-dir",
 | 
			
		||||
      "[CLEANUP]/bot_update",
 | 
			
		||||
      "--output_json",
 | 
			
		||||
      "/path/to/tmp/json",
 | 
			
		||||
      "--revision",
 | 
			
		||||
      "v8@HEAD"
 | 
			
		||||
    ],
 | 
			
		||||
    "env_prefixes": {
 | 
			
		||||
      "PATH": [
 | 
			
		||||
        "RECIPE_PACKAGE_REPO[depot_tools]"
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "infra_step": true,
 | 
			
		||||
    "name": "bot_update",
 | 
			
		||||
    "~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@    \"v8\": \"HEAD\"@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  }, @@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  \"manifest\": {}, @@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  \"patch_failure\": false, @@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  \"patch_root\": \"v8\", @@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  \"properties\": {}, @@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  \"root\": \"v8\", @@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@  \"source_manifest\": {@@@",
 | 
			
		||||
      "@@@STEP_LOG_LINE@json.output@    \"directories\": {}, @@@",
 | 
			
		||||
      "@@@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@@@"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "name": "$result",
 | 
			
		||||
    "recipe_result": null,
 | 
			
		||||
    "status_code": 0
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue