Commit 90191b14 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by LUCI CQ

recipes: use vpython3 in gerrit recipe modules

This is to prevent failure like
https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/1057655/overview

Bug: 1327534
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I922dddbd23eae0a02a95e020722b5edd1186ef77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3771540
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
parent f05fcf70
......@@ -244,7 +244,7 @@ revision map. This doesn't overwrite the revision if it was already set.
&emsp; **@use_mirror.setter**<br>&mdash; **def [use\_mirror](/recipes/recipe_modules/gclient/api.py#116)(self, val):**
### *recipe_modules* / [gerrit](/recipes/recipe_modules/gerrit)
[DEPS](/recipes/recipe_modules/gerrit/__init__.py#3): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/time][recipe_engine/recipe_modules/time]
[DEPS](/recipes/recipe_modules/gerrit/__init__.py#3): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/time][recipe_engine/recipe_modules/time]
PYTHON_VERSION_COMPATIBILITY: PY2+3
......@@ -256,30 +256,30 @@ Module for interact with Gerrit endpoints
Wrapper for easy calling of gerrit_utils steps.
&mdash; **def [abandon\_change](/recipes/recipe_modules/gerrit/api.py#257)(self, host, change, message=None, name=None, step_test_data=None):**
&mdash; **def [abandon\_change](/recipes/recipe_modules/gerrit/api.py#256)(self, host, change, message=None, name=None, step_test_data=None):**
&mdash; **def [call\_raw\_api](/recipes/recipe_modules/gerrit/api.py#32)(self, host, path, method=None, body=None, accept_statuses=None, name=None, \*\*kwargs):**
&mdash; **def [call\_raw\_api](/recipes/recipe_modules/gerrit/api.py#31)(self, host, path, method=None, body=None, accept_statuses=None, name=None, \*\*kwargs):**
Call an arbitrary Gerrit API that returns a JSON response.
Returns:
The JSON response data.
&mdash; **def [create\_gerrit\_branch](/recipes/recipe_modules/gerrit/api.py#61)(self, host, project, branch, commit, \*\*kwargs):**
&mdash; **def [create\_gerrit\_branch](/recipes/recipe_modules/gerrit/api.py#60)(self, host, project, branch, commit, \*\*kwargs):**
Creates a new branch from given project and commit
Returns:
The ref of the branch created
&mdash; **def [create\_gerrit\_tag](/recipes/recipe_modules/gerrit/api.py#80)(self, host, project, tag, commit, \*\*kwargs):**
&mdash; **def [create\_gerrit\_tag](/recipes/recipe_modules/gerrit/api.py#79)(self, host, project, tag, commit, \*\*kwargs):**
Creates a new tag at the given commit.
Returns:
The ref of the tag created.
&mdash; **def [get\_change\_description](/recipes/recipe_modules/gerrit/api.py#119)(self, host, change, patchset, timeout=None, step_test_data=None):**
&mdash; **def [get\_change\_description](/recipes/recipe_modules/gerrit/api.py#118)(self, host, change, patchset, timeout=None, step_test_data=None):**
Gets the description for a given CL and patchset.
......@@ -291,7 +291,7 @@ Args:
Returns:
The description corresponding to given CL and patchset.
&mdash; **def [get\_changes](/recipes/recipe_modules/gerrit/api.py#179)(self, host, query_params, start=None, limit=None, o_params=None, step_test_data=None, \*\*kwargs):**
&mdash; **def [get\_changes](/recipes/recipe_modules/gerrit/api.py#178)(self, host, query_params, start=None, limit=None, o_params=None, step_test_data=None, \*\*kwargs):**
Queries changes for the given host.
......@@ -310,14 +310,14 @@ Returns:
A list of change dicts as documented here:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
&mdash; **def [get\_gerrit\_branch](/recipes/recipe_modules/gerrit/api.py#101)(self, host, project, branch, \*\*kwargs):**
&mdash; **def [get\_gerrit\_branch](/recipes/recipe_modules/gerrit/api.py#100)(self, host, project, branch, \*\*kwargs):**
Gets a branch from given project and commit
Returns:
The revision of the branch
&mdash; **def [get\_related\_changes](/recipes/recipe_modules/gerrit/api.py#221)(self, host, change, revision='current', step_test_data=None):**
&mdash; **def [get\_related\_changes](/recipes/recipe_modules/gerrit/api.py#220)(self, host, change, revision='current', step_test_data=None):**
Queries related changes for a given host, change, and revision.
......@@ -336,7 +336,7 @@ Returns:
A related changes dictionary as documented here:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#related-changes-info
&mdash; **def [get\_revision\_info](/recipes/recipe_modules/gerrit/api.py#138)(self, host, change, patchset, timeout=None, step_test_data=None):**
&mdash; **def [get\_revision\_info](/recipes/recipe_modules/gerrit/api.py#137)(self, host, change, patchset, timeout=None, step_test_data=None):**
Returns the info for a given patchset of a given change.
......@@ -349,11 +349,11 @@ Returns:
A dict for the target revision as documented here:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
&mdash; **def [move\_changes](/recipes/recipe_modules/gerrit/api.py#295)(self, host, project, from_branch, to_branch, step_test_data=None):**
&mdash; **def [move\_changes](/recipes/recipe_modules/gerrit/api.py#294)(self, host, project, from_branch, to_branch, step_test_data=None):**
&mdash; **def [set\_change\_label](/recipes/recipe_modules/gerrit/api.py#277)(self, host, change, label_name, label_value, name=None, step_test_data=None):**
&mdash; **def [set\_change\_label](/recipes/recipe_modules/gerrit/api.py#276)(self, host, change, label_name, label_value, name=None, step_test_data=None):**
&mdash; **def [update\_files](/recipes/recipe_modules/gerrit/api.py#319)(self, host, project, branch, new_contents_by_file_path, commit_msg, params=frozenset(['status=NEW']), cc_list=frozenset([]), submit=False, submit_later=False, step_test_data_create_change=None, step_test_data_submit_change=None):**
&mdash; **def [update\_files](/recipes/recipe_modules/gerrit/api.py#318)(self, host, project, branch, new_contents_by_file_path, commit_msg, params=frozenset(['status=NEW']), cc_list=frozenset([]), submit=False, submit_later=False, step_test_data_create_change=None, step_test_data_submit_change=None):**
Update a set of files by creating and submitting a Gerrit CL.
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
......@@ -5,7 +5,6 @@ DEPS = [
'recipe_engine/file',
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/python',
'recipe_engine/raw_io',
'recipe_engine/step',
'recipe_engine/time',
......
......@@ -22,12 +22,11 @@ class GerritApi(recipe_api.RecipeApi):
env['PATH'], str(self.repo_resource())])
with self.m.context(env=env):
return self.m.python(prefix + name,
self.repo_resource('gerrit_client.py'),
cmd,
infra_step=infra_step,
venv=True,
**kwargs)
return self.m.step(
prefix + name,
['vpython3', self.repo_resource('gerrit_client.py')] + cmd,
infra_step=infra_step,
**kwargs)
def call_raw_api(self,
host,
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"branch",
"--host",
......@@ -31,7 +31,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"branchinfo",
"--host",
......@@ -58,7 +58,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"tag",
"--host",
......@@ -88,7 +88,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"rawapi",
"--host",
......@@ -120,7 +120,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"movechanges",
"--host",
......@@ -168,7 +168,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"createchange",
"--host",
......@@ -238,7 +238,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changeedit",
"--host",
......@@ -261,7 +261,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"publishchangeedit",
"--host",
......@@ -281,7 +281,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -317,7 +317,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -366,7 +366,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"setbotcommit",
"--host",
......@@ -382,7 +382,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"submitchange",
"--host",
......@@ -422,7 +422,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -472,7 +472,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"relatedchanges",
"--host",
......@@ -522,7 +522,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -548,7 +548,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -596,7 +596,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"setlabel",
"--host",
......@@ -622,7 +622,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"setlabel",
"--host",
......@@ -648,7 +648,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"abandon",
"--host",
......@@ -692,7 +692,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -55,7 +55,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -143,7 +143,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -293,7 +293,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -55,7 +55,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -143,7 +143,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......@@ -293,7 +293,7 @@
},
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]/gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]\\gerrit_client.py",
"changes",
"--host",
......
[
{
"cmd": [
"vpython",
"vpython3",
"RECIPE_REPO[depot_tools]\\gerrit_client.py",
"changes",
"--host",
......
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