diff --git a/infra/bots/recipe_modules/core/__init__.py b/infra/bots/recipe_modules/core/__init__.py index a42574bfa0..29f438e3a6 100644 --- a/infra/bots/recipe_modules/core/__init__.py +++ b/infra/bots/recipe_modules/core/__init__.py @@ -5,6 +5,7 @@ DEPS = [ 'depot_tools/bot_update', 'depot_tools/gclient', + 'depot_tools/git', 'depot_tools/tryserver', 'flavor', 'recipe_engine/context', diff --git a/infra/bots/recipe_modules/core/api.py b/infra/bots/recipe_modules/core/api.py index 0520549180..43572bf00d 100644 --- a/infra/bots/recipe_modules/core/api.py +++ b/infra/bots/recipe_modules/core/api.py @@ -154,4 +154,12 @@ class SkiaApi(recipe_api.RecipeApi): if self.m.vars.need_chromium_checkout: with self.m.context(cwd=self.m.vars.checkout_root, env=self.m.vars.gclient_env): - self.m.gclient.runhooks() + # TODO(borenet): Remove this hack and replace with + # 'self.m.gclient.runhooks()' after the transition to Kitchen: + # https://bugs.chromium.org/p/skia/issues/detail?id=7050 + depot_tools = self.m.vars.checkout_root.join('depot_tools') + self.m.git.checkout( + 'https://chromium.googlesource.com/chromium/tools/depot_tools.git', + dir_path=depot_tools, ref='master') + self.m.run(self.m.step, 'gclient runhooks', + cmd=[depot_tools.join('gclient'), 'runhooks']) diff --git a/infra/bots/recipe_modules/core/examples/full.expected/Housekeeper-Weekly-RecreateSKPs.json b/infra/bots/recipe_modules/core/examples/full.expected/Housekeeper-Weekly-RecreateSKPs.json index 24355b8e17..ea53ae3cde 100644 --- a/infra/bots/recipe_modules/core/examples/full.expected/Housekeeper-Weekly-RecreateSKPs.json +++ b/infra/bots/recipe_modules/core/examples/full.expected/Housekeeper-Weekly-RecreateSKPs.json @@ -100,13 +100,121 @@ "cmd": [ "python", "-u", - "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[CUSTOM_/_B_WORK]/depot_tools", + "--url", + "https://chromium.googlesource.com/chromium/tools/depot_tools.git" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "name": "git setup" + }, + { + "cmd": [ + "git", + "retry", + "fetch", + "origin", + "master", + "--progress" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1", + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:" + }, + "infra_step": true, + "name": "git fetch" + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "git checkout" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "read revision", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_TEXT@
checked out 'deadbeef'
@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "git clean" + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "submodule sync" + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "submodule update" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/depot_tools/gclient", "runhooks" ], "cwd": "[CUSTOM_/_B_WORK]", "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1", - "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" }, "name": "gclient runhooks" }, diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json index 26cdbc86de..6a1b1f600c 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json @@ -9,6 +9,7 @@ "--output-dir", "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug", "--no-sync", + "--no-hooks", "--make-output-dir" ], "env": { diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py index 22733cbe59..82ac395e13 100644 --- a/infra/bots/recipe_modules/flavor/gn_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_flavor.py @@ -20,7 +20,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): args=[ '--chrome-dir', self.m.vars.checkout_root, '--output-dir', self.m.vars.skia_out.join(self.m.vars.configuration), - '--no-sync', '--make-output-dir']) + '--no-sync', '--no-hooks', '--make-output-dir']) def _get_goma_json(self): json_key = 'jwt_service_account_goma-client' diff --git a/infra/bots/recipes/compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json b/infra/bots/recipes/compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json index d0f579c3d2..57bc25e6ca 100644 --- a/infra/bots/recipes/compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json +++ b/infra/bots/recipes/compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json @@ -100,13 +100,121 @@ "cmd": [ "python", "-u", - "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[CUSTOM_/_B_WORK]/depot_tools", + "--url", + "https://chromium.googlesource.com/chromium/tools/depot_tools.git" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "GYP_CHROMIUM_NO_ACTION": "0" + }, + "name": "git setup" + }, + { + "cmd": [ + "git", + "retry", + "fetch", + "origin", + "master", + "--progress" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "GYP_CHROMIUM_NO_ACTION": "0", + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:" + }, + "infra_step": true, + "name": "git fetch" + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "GYP_CHROMIUM_NO_ACTION": "0" + }, + "infra_step": true, + "name": "git checkout" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "GYP_CHROMIUM_NO_ACTION": "0" + }, + "infra_step": true, + "name": "read revision", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_TEXT@
checked out 'deadbeef'
@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "GYP_CHROMIUM_NO_ACTION": "0" + }, + "infra_step": true, + "name": "git clean" + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "GYP_CHROMIUM_NO_ACTION": "0" + }, + "infra_step": true, + "name": "submodule sync" + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "GYP_CHROMIUM_NO_ACTION": "0" + }, + "infra_step": true, + "name": "submodule update" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/depot_tools/gclient", "runhooks" ], "cwd": "[CUSTOM_/_B_WORK]", "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", "GYP_CHROMIUM_NO_ACTION": "0", - "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer" }, "name": "gclient runhooks" }, @@ -120,6 +228,7 @@ "--output-dir", "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug", "--no-sync", + "--no-hooks", "--make-output-dir" ], "env": { diff --git a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json index 301db562fe..5410762bb3 100644 --- a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json +++ b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json @@ -100,13 +100,121 @@ "cmd": [ "python", "-u", - "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[CUSTOM_/_B_WORK]/depot_tools", + "--url", + "https://chromium.googlesource.com/chromium/tools/depot_tools.git" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "name": "git setup" + }, + { + "cmd": [ + "git", + "retry", + "fetch", + "origin", + "master", + "--progress" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1", + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:" + }, + "infra_step": true, + "name": "git fetch" + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "git checkout" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "read revision", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_TEXT@
checked out 'deadbeef'
@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "git clean" + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "submodule sync" + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "submodule update" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/depot_tools/gclient", "runhooks" ], "cwd": "[CUSTOM_/_B_WORK]", "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1", - "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" }, "name": "gclient runhooks" }, diff --git a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json index 6e998f2a7d..b39f00ce67 100644 --- a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json +++ b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json @@ -100,13 +100,121 @@ "cmd": [ "python", "-u", - "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[CUSTOM_/_B_WORK]/depot_tools", + "--url", + "https://chromium.googlesource.com/chromium/tools/depot_tools.git" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "name": "git setup" + }, + { + "cmd": [ + "git", + "retry", + "fetch", + "origin", + "master", + "--progress" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1", + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:" + }, + "infra_step": true, + "name": "git fetch" + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "git checkout" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "read revision", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_TEXT@
checked out 'deadbeef'
@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "git clean" + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "submodule sync" + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "submodule update" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/depot_tools/gclient", "runhooks" ], "cwd": "[CUSTOM_/_B_WORK]", "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1", - "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" }, "name": "gclient runhooks" }, diff --git a/infra/bots/recipes/recreate_skps.expected/failed_upload.json b/infra/bots/recipes/recreate_skps.expected/failed_upload.json index 8279921369..4197899697 100644 --- a/infra/bots/recipes/recreate_skps.expected/failed_upload.json +++ b/infra/bots/recipes/recreate_skps.expected/failed_upload.json @@ -100,13 +100,121 @@ "cmd": [ "python", "-u", - "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[CUSTOM_/_B_WORK]/depot_tools", + "--url", + "https://chromium.googlesource.com/chromium/tools/depot_tools.git" + ], + "cwd": "[CUSTOM_/_B_WORK]", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "name": "git setup" + }, + { + "cmd": [ + "git", + "retry", + "fetch", + "origin", + "master", + "--progress" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1", + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:" + }, + "infra_step": true, + "name": "git fetch" + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "git checkout" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "read revision", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_TEXT@
checked out 'deadbeef'
@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "git clean" + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "submodule sync" + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[CUSTOM_/_B_WORK]/depot_tools", + "env": { + "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1" + }, + "infra_step": true, + "name": "submodule update" + }, + { + "cmd": [ + "[CUSTOM_/_B_WORK]/depot_tools/gclient", "runhooks" ], "cwd": "[CUSTOM_/_B_WORK]", "env": { + "BUILDTYPE": "Release", + "CHROME_HEADLESS": "1", "CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1", - "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]" + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" }, "name": "gclient runhooks" }, diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg index 973c40a7e5..fe0e1b0d8b 100644 --- a/infra/config/recipes.cfg +++ b/infra/config/recipes.cfg @@ -1,6 +1,7 @@ { "api_version": 2, "autoroll_recipe_options": { + "disable_reason": "Bots failing, assume switching to Kitchen will fix.", "nontrivial": { "automatic_commit_dry_run": true }, @@ -9,8 +10,7 @@ "tbr_emails": [ "borenet@google.com" ] - }, - "disable_reason": "Bots failing, assume switching to Kitchen will fix." + } }, "deps": { "depot_tools": {