diff options
author | Eric Boren <borenet@google.com> | 2018-04-23 08:20:57 -0400 |
---|---|---|
committer | Eric Boren <borenet@google.com> | 2018-04-23 12:59:48 +0000 |
commit | 32f8478ae9ecab4513fc65996df6231f22d2a672 (patch) | |
tree | 0498a1d2a903051a22ba868773b97e9ac2a0e0e0 /infra | |
parent | e43ff78af36395595a85a9f126b1ebb67bba563d (diff) |
Remove UpdateMetaConfig bot
It's perma-failing, and it doesn't work with Kitchen due to the new
service account not being authorized. Rather than spend the energy to
fix the service account (and move to an internal repo) I'll just delete
it since it's blocked on a low priority bug with an unknown ETA.
Bug: skia:
Change-Id: I04636fda334f8a878bde2612b3edad65d81986dc
Reviewed-on: https://skia-review.googlesource.com/122943
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra')
-rw-r--r-- | infra/bots/gen_tasks.go | 16 | ||||
-rw-r--r-- | infra/bots/jobs.json | 1 | ||||
-rw-r--r-- | infra/bots/recipes/update_meta_config.expected/Housekeeper-Nightly-UpdateMetaConfig.json | 184 | ||||
-rw-r--r-- | infra/bots/recipes/update_meta_config.expected/failed_update.json | 189 | ||||
-rw-r--r-- | infra/bots/recipes/update_meta_config.expected/trybot_test.json | 120 | ||||
-rw-r--r-- | infra/bots/recipes/update_meta_config.py | 88 | ||||
-rw-r--r-- | infra/bots/tasks.json | 109 | ||||
-rw-r--r-- | infra/bots/update_meta_config.py | 28 |
8 files changed, 9 insertions, 726 deletions
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go index 7797e15a7f..dfcb81705d 100644 --- a/infra/bots/gen_tasks.go +++ b/infra/bots/gen_tasks.go @@ -762,16 +762,6 @@ func recreateSKPs(b *specs.TasksCfgBuilder, name string) string { return name } -// updateMetaConfig generates a UpdateMetaConfig task. Returns the name of the -// last task in the generated chain of tasks, which the Job should add as a -// dependency. -func updateMetaConfig(b *specs.TasksCfgBuilder, name string) string { - task := kitchenTask(name, "update_meta_config", "swarm_recipe.isolate", SERVICE_ACCOUNT_UPDATE_META_CONFIG, linuxGceDimensions(), nil, OUTPUT_NONE) - task.CipdPackages = append(task.CipdPackages, CIPD_PKGS_GIT...) - b.MustAddTask(name, task) - return name -} - // ctSKPs generates a CT SKPs task. Returns the name of the last task in the // generated chain of tasks, which the Job should add as a dependency. func ctSKPs(b *specs.TasksCfgBuilder, name string) string { @@ -1081,11 +1071,6 @@ func process(b *specs.TasksCfgBuilder, name string) { deps = append(deps, recreateSKPs(b, name)) } - // UpdateMetaConfig bot. - if strings.Contains(name, "UpdateMetaConfig") { - deps = append(deps, updateMetaConfig(b, name)) - } - // CT bots. if strings.Contains(name, "-CT_") { deps = append(deps, ctSKPs(b, name)) @@ -1125,7 +1110,6 @@ func process(b *specs.TasksCfgBuilder, name string) { name != "Housekeeper-PerCommit-CheckGeneratedFiles" && !strings.Contains(name, "Android_Framework") && !strings.Contains(name, "RecreateSKPs") && - !strings.Contains(name, "UpdateMetaConfig") && !strings.Contains(name, "-CT_") && !strings.Contains(name, "Housekeeper-PerCommit-Isolate") { compile(b, compileTaskName, compileTaskParts) diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json index 6564df2dba..366e033f20 100644 --- a/infra/bots/jobs.json +++ b/infra/bots/jobs.json @@ -105,7 +105,6 @@ "Calmbench-Ubuntu17-Clang-Golo-GPU-QuadroP400-x86_64-Release-All", "Housekeeper-Nightly-Bookmaker", "Housekeeper-Nightly-RecreateSKPs_Canary", - "Housekeeper-Nightly-UpdateMetaConfig", "Housekeeper-PerCommit", "Housekeeper-PerCommit-Bookmaker", "Housekeeper-PerCommit-BundleRecipes", diff --git a/infra/bots/recipes/update_meta_config.expected/Housekeeper-Nightly-UpdateMetaConfig.json b/infra/bots/recipes/update_meta_config.expected/Housekeeper-Nightly-UpdateMetaConfig.json deleted file mode 100644 index faa4509494..0000000000 --- a/infra/bots/recipes/update_meta_config.expected/Housekeeper-Nightly-UpdateMetaConfig.json +++ /dev/null @@ -1,184 +0,0 @@ -[ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[CUSTOM_/_B_WORK]" - ], - "infra_step": true, - "name": "makedirs checkout_path" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[CUSTOM_/_B_WORK]/.gclient_entries" - ], - "infra_step": true, - "name": "remove [CUSTOM_/_B_WORK]/.gclient_entries" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", - "--spec-path", - "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", - "--patch_root", - "skia", - "--revision_mapping_file", - "{\"got_revision\": \"skia\"}", - "--git-cache-dir", - "[CUSTOM_/_B_CACHE]", - "--cleanup-dir", - "[CLEANUP]/bot_update", - "--output_json", - "/path/to/tmp/json", - "--revision", - "skia@abc123" - ], - "cwd": "[CUSTOM_/_B_WORK]", - "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@ \"skia\": \"abc123\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@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\": \"skia\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/skia.git\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@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@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/tmp" - ], - "infra_step": true, - "name": "makedirs tmp_dir" - }, - { - "cmd": [ - "python", - "-u", - "\nimport os\nimport urllib2\n\nTOKEN_FILE = 'update_meta_config.git_cookies'\nTOKEN_URL = 'http://metadata/computeMetadata/v1/project/attributes/update_meta_config_git_cookies'\n\nreq = urllib2.Request(TOKEN_URL, headers={'Metadata-Flavor': 'Google'})\ncontents = urllib2.urlopen(req).read()\n\nhome = os.path.expanduser('~')\ntoken_file = os.path.join(home, TOKEN_FILE)\n\nwith open(token_file, 'w') as f:\n f.write(contents)\n" - ], - "name": "download update_meta_config.git_cookies", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@TOKEN_FILE = 'update_meta_config.git_cookies'@@@", - "@@@STEP_LOG_LINE@python.inline@TOKEN_URL = 'http://metadata/computeMetadata/v1/project/attributes/update_meta_config_git_cookies'@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@req = urllib2.Request(TOKEN_URL, headers={'Metadata-Flavor': 'Google'})@@@", - "@@@STEP_LOG_LINE@python.inline@contents = urllib2.urlopen(req).read()@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@home = os.path.expanduser('~')@@@", - "@@@STEP_LOG_LINE@python.inline@token_file = os.path.join(home, TOKEN_FILE)@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@with open(token_file, 'w') as f:@@@", - "@@@STEP_LOG_LINE@python.inline@ f.write(contents)@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ - "python", - "[CUSTOM_/_B_WORK]/skia/infra/bots/update_meta_config.py", - "--repo_name", - "skia", - "--tasks_json", - "[CUSTOM_/_B_WORK]/skia/infra/bots/tasks.json", - "--gitcookies", - "[HOME]/update_meta_config.git_cookies" - ], - "cwd": "[CUSTOM_/_B_WORK]/skia", - "env": { - "BUILDTYPE": "Release", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/build/out" - }, - "name": "Update meta/config" - }, - { - "cmd": [ - "python", - "-u", - "\nimport os\n\n\nTOKEN_FILE = 'update_meta_config.git_cookies'\n\n\nhome = os.path.expanduser('~')\ntoken_file = os.path.join(home, TOKEN_FILE)\nif os.path.isfile(token_file):\n os.remove(token_file)\n" - ], - "name": "cleanup update_meta_config.git_cookies", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@TOKEN_FILE = 'update_meta_config.git_cookies'@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@home = os.path.expanduser('~')@@@", - "@@@STEP_LOG_LINE@python.inline@token_file = os.path.join(home, TOKEN_FILE)@@@", - "@@@STEP_LOG_LINE@python.inline@if os.path.isfile(token_file):@@@", - "@@@STEP_LOG_LINE@python.inline@ os.remove(token_file)@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "name": "$result", - "recipe_result": null, - "status_code": 0 - } -]
\ No newline at end of file diff --git a/infra/bots/recipes/update_meta_config.expected/failed_update.json b/infra/bots/recipes/update_meta_config.expected/failed_update.json deleted file mode 100644 index 30c60b7a5f..0000000000 --- a/infra/bots/recipes/update_meta_config.expected/failed_update.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[CUSTOM_/_B_WORK]" - ], - "infra_step": true, - "name": "makedirs checkout_path" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[CUSTOM_/_B_WORK]/.gclient_entries" - ], - "infra_step": true, - "name": "remove [CUSTOM_/_B_WORK]/.gclient_entries" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", - "--spec-path", - "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", - "--patch_root", - "skia", - "--revision_mapping_file", - "{\"got_revision\": \"skia\"}", - "--git-cache-dir", - "[CUSTOM_/_B_CACHE]", - "--cleanup-dir", - "[CLEANUP]/bot_update", - "--output_json", - "/path/to/tmp/json", - "--revision", - "skia@abc123" - ], - "cwd": "[CUSTOM_/_B_WORK]", - "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@ \"skia\": \"abc123\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@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\": \"skia\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/skia.git\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@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@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/tmp" - ], - "infra_step": true, - "name": "makedirs tmp_dir" - }, - { - "cmd": [ - "python", - "-u", - "\nimport os\nimport urllib2\n\nTOKEN_FILE = 'update_meta_config.git_cookies'\nTOKEN_URL = 'http://metadata/computeMetadata/v1/project/attributes/update_meta_config_git_cookies'\n\nreq = urllib2.Request(TOKEN_URL, headers={'Metadata-Flavor': 'Google'})\ncontents = urllib2.urlopen(req).read()\n\nhome = os.path.expanduser('~')\ntoken_file = os.path.join(home, TOKEN_FILE)\n\nwith open(token_file, 'w') as f:\n f.write(contents)\n" - ], - "name": "download update_meta_config.git_cookies", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@TOKEN_FILE = 'update_meta_config.git_cookies'@@@", - "@@@STEP_LOG_LINE@python.inline@TOKEN_URL = 'http://metadata/computeMetadata/v1/project/attributes/update_meta_config_git_cookies'@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@req = urllib2.Request(TOKEN_URL, headers={'Metadata-Flavor': 'Google'})@@@", - "@@@STEP_LOG_LINE@python.inline@contents = urllib2.urlopen(req).read()@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@home = os.path.expanduser('~')@@@", - "@@@STEP_LOG_LINE@python.inline@token_file = os.path.join(home, TOKEN_FILE)@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@with open(token_file, 'w') as f:@@@", - "@@@STEP_LOG_LINE@python.inline@ f.write(contents)@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ - "python", - "[CUSTOM_/_B_WORK]/skia/infra/bots/update_meta_config.py", - "--repo_name", - "skia", - "--tasks_json", - "[CUSTOM_/_B_WORK]/skia/infra/bots/tasks.json", - "--gitcookies", - "[HOME]/update_meta_config.git_cookies" - ], - "cwd": "[CUSTOM_/_B_WORK]/skia", - "env": { - "BUILDTYPE": "Release", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/build/out" - }, - "name": "Update meta/config", - "~followup_annotations": [ - "step returned non-zero exit code: 1", - "@@@STEP_FAILURE@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "\nimport os\n\n\nTOKEN_FILE = 'update_meta_config.git_cookies'\n\n\nhome = os.path.expanduser('~')\ntoken_file = os.path.join(home, TOKEN_FILE)\nif os.path.isfile(token_file):\n os.remove(token_file)\n" - ], - "name": "cleanup update_meta_config.git_cookies", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@TOKEN_FILE = 'update_meta_config.git_cookies'@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@home = os.path.expanduser('~')@@@", - "@@@STEP_LOG_LINE@python.inline@token_file = os.path.join(home, TOKEN_FILE)@@@", - "@@@STEP_LOG_LINE@python.inline@if os.path.isfile(token_file):@@@", - "@@@STEP_LOG_LINE@python.inline@ os.remove(token_file)@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "name": "$result", - "reason": "Step('Update meta/config') failed with return_code 1", - "recipe_result": null, - "status_code": 1 - } -]
\ No newline at end of file diff --git a/infra/bots/recipes/update_meta_config.expected/trybot_test.json b/infra/bots/recipes/update_meta_config.expected/trybot_test.json deleted file mode 100644 index 008eabc3dd..0000000000 --- a/infra/bots/recipes/update_meta_config.expected/trybot_test.json +++ /dev/null @@ -1,120 +0,0 @@ -[ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[CUSTOM_/_B_WORK]" - ], - "infra_step": true, - "name": "makedirs checkout_path" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[CUSTOM_/_B_WORK]/.gclient_entries" - ], - "infra_step": true, - "name": "remove [CUSTOM_/_B_WORK]/.gclient_entries" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", - "--spec-path", - "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", - "--patch_root", - "skia", - "--revision_mapping_file", - "{\"got_revision\": \"skia\"}", - "--git-cache-dir", - "[CUSTOM_/_B_CACHE]", - "--cleanup-dir", - "[CLEANUP]/bot_update", - "--gerrit_repo", - "https://skia.googlesource.com/skia.git", - "--gerrit_ref", - "refs/changes/23/123/3", - "--output_json", - "/path/to/tmp/json", - "--revision", - "skia@abc123" - ], - "cwd": "[CUSTOM_/_B_WORK]", - "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@ \"skia\": \"abc123\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@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\": \"skia\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/skia.git\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@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@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", - "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/tmp" - ], - "infra_step": true, - "name": "makedirs tmp_dir" - }, - { - "name": "$result", - "reason": "Uncaught Exception: Exception('Cannot run update_meta_config recipe as a trybot',)", - "status_code": -1 - } -]
\ No newline at end of file diff --git a/infra/bots/recipes/update_meta_config.py b/infra/bots/recipes/update_meta_config.py deleted file mode 100644 index a8f17cc03b..0000000000 --- a/infra/bots/recipes/update_meta_config.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2017 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -"""Recipe for the Bot that updates meta config.""" - - -DEPS = [ - 'depot_tools/gclient', - 'recipe_engine/context', - 'recipe_engine/file', - 'recipe_engine/path', - 'recipe_engine/properties', - 'recipe_engine/python', - 'recipe_engine/raw_io', - 'recipe_engine/step', - 'core', - 'infra', - 'run', - 'vars', -] - - -TEST_BUILDERS = { - 'client.skia.compile': { - 'skiabot-linux-swarm-000': [ - 'Housekeeper-Nightly-UpdateMetaConfig', - ], - }, -} - - -UPDATE_META_CONFIG_GITCOOKIES_FILE = 'update_meta_config.git_cookies' -UPDATE_META_CONFIG_KEY = 'update_meta_config_git_cookies' - - -def RunSteps(api): - api.core.setup() - - if api.vars.is_trybot: - raise Exception('Cannot run update_meta_config recipe as a trybot') - update_meta_config_gitcookies = api.path.join( - api.path.expanduser('~'), UPDATE_META_CONFIG_GITCOOKIES_FILE) - repo_name = api.properties.get('repository').split('/')[-1].rstrip('.git') - cmd = ['python', - api.vars.skia_dir.join('infra', 'bots', 'update_meta_config.py'), - '--repo_name', repo_name, - '--tasks_json', api.vars.skia_dir.join('infra', 'bots', 'tasks.json'), - '--gitcookies', str(update_meta_config_gitcookies)] - with api.infra.MetadataFetch( - api, UPDATE_META_CONFIG_KEY, UPDATE_META_CONFIG_GITCOOKIES_FILE): - with api.context(cwd=api.vars.skia_dir): - api.run(api.step, 'Update meta/config', cmd=cmd) - - -def GenTests(api): - builder = 'Housekeeper-Nightly-UpdateMetaConfig' - yield ( - api.test(builder) + - api.properties(buildername=builder, - repository='https://skia.googlesource.com/skia.git', - revision='abc123', - path_config='kitchen', - swarm_out_dir='[SWARM_OUT_DIR]') - ) - - yield ( - api.test('failed_update') + - api.properties(buildername=builder, - repository='https://skia.googlesource.com/skia.git', - revision='abc123', - path_config='kitchen', - swarm_out_dir='[SWARM_OUT_DIR]') + - api.step_data('Update meta/config', retcode=1) - ) - - yield ( - api.test('trybot_test') + - api.properties(buildername=builder, - repository='https://skia.googlesource.com/skia.git', - revision='abc123', - path_config='kitchen', - swarm_out_dir='[SWARM_OUT_DIR]', - patch_issue=123, - patch_set=3) + - api.expect_exception('Exception') - ) diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index ef1c4da076..4f15e18e6c 100644 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -643,13 +643,6 @@ ], "trigger": "nightly" }, - "Housekeeper-Nightly-UpdateMetaConfig": { - "priority": 0.8, - "tasks": [ - "Housekeeper-Nightly-UpdateMetaConfig" - ], - "trigger": "nightly" - }, "Housekeeper-PerCommit": { "priority": 0.8, "tasks": [ @@ -15019,108 +15012,6 @@ "priority": 0.8, "service_account": "skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com" }, - "Housekeeper-Nightly-UpdateMetaConfig": { - "cipd_packages": [ - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:206b4474cb712bdad8b7b3f213880cfbf03f120c" - }, - { - "name": "infra/tools/authutil/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:9c63809842a277ce10a86afd51b61c639a665d11" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:d0130097bd6364a8d834cb9efd4554c1f6192c82" - }, - { - "name": "infra/git/${platform}", - "path": "cipd_bin_packages", - "version": "version:2.15.0.chromium12" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:fa7a52f4741f5e04bba0dfccc9b8456dc572c60b" - }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:d0130097bd6364a8d834cb9efd4554c1f6192c82" - } - ], - "command": [ - "./kitchen${EXECUTABLE_SUFFIX}", - "cook", - "-checkout-dir", - "recipe_bundle", - "-mode", - "swarming", - "-luci-system-account", - "system", - "-cache-dir", - "cache", - "-temp-dir", - "tmp", - "-known-gerrit-host", - "android.googlesource.com", - "-known-gerrit-host", - "boringssl.googlesource.com", - "-known-gerrit-host", - "chromium.googlesource.com", - "-known-gerrit-host", - "dart.googlesource.com", - "-known-gerrit-host", - "fuchsia.googlesource.com", - "-known-gerrit-host", - "go.googlesource.com", - "-known-gerrit-host", - "llvm.googlesource.com", - "-known-gerrit-host", - "pdfium.googlesource.com", - "-known-gerrit-host", - "skia.googlesource.com", - "-known-gerrit-host", - "webrtc.googlesource.com", - "-output-result-json", - "${ISOLATED_OUTDIR}/build_result_filename", - "-workdir", - ".", - "-recipe", - "update_meta_config", - "-properties", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Housekeeper-Nightly-UpdateMetaConfig\",\"patch_issue\":\"<(ISSUE)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\"}", - "-logdog-annotation-url", - "logdog://logs.chromium.org/skia/<(TASK_ID)/+/annotations" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "os:Debian-9.4", - "pool:Skia" - ], - "env_prefixes": { - "PATH": [ - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "${cache_dir}/vpython" - ] - }, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/<(TASK_ID)/+/annotations" - }, - "isolate": "swarm_recipe.isolate", - "priority": 0.8, - "service_account": "skia-update-meta-config@skia-swarming-bots.iam.gserviceaccount.com" - }, "Housekeeper-PerCommit": { "cipd_packages": [ { diff --git a/infra/bots/update_meta_config.py b/infra/bots/update_meta_config.py index 1a2ca21ba1..0e2607e68b 100644 --- a/infra/bots/update_meta_config.py +++ b/infra/bots/update_meta_config.py @@ -15,8 +15,6 @@ import urllib2 import git_utils -SKIA_COMMITTER_EMAIL = 'update-meta-config@skia.org' -SKIA_COMMITTER_NAME = 'Update Meta Config' SKIA_REPO_TEMPLATE = 'https://skia.googlesource.com/%s.git' CQ_INCLUDE_CHROMIUM_TRYBOTS = [ @@ -72,7 +70,6 @@ def addChromiumTrybots(f): def main(): parser = argparse.ArgumentParser() - parser.add_argument("--gitcookies") parser.add_argument("--repo_name") parser.add_argument("--tasks_json") args = parser.parse_args() @@ -104,22 +101,15 @@ def main(): for job in tryjobs: f.write('\tbuilder = ' + job + '\n') - # Push the change as the update-meta-config user. - config_dict = { - 'user.name': SKIA_COMMITTER_NAME, - 'user.email': SKIA_COMMITTER_EMAIL, - 'http.cookiefile': args.gitcookies, - } - with git_utils.GitLocalConfig(config_dict): - subprocess.check_call(['git', 'add', 'buildbucket.config']) - try: - subprocess.check_call( - ['git', 'commit', '-m', 'Update builders in buildbucket.config']) - except subprocess.CalledProcessError: - print 'No changes to buildbucket.config' - return - - subprocess.check_call(['git', 'push', skia_repo, 'cfg:refs/meta/config']) + subprocess.check_call(['git', 'add', 'buildbucket.config']) + try: + subprocess.check_call( + ['git', 'commit', '-m', 'Update builders in buildbucket.config']) + except subprocess.CalledProcessError: + print 'No changes to buildbucket.config' + return + + subprocess.check_call(['git', 'push', skia_repo, 'cfg:refs/meta/config']) if '__main__' == __name__: |