Commit 0fa91d0f authored by Saagar Sanghavi's avatar Saagar Sanghavi Committed by LUCI CQ

ResultDB wrapping for CQ/CI builds.

Add ('rdb', 'stream', '--') to wrapper.
Uses -- to send args to subprocess. (This was the bug with original CL)

Note - to test this, we will have to push changes and revert
immediately if we notice any breakage.

Recipe-Nontrivial-Roll: build
Change-Id: Ibe46314c2f791a99c0e670ff6cc44f6f24fb9f70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2342254Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: 's avatarErik Staab <estaab@chromium.org>
Commit-Queue: Saagar Sanghavi <saagarsanghavi@google.com>
parent 24289f2e
......@@ -743,7 +743,7 @@ Raises:
&mdash; **def [initialize](/recipes/recipe_modules/osx_sdk/api.py#46)(self):**
### *recipe_modules* / [presubmit](/recipes/recipe_modules/presubmit)
[DEPS](/recipes/recipe_modules/presubmit/__init__.py#11): [bot\_update](#recipe_modules-bot_update), [depot\_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [git](#recipe_modules-git), [tryserver](#recipe_modules-tryserver), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/cq][recipe_engine/recipe_modules/cq], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step]
[DEPS](/recipes/recipe_modules/presubmit/__init__.py#11): [bot\_update](#recipe_modules-bot_update), [depot\_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [git](#recipe_modules-git), [tryserver](#recipe_modules-tryserver), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/cq][recipe_engine/recipe_modules/cq], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/resultdb][recipe_engine/recipe_modules/resultdb], [recipe\_engine/step][recipe_engine/recipe_modules/step]
#### **class [PresubmitApi](/recipes/recipe_modules/presubmit/api.py#16)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
......@@ -751,7 +751,7 @@ Raises:
Return a presubmit step.
&mdash; **def [execute](/recipes/recipe_modules/presubmit/api.py#77)(self, bot_update_step, skip_owners=False):**
&mdash; **def [execute](/recipes/recipe_modules/presubmit/api.py#79)(self, bot_update_step, skip_owners=False):**
Runs presubmit and sets summary markdown if applicable.
......@@ -761,7 +761,7 @@ Args:
Returns:
a RawResult object, suitable for being returned from RunSteps.
&mdash; **def [prepare](/recipes/recipe_modules/presubmit/api.py#41)(self):**
&mdash; **def [prepare](/recipes/recipe_modules/presubmit/api.py#43)(self):**
Set up a presubmit run.
......@@ -1075,6 +1075,7 @@ Move things around in a loop!
[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/5d50d5f744305222468fed128a8b369ce873ce19/README.recipes.md#recipe_modules-properties
[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/5d50d5f744305222468fed128a8b369ce873ce19/README.recipes.md#recipe_modules-python
[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/5d50d5f744305222468fed128a8b369ce873ce19/README.recipes.md#recipe_modules-raw_io
[recipe_engine/recipe_modules/resultdb]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/5d50d5f744305222468fed128a8b369ce873ce19/README.recipes.md#recipe_modules-resultdb
[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/5d50d5f744305222468fed128a8b369ce873ce19/README.recipes.md#recipe_modules-runtime
[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/5d50d5f744305222468fed128a8b369ce873ce19/README.recipes.md#recipe_modules-step
[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/5d50d5f744305222468fed128a8b369ce873ce19/README.recipes.md#recipe_modules-url
......
......@@ -20,6 +20,7 @@ DEPS = [
'recipe_engine/properties',
'recipe_engine/python',
'recipe_engine/step',
'recipe_engine/resultdb',
'tryserver',
]
......
......@@ -34,6 +34,8 @@ class PresubmitApi(recipe_api.RecipeApi):
presubmit_args = list(args) + [
'--json_output', self.m.json.output(),
]
if self.m.resultdb.enabled:
kwargs['wrapper'] = ('rdb', 'stream', '--')
step_data = self.m.python(
name, self.presubmit_support_path, presubmit_args, **kwargs)
return step_data.json.output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment