Use max_threads and roll deps.
Value of 0 for max_threads means match number of CPUs. This change cuts
runtime of the CIPD step in the recipe from 45s to 7s.
Also had to change how build_input_resolver is used due to changes in
Fuchsia recipes.
Bug: 32
Change-Id: Ifb23ed0cfcba06dc8ec561df5d407fcadff872d1
diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg
index 803c69f..f4db2f3 100644
--- a/infra/config/recipes.cfg
+++ b/infra/config/recipes.cfg
@@ -17,12 +17,12 @@
"deps": {
"recipe_engine": {
"branch": "master",
- "revision": "19c96b27a29dbad65e5e01d28ff479e856d666bd",
+ "revision": "5591fe66be52b94aab70120f5401343521aaa4cc",
"url": "https://chromium.googlesource.com/infra/luci/recipes-py"
},
"fuchsia": {
"branch": "master",
- "revision": "50e00ccc53ec0eadaffc1077ea9a0c201d4a433f",
+ "revision": "088011636ba55297f63f97c9fd840294a69db8b4",
"url": "https://fuchsia.googlesource.com/infra/recipes"
}
},
diff --git a/recipe_modules/checkout/api.py b/recipe_modules/checkout/api.py
index 6574827..bd77166 100644
--- a/recipe_modules/checkout/api.py
+++ b/recipe_modules/checkout/api.py
@@ -39,10 +39,8 @@
with self.m.step.nest('checkout'):
with self.m.context(infra_steps=True):
- bb_build = self.m.buildbucket.build
- self.m.build_input_resolver.resolve(
- bb_build.input, default_project_url=remote)
- commit = bb_build.input.gitiles_commit
+ self.m.build_input_resolver.resolve(remote)
+ commit = self.m.buildbucket.build.input.gitiles_commit
self._root = self.m.path['start_dir'].join('checkout')
diff --git a/recipe_modules/environment/api.py b/recipe_modules/environment/api.py
index 1c49a3e..6b680d1 100644
--- a/recipe_modules/environment/api.py
+++ b/recipe_modules/environment/api.py
@@ -69,6 +69,7 @@
self._process_ensure_path(ensure_path, ensure_file)
self._cipd_dir = self.m.path['start_dir'].join('cipd')
+ self.m.cipd.max_threads = 0
self.m.cipd.ensure(self._cipd_dir, ensure_file)
self._path_prefixes.append(self._cipd_dir)
diff --git a/recipe_modules/environment/tests/full.expected/simple.json b/recipe_modules/environment/tests/full.expected/simple.json
index 7fcddbb..5d04279 100644
--- a/recipe_modules/environment/tests/full.expected/simple.json
+++ b/recipe_modules/environment/tests/full.expected/simple.json
@@ -40,6 +40,8 @@
"[START_DIR]/cipd",
"-ensure-file",
"cipd/path/${platform} version:42",
+ "-max-threads",
+ "0",
"-json-output",
"/path/to/tmp/json"
],
diff --git a/recipes/pigweed.expected/pigweed.json b/recipes/pigweed.expected/pigweed.json
index 9074cf1..64cc48c 100644
--- a/recipes/pigweed.expected/pigweed.json
+++ b/recipes/pigweed.expected/pigweed.json
@@ -424,6 +424,8 @@
"[START_DIR]/cipd",
"-ensure-file",
"cipd/path/${platform} version:42",
+ "-max-threads",
+ "0",
"-json-output",
"/path/to/tmp/json"
],
diff --git a/recipes/pigweed.expected/step.json b/recipes/pigweed.expected/step.json
index 5a6d435..85a9df9 100644
--- a/recipes/pigweed.expected/step.json
+++ b/recipes/pigweed.expected/step.json
@@ -424,6 +424,8 @@
"[START_DIR]/cipd",
"-ensure-file",
"cipd/path/${platform} version:42",
+ "-max-threads",
+ "0",
"-json-output",
"/path/to/tmp/json"
],