Merge "Revert "Switch to a fixed chrome version temporarily"" into main
diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg
index be86d57..91a2901 100644
--- a/infra/config/recipes.cfg
+++ b/infra/config/recipes.cfg
@@ -16,22 +16,22 @@
"deps": {
"depot_tools": {
"branch": "refs/heads/main",
- "revision": "d521650bba4d5ff9f731ccb08ad681ce3460d323",
+ "revision": "3e9c52758140357dfa981e252317909c38fa21ac",
"url": "https://chromium.googlesource.com/chromium/tools/depot_tools.git"
},
"fuchsia": {
"branch": "refs/heads/main",
- "revision": "ca615edba00809fac3aaf155f38d502d4d811e90",
+ "revision": "34170c03368742506e9b23e5959569ae8ea39f52",
"url": "https://fuchsia.googlesource.com/infra/recipes.git"
},
"infra": {
"branch": "refs/heads/main",
- "revision": "f3629c53ce80ec76aa78b19832f467f2d7c5fd7f",
+ "revision": "2bd7753c9f39ebb146ad9d6fcea59d2bfaba7ffb",
"url": "https://chromium.googlesource.com/infra/infra.git"
},
"recipe_engine": {
"branch": "refs/heads/main",
- "revision": "bf78629064df710e4e2ffecad4a6562b08c7fcb1",
+ "revision": "659f41cff9847953162225296e00422424ff72ad",
"url": "https://chromium.googlesource.com/infra/luci/recipes-py.git"
}
},
diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md
index 5db500a..54816e9 100644
--- a/recipes/README.recipes.md
+++ b/recipes/README.recipes.md
@@ -33,18 +33,18 @@
— **def [RunSteps](/recipes/recipes/luci-test.py#24)(api):**
-[depot_tools/recipe_modules/bot_update]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/d521650bba4d5ff9f731ccb08ad681ce3460d323/recipes/README.recipes.md#recipe_modules-bot_update
-[depot_tools/recipe_modules/gclient]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/d521650bba4d5ff9f731ccb08ad681ce3460d323/recipes/README.recipes.md#recipe_modules-gclient
-[depot_tools/recipe_modules/gerrit]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/d521650bba4d5ff9f731ccb08ad681ce3460d323/recipes/README.recipes.md#recipe_modules-gerrit
-[depot_tools/recipe_modules/gsutil]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/d521650bba4d5ff9f731ccb08ad681ce3460d323/recipes/README.recipes.md#recipe_modules-gsutil
-[fuchsia/recipe_modules/git]: https://fuchsia.googlesource.com/infra/recipes/+/ca615edba00809fac3aaf155f38d502d4d811e90/README.recipes.md#recipe_modules-git
-[fuchsia/recipe_modules/git_checkout]: https://fuchsia.googlesource.com/infra/recipes/+/ca615edba00809fac3aaf155f38d502d4d811e90/README.recipes.md#recipe_modules-git_checkout
-[infra/recipe_modules/zip]: https://chromium.googlesource.com/infra/infra.git/+/f3629c53ce80ec76aa78b19832f467f2d7c5fd7f/recipes/README.recipes.md#recipe_modules-zip
-[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1/README.recipes.md#recipe_modules-buildbucket
-[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1/README.recipes.md#recipe_modules-context
-[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1/README.recipes.md#recipe_modules-file
-[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1/README.recipes.md#recipe_modules-json
-[recipe_engine/recipe_modules/nodejs]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1/README.recipes.md#recipe_modules-nodejs
-[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1/README.recipes.md#recipe_modules-path
-[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1/README.recipes.md#recipe_modules-raw_io
-[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1/README.recipes.md#recipe_modules-step
+[depot_tools/recipe_modules/bot_update]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/3e9c52758140357dfa981e252317909c38fa21ac/recipes/README.recipes.md#recipe_modules-bot_update
+[depot_tools/recipe_modules/gclient]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/3e9c52758140357dfa981e252317909c38fa21ac/recipes/README.recipes.md#recipe_modules-gclient
+[depot_tools/recipe_modules/gerrit]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/3e9c52758140357dfa981e252317909c38fa21ac/recipes/README.recipes.md#recipe_modules-gerrit
+[depot_tools/recipe_modules/gsutil]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/3e9c52758140357dfa981e252317909c38fa21ac/recipes/README.recipes.md#recipe_modules-gsutil
+[fuchsia/recipe_modules/git]: https://fuchsia.googlesource.com/infra/recipes/+/34170c03368742506e9b23e5959569ae8ea39f52/README.recipes.md#recipe_modules-git
+[fuchsia/recipe_modules/git_checkout]: https://fuchsia.googlesource.com/infra/recipes/+/34170c03368742506e9b23e5959569ae8ea39f52/README.recipes.md#recipe_modules-git_checkout
+[infra/recipe_modules/zip]: https://chromium.googlesource.com/infra/infra.git/+/2bd7753c9f39ebb146ad9d6fcea59d2bfaba7ffb/recipes/README.recipes.md#recipe_modules-zip
+[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/659f41cff9847953162225296e00422424ff72ad/README.recipes.md#recipe_modules-buildbucket
+[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/659f41cff9847953162225296e00422424ff72ad/README.recipes.md#recipe_modules-context
+[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/659f41cff9847953162225296e00422424ff72ad/README.recipes.md#recipe_modules-file
+[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/659f41cff9847953162225296e00422424ff72ad/README.recipes.md#recipe_modules-json
+[recipe_engine/recipe_modules/nodejs]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/659f41cff9847953162225296e00422424ff72ad/README.recipes.md#recipe_modules-nodejs
+[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/659f41cff9847953162225296e00422424ff72ad/README.recipes.md#recipe_modules-path
+[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/659f41cff9847953162225296e00422424ff72ad/README.recipes.md#recipe_modules-raw_io
+[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/659f41cff9847953162225296e00422424ff72ad/README.recipes.md#recipe_modules-step
diff --git a/recipes/recipes.py b/recipes/recipes.py
index 05ca941..c6ef83a 100755
--- a/recipes/recipes.py
+++ b/recipes/recipes.py
@@ -235,13 +235,10 @@
if not shutil.which(vpython):
return f'Required binary is not found on PATH: {vpython}'
- # We unset PYTHONPATH here in case the user has conflicting environmental
- # things we don't want them to leak through into the recipe_engine which
- # manages its environment entirely via vpython.
- #
- # NOTE: os.unsetenv unhelpfully doesn't exist on all platforms until python3.9
- # so we have to use the cutesy `pop` formulation below until then...
- os.environ.pop("PYTHONPATH", None)
+ # We overwrite PYTHONPATH here on purpose; We don't want any conflicting
+ # environmental path leaking through into the recipe_engine which manages its
+ # environment entirely via vpython.
+ os.environ['PYTHONPATH'] = engine_path
spec = '.vpython3'
debugger = os.environ.get('RECIPE_DEBUGGER', '')
diff --git a/recipes/recipes/gerrit.py b/recipes/recipes/gerrit.py
index f845b05..db8b999 100644
--- a/recipes/recipes/gerrit.py
+++ b/recipes/recipes/gerrit.py
@@ -28,7 +28,7 @@
# Checkout the change into a special 'cleanup' folder that is cleared
# between runs of the recipe.
- checkout_root = api.path['cleanup'].join('checkout')
+ checkout_root = api.path.cleanup_dir / 'checkout'
api.file.ensure_directory("makedirs", checkout_root)
env = _downloadChromeAndAddToPath(api)
@@ -92,15 +92,14 @@
chrome.join(version_file))
api.gsutil.download(gs_bucket, '%s/%s/%s' %
(gs_path, version, chrome_zip), chrome)
- api.zip.unzip('unzip chrome', chrome.join(
- chrome_zip), chrome.join('zip'))
- chrome_path = chrome.join('zip', 'chrome-linux')
+ api.zip.unzip('unzip chrome', chrome / chrome_zip, chrome / 'zip')
+ chrome_path = chrome / 'zip' / 'chrome-linux'
# The chrome-launcher package expects a binary named "google-chrome" rather
# than "chrome":
# https://github.com/GoogleChrome/chrome-launcher/blob/c753ba083c43a90d98b682bf9ffdfe21680e6208/src/chrome-finder.ts#L133
- chrome_bin = chrome_path.join('chrome')
- google_chrome_bin = chrome_path.join('google-chrome')
+ chrome_bin = chrome_path / 'chrome'
+ google_chrome_bin = chrome_path / 'google-chrome'
api.step('rename to google-chrome',
['mv', chrome_bin, google_chrome_bin])
env = {
diff --git a/recipes/recipes/git-repo.expected/basic.json b/recipes/recipes/git-repo.expected/basic.json
index a9ee3d8..e5cbf09 100644
--- a/recipes/recipes/git-repo.expected/basic.json
+++ b/recipes/recipes/git-repo.expected/basic.json
@@ -125,7 +125,6 @@
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"d1fff11dfbab5fa0a53f8adfa8d21f4e324220ef\"@@@",
"@@@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\": \"git-repo\",@@@",
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"d1fff11dfbab5fa0a53f8adfa8d21f4e324220ef\"@@@",
diff --git a/recipes/recipes/git-repo.py b/recipes/recipes/git-repo.py
index f96aef9..bcbeb75 100644
--- a/recipes/recipes/git-repo.py
+++ b/recipes/recipes/git-repo.py
@@ -54,7 +54,7 @@
]
expr = ' and '.join(['not ' + t for t in tests_to_skip])
- with api.context(cwd=api.path['start_dir'].join(project_name)):
+ with api.context(cwd=api.path.start_dir / project_name):
# TODO(b/266734831): Use tox to run tests.
api.step('Run tests', ['vpython3', 'run_tests', '-k', expr, '-vv'])
diff --git a/recipes/recipes/luci-test.expected/basic.json b/recipes/recipes/luci-test.expected/basic.json
index 8997e89..ca01c40 100644
--- a/recipes/recipes/luci-test.expected/basic.json
+++ b/recipes/recipes/luci-test.expected/basic.json
@@ -1,7 +1,10 @@
[
{
"cmd": [],
- "name": "checkout"
+ "name": "checkout",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@https://gerrit.googlesource.com/luci-test@@@"
+ ]
},
{
"cmd": [],
diff --git a/recipes/recipes/luci-test.py b/recipes/recipes/luci-test.py
index 7af2b58..097f9f9 100644
--- a/recipes/recipes/luci-test.py
+++ b/recipes/recipes/luci-test.py
@@ -24,7 +24,7 @@
def RunSteps(api):
# The code for the change will be checked out into a special folder that is
# cached between builds.
- checkout_root = api.path['cache'].join('builder')
+ checkout_root = api.path.cache_dir / 'builder'
# This is the name of the subfolder under checkout_root where the change will
# be checked out at.
checkout_dir = 'src'
@@ -32,13 +32,13 @@
with api.context(cwd=checkout_root):
api.git_checkout(
'https://gerrit.googlesource.com/luci-test',
- path=checkout_root.join(checkout_dir),
+ path=checkout_root / checkout_dir,
)
env = _downloadChromeAndAddToPath(api)
# Now run our verification in the checked out code directory.
- with api.context(env=env, cwd=checkout_root.join(checkout_dir)):
+ with api.context(env=env, cwd=checkout_root / checkout_dir):
# Current LTS for Node.js. Version must be in CIPD packages:
# https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/nodejs/linux-amd64/+/bfm5RWHxZDS1NBdMuNLvXZUq4ULnf_Ho5OzhI3jL_14C
with api.nodejs(version='18.11.0'):
@@ -63,18 +63,17 @@
api.gsutil.download(gs_bucket, '%s/%s' %
(gs_path, version_file), chrome)
version = api.file.read_text('read latest chrome version',
- chrome.join(version_file))
+ chrome / version_file)
api.gsutil.download(gs_bucket, '%s/%s/%s' %
(gs_path, version, chrome_zip), chrome)
- api.zip.unzip('unzip chrome', chrome.join(
- chrome_zip), chrome.join('zip'))
- chrome_path = chrome.join('zip', 'chrome-linux')
+ api.zip.unzip('unzip chrome', chrome / chrome_zip, chrome / 'zip')
+ chrome_path = chrome / 'zip' / 'chrome-linux'
# The chrome-launcher package expects a binary named "google-chrome" rather
# than "chrome":
# https://github.com/GoogleChrome/chrome-launcher/blob/c753ba083c43a90d98b682bf9ffdfe21680e6208/src/chrome-finder.ts#L133
- chrome_bin = chrome_path.join('chrome')
- google_chrome_bin = chrome_path.join('google-chrome')
+ chrome_bin = chrome_path / 'chrome'
+ google_chrome_bin = chrome_path / 'google-chrome'
api.step('rename to google-chrome',
['mv', chrome_bin, google_chrome_bin])
env = {