aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots
diff options
context:
space:
mode:
authorGravatar borenet <borenet@chromium.org>2016-10-27 06:35:51 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-27 06:35:52 -0700
commit96b38426b625b94489fe7ea237d79f9f9a5b406d (patch)
tree57ded30aa85abdd1117e390bd1f412110f42b642 /infra/bots
parenteb94e568826b76429b999572fda58c6c5365121b (diff)
Fix recipes for Gerrit property rename
NOTREECHECKS=true BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2455523004 Review-Url: https://codereview.chromium.org/2455523004
Diffstat (limited to 'infra/bots')
-rw-r--r--infra/bots/recipe_modules/vars/api.py12
-rw-r--r--infra/bots/recipes/swarm_compile.expected/buildbotless_trybot_gerrit.json8
-rw-r--r--infra/bots/recipes/swarm_compile.expected/recipe_with_gerrit_patch.json4
-rw-r--r--infra/bots/recipes/swarm_compile.py25
-rw-r--r--infra/bots/recipes/swarm_perf.expected/nobuildbot.json6
-rw-r--r--infra/bots/recipes/swarm_perf.py43
-rw-r--r--infra/bots/recipes/swarm_test.expected/nobuildbot.json8
-rw-r--r--infra/bots/recipes/swarm_test.expected/recipe_with_gerrit_patch.json8
-rw-r--r--infra/bots/recipes/swarm_test.py20
-rw-r--r--infra/bots/recipes/swarm_trigger.expected/recipe_with_gerrit_patch.json14
-rw-r--r--infra/bots/recipes/swarm_trigger.py9
-rw-r--r--infra/bots/recipes/upload_dm_results.expected/recipe_with_gerrit_patch.json2
-rw-r--r--infra/bots/recipes/upload_dm_results.py17
-rw-r--r--infra/bots/recipes/upload_nano_results.expected/recipe_with_gerrit_patch.json2
-rw-r--r--infra/bots/recipes/upload_nano_results.py17
15 files changed, 104 insertions, 91 deletions
diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py
index 85e592151a..eea6e36c9b 100644
--- a/infra/bots/recipe_modules/vars/api.py
+++ b/infra/bots/recipe_modules/vars/api.py
@@ -120,17 +120,17 @@ class SkiaVarsApi(recipe_api.RecipeApi):
self.is_trybot = True
self.issue = self.m.properties['issue']
self.patchset = self.m.properties['patchset']
- elif (self.m.properties.get('event.change.number', '') and
- self.m.properties.get('event.patchSet.ref', '')):
+ elif (self.m.properties.get('patch_issue', '') and
+ self.m.properties.get('patch_ref', '')):
self.is_trybot = True
- self.issue = self.m.properties['event.change.number']
- self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1]
+ self.issue = self.m.properties['patch_issue']
+ self.patchset = self.m.properties['patch_ref'].split('/')[-1]
else:
self.is_trybot = self.builder_cfg['is_trybot']
if self.is_trybot:
if self.patch_storage == 'gerrit':
- self.issue = self.m.properties['event.change.number']
- self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1]
+ self.issue = self.m.properties['patch_issue']
+ self.patchset = self.m.properties['patch_ref'].split('/')[-1]
else:
self.issue = self.m.properties['issue']
self.patchset = self.m.properties['patchset']
diff --git a/infra/bots/recipes/swarm_compile.expected/buildbotless_trybot_gerrit.json b/infra/bots/recipes/swarm_compile.expected/buildbotless_trybot_gerrit.json
index dab9d349c9..e7fd2cbe36 100644
--- a/infra/bots/recipes/swarm_compile.expected/buildbotless_trybot_gerrit.json
+++ b/infra/bots/recipes/swarm_compile.expected/buildbotless_trybot_gerrit.json
@@ -34,10 +34,10 @@
"{\"skia\": \"got_revision\"}",
"--git-cache-dir",
"[CUSTOM_C:\\_B_CACHE]",
- "--issue",
- "500",
- "--patchset",
- "1",
+ "--gerrit_repo",
+ "skia",
+ "--gerrit_ref",
+ "refs/changes/89/456789/12",
"--output_json",
"/path/to/tmp/json",
"--revision",
diff --git a/infra/bots/recipes/swarm_compile.expected/recipe_with_gerrit_patch.json b/infra/bots/recipes/swarm_compile.expected/recipe_with_gerrit_patch.json
index cc0eef6682..08da211251 100644
--- a/infra/bots/recipes/swarm_compile.expected/recipe_with_gerrit_patch.json
+++ b/infra/bots/recipes/swarm_compile.expected/recipe_with_gerrit_patch.json
@@ -35,9 +35,9 @@
"--git-cache-dir",
"[CUSTOM_C:\\_B_CACHE]",
"--gerrit_repo",
- "skia",
+ "https://skia.googlesource.com/skia",
"--gerrit_ref",
- "refs/changes/00/2100/2",
+ "refs/changes/89/456789/12",
"--output_json",
"/path/to/tmp/json",
"--revision",
diff --git a/infra/bots/recipes/swarm_compile.py b/infra/bots/recipes/swarm_compile.py
index cf4f46fa59..a85e90f8e5 100644
--- a/infra/bots/recipes/swarm_compile.py
+++ b/infra/bots/recipes/swarm_compile.py
@@ -175,12 +175,6 @@ def GenTests(api):
api.platform('win', 64)
)
- gerrit_kwargs = {
- 'patch_storage': 'gerrit',
- 'repository': 'skia',
- 'event.patchSet.ref': 'refs/changes/00/2100/2',
- 'event.change.number': '2100',
- }
yield (
api.test('recipe_with_gerrit_patch') +
api.properties(
@@ -191,7 +185,12 @@ def GenTests(api):
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
revision='abc123',
- **gerrit_kwargs) +
+ patch_storage='gerrit') +
+ api.properties.tryserver(
+ buildername=buildername + '-Trybot',
+ gerrit_project='skia',
+ gerrit_url='https://skia-review.googlesource.com/',
+ ) +
api.platform('win', 64)
)
@@ -226,9 +225,13 @@ def GenTests(api):
swarm_out_dir='[SWARM_OUT_DIR]',
revision='abc123',
nobuildbot='True',
- issue=500,
- patchset=1,
- patch_storage='gerrit',
- gerrit='https://skia-review.googlesource.com') +
+ patch_issue=500,
+ patch_set=1,
+ patch_storage='gerrit') +
+ api.properties.tryserver(
+ buildername=buildername,
+ gerrit_project='skia',
+ gerrit_url='https://skia-review.googlesource.com/',
+ ) +
api.platform('win', 64)
)
diff --git a/infra/bots/recipes/swarm_perf.expected/nobuildbot.json b/infra/bots/recipes/swarm_perf.expected/nobuildbot.json
index 26c22ab24a..d31e97817a 100644
--- a/infra/bots/recipes/swarm_perf.expected/nobuildbot.json
+++ b/infra/bots/recipes/swarm_perf.expected/nobuildbot.json
@@ -190,11 +190,11 @@
"gitHash",
"abc123",
"build_number",
- "5",
+ "571",
"issue",
- "2100",
+ "456789",
"patchset",
- "2",
+ "12",
"patch_storage",
"gerrit",
"no_buildbot",
diff --git a/infra/bots/recipes/swarm_perf.py b/infra/bots/recipes/swarm_perf.py
index 95948aae49..70d9775a57 100644
--- a/infra/bots/recipes/swarm_perf.py
+++ b/infra/bots/recipes/swarm_perf.py
@@ -320,37 +320,44 @@ def GenTests(api):
api.platform('win', 64)
)
- gerrit_kwargs = {
- 'patch_storage': 'gerrit',
- 'repository': 'skia',
- 'event.patchSet.ref': 'refs/changes/00/2100/2',
- 'event.change.number': '2100',
- }
+ builder = ('Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind-'
+ 'Trybot')
yield (
api.test('recipe_with_gerrit_patch') +
api.properties(
- buildername='Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-' +
- 'Valgrind-Trybot',
+ buildername=builder,
mastername='client.skia',
slavename='skiabot-linux-swarm-000',
buildnumber=5,
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
revision='abc123',
- **gerrit_kwargs)
+ patch_storage='gerrit') +
+ api.properties.tryserver(
+ buildername=builder,
+ gerrit_project='skia',
+ gerrit_url='https://skia-review.googlesource.com/',
+ )
)
+ builder = 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot'
yield (
api.test('nobuildbot') +
- api.properties(buildername=builder,
- mastername='client.skia',
- slavename='skiabot-linux-swarm-000',
- buildnumber=5,
- revision='abc123',
- path_config='kitchen',
- nobuildbot='True',
- swarm_out_dir='[SWARM_OUT_DIR]',
- **gerrit_kwargs) +
+ api.properties(
+ buildername=builder,
+ mastername='client.skia',
+ slavename='skiabot-linux-swarm-000',
+ buildnumber=5,
+ revision='abc123',
+ path_config='kitchen',
+ nobuildbot='True',
+ swarm_out_dir='[SWARM_OUT_DIR]',
+ patch_storage='gerrit') +
+ api.properties.tryserver(
+ buildername=builder,
+ gerrit_project='skia',
+ gerrit_url='https://skia-review.googlesource.com/',
+ ) +
api.path.exists(
api.path['slave_build'].join('skia'),
api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
diff --git a/infra/bots/recipes/swarm_test.expected/nobuildbot.json b/infra/bots/recipes/swarm_test.expected/nobuildbot.json
index 92944e0459..73f15025f6 100644
--- a/infra/bots/recipes/swarm_test.expected/nobuildbot.json
+++ b/infra/bots/recipes/swarm_test.expected/nobuildbot.json
@@ -219,15 +219,15 @@
"gitHash",
"abc123",
"master",
- "client.skia",
+ "chromium.testing.master",
"builder",
"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot",
"build_number",
- "5",
+ "571",
"issue",
- "2100",
+ "456789",
"patchset",
- "2",
+ "12",
"patch_storage",
"gerrit",
"no_buildbot",
diff --git a/infra/bots/recipes/swarm_test.expected/recipe_with_gerrit_patch.json b/infra/bots/recipes/swarm_test.expected/recipe_with_gerrit_patch.json
index a00b4537c6..88927b48ce 100644
--- a/infra/bots/recipes/swarm_test.expected/recipe_with_gerrit_patch.json
+++ b/infra/bots/recipes/swarm_test.expected/recipe_with_gerrit_patch.json
@@ -191,15 +191,15 @@
"gitHash",
"abc123",
"master",
- "client.skia",
+ "chromium.testing.master",
"builder",
"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot",
"build_number",
- "5",
+ "571",
"issue",
- "2100",
+ "456789",
"patchset",
- "2",
+ "12",
"patch_storage",
"gerrit",
"--svgs",
diff --git a/infra/bots/recipes/swarm_test.py b/infra/bots/recipes/swarm_test.py
index a84de4624b..24c95182f2 100644
--- a/infra/bots/recipes/swarm_test.py
+++ b/infra/bots/recipes/swarm_test.py
@@ -677,12 +677,6 @@ def GenTests(api):
)
builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
- gerrit_kwargs = {
- 'patch_storage': 'gerrit',
- 'repository': 'skia',
- 'event.patchSet.ref': 'refs/changes/00/2100/2',
- 'event.change.number': '2100',
- }
yield (
api.test('recipe_with_gerrit_patch') +
api.properties(
@@ -693,7 +687,12 @@ def GenTests(api):
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
revision='abc123',
- **gerrit_kwargs)
+ patch_storage='gerrit') +
+ api.properties.tryserver(
+ buildername=builder,
+ gerrit_project='skia',
+ gerrit_url='https://skia-review.googlesource.com/',
+ )
)
yield (
@@ -707,7 +706,12 @@ def GenTests(api):
swarm_out_dir='[SWARM_OUT_DIR]',
revision='abc123',
nobuildbot='True',
- **gerrit_kwargs) +
+ patch_storage='gerrit') +
+ api.properties.tryserver(
+ buildername=builder,
+ gerrit_project='skia',
+ gerrit_url='https://skia-review.googlesource.com/',
+ ) +
api.step_data('get swarming bot id',
stdout=api.raw_io.output('skia-bot-123')) +
api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
diff --git a/infra/bots/recipes/swarm_trigger.expected/recipe_with_gerrit_patch.json b/infra/bots/recipes/swarm_trigger.expected/recipe_with_gerrit_patch.json
index 5ac2417d0c..c4b758599b 100644
--- a/infra/bots/recipes/swarm_trigger.expected/recipe_with_gerrit_patch.json
+++ b/infra/bots/recipes/swarm_trigger.expected/recipe_with_gerrit_patch.json
@@ -4,7 +4,7 @@
"python",
"-u",
"\nimport json\nimport sys\n\nwith open(sys.argv[1]) as f:\n content = json.load(f)\n\nprint json.dumps(content, indent=2)\n",
- "{\"buildername\": \"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot\", \"buildnumber\": 5, \"event.change.number\": \"2100\", \"event.patchSet.ref\": \"refs/changes/00/2100/2\", \"mastername\": \"client.skia\", \"patch_storage\": \"gerrit\", \"path_config\": \"kitchen\", \"recipe\": \"swarm_trigger\", \"repository\": \"skia\", \"revision\": \"abc123\", \"slavename\": \"skiabot-linux-swarm-000\"}"
+ "{\"buildername\": \"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot\", \"buildnumber\": 5, \"mastername\": \"client.skia\", \"patch_issue\": \"2100\", \"patch_ref\": \"refs/changes/00/2100/2\", \"patch_set\": \"2\", \"patch_storage\": \"gerrit\", \"path_config\": \"kitchen\", \"recipe\": \"swarm_trigger\", \"repository\": \"skia\", \"revision\": \"abc123\", \"slavename\": \"skiabot-linux-swarm-000\"}"
],
"name": "print properties",
"~followup_annotations": [
@@ -371,16 +371,16 @@
"--workdir",
"../../..",
"swarm_compile",
- "event.change.number=2100",
"repository=skia",
"buildername=Build-Ubuntu-GCC-x86_64-Debug-Trybot",
"mastername=client.skia.compile",
+ "patch_issue=2100",
"patch_storage=gerrit",
"buildnumber=1",
"slavename=skiabot-dummy-compile-slave",
"reason=Triggered by Skia swarm_trigger Recipe",
"swarm_out_dir=${ISOLATED_OUTDIR}",
- "event.patchSet.ref=refs/changes/00/2100/2",
+ "patch_ref=refs/changes/00/2100/2",
"revision=abc123"
],
"name": "[trigger] compile_skia on Ubuntu",
@@ -649,16 +649,16 @@
"--workdir",
"../../..",
"swarm_test",
- "event.change.number=2100",
"repository=skia",
"buildername=Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot",
"mastername=client.skia",
+ "patch_issue=2100",
"patch_storage=gerrit",
"buildnumber=5",
"slavename=skiabot-linux-swarm-000",
"reason=Triggered by Skia swarm_trigger Recipe",
"swarm_out_dir=${ISOLATED_OUTDIR}",
- "event.patchSet.ref=refs/changes/00/2100/2",
+ "patch_ref=refs/changes/00/2100/2",
"revision=abc123"
],
"name": "[trigger] test_skia on Ubuntu",
@@ -892,16 +892,16 @@
"--workdir",
"../../..",
"upload_dm_results",
- "event.change.number=2100",
"repository=skia",
"buildername=Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot",
"mastername=client.skia",
+ "patch_issue=2100",
"patch_storage=gerrit",
"buildnumber=5",
"slavename=skiabot-linux-swarm-000",
"reason=Triggered by Skia swarm_trigger Recipe",
"swarm_out_dir=${ISOLATED_OUTDIR}",
- "event.patchSet.ref=refs/changes/00/2100/2",
+ "patch_ref=refs/changes/00/2100/2",
"revision=abc123"
],
"name": "[trigger] upload_dm_results_skia on Linux",
diff --git a/infra/bots/recipes/swarm_trigger.py b/infra/bots/recipes/swarm_trigger.py
index cf77c0f734..2869552490 100644
--- a/infra/bots/recipes/swarm_trigger.py
+++ b/infra/bots/recipes/swarm_trigger.py
@@ -214,8 +214,8 @@ def trigger_task(api, task_name, builder, master, slave, buildnumber,
if api.properties.get('patch_storage') == 'gerrit':
properties['patch_storage'] = api.properties['patch_storage']
properties['repository'] = api.properties['repository']
- properties['event.patchSet.ref'] = api.properties['event.patchSet.ref']
- properties['event.change.number'] = api.properties['event.change.number']
+ properties['patch_ref'] = api.properties['patch_ref']
+ properties['patch_issue'] = api.properties['patch_issue']
else:
properties['issue'] = str(api.properties['issue'])
properties['patchset'] = str(api.properties['patchset'])
@@ -749,8 +749,9 @@ def GenTests(api):
gerrit_kwargs = {
'patch_storage': 'gerrit',
'repository': 'skia',
- 'event.patchSet.ref': 'refs/changes/00/2100/2',
- 'event.change.number': '2100',
+ 'patch_ref': 'refs/changes/00/2100/2',
+ 'patch_issue': '2100',
+ 'patch_set': '2',
}
yield (
api.test('recipe_with_gerrit_patch') +
diff --git a/infra/bots/recipes/upload_dm_results.expected/recipe_with_gerrit_patch.json b/infra/bots/recipes/upload_dm_results.expected/recipe_with_gerrit_patch.json
index b65631fecf..3d3a87aea9 100644
--- a/infra/bots/recipes/upload_dm_results.expected/recipe_with_gerrit_patch.json
+++ b/infra/bots/recipes/upload_dm_results.expected/recipe_with_gerrit_patch.json
@@ -99,7 +99,7 @@
"-z",
"json,log",
"[CWD]/tmp_upload/*",
- "gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/1337000001/2100/2"
+ "gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/1337000001/456789/12"
],
"name": "upload JSON and logs"
},
diff --git a/infra/bots/recipes/upload_dm_results.py b/infra/bots/recipes/upload_dm_results.py
index 4298b70efc..dffcc923d9 100644
--- a/infra/bots/recipes/upload_dm_results.py
+++ b/infra/bots/recipes/upload_dm_results.py
@@ -88,8 +88,8 @@ def RunSteps(api):
patchset = str(api.properties.get('patchset', ''))
if (api.properties.get('patch_storage', '') == 'gerrit' and
api.properties.get('nobuildbot', '') != 'True'):
- issue = str(api.properties['event.change.number'])
- patchset = str(api.properties['event.patchSet.ref']).split('/')[-1]
+ issue = str(api.properties['patch_issue'])
+ patchset = str(api.properties['patch_ref']).split('/')[-1]
if issue and patchset:
summary_dest_path = '/'.join((
'trybot', summary_dest_path, issue, patchset))
@@ -139,17 +139,16 @@ def GenTests(api):
patchset='1002')
)
- gerrit_kwargs = {
- 'patch_storage': 'gerrit',
- 'repository': 'skia',
- 'event.patchSet.ref': 'refs/changes/00/2100/2',
- 'event.change.number': '2100',
- }
yield (
api.test('recipe_with_gerrit_patch') +
api.properties(
buildername=builder,
revision='abc123',
path_config='kitchen',
- **gerrit_kwargs)
+ patch_storage='gerrit') +
+ api.properties.tryserver(
+ buildername=builder,
+ gerrit_project='skia',
+ gerrit_url='https://skia-review.googlesource.com/',
+ )
)
diff --git a/infra/bots/recipes/upload_nano_results.expected/recipe_with_gerrit_patch.json b/infra/bots/recipes/upload_nano_results.expected/recipe_with_gerrit_patch.json
index 1ed5afec76..fdf449f3c5 100644
--- a/infra/bots/recipes/upload_nano_results.expected/recipe_with_gerrit_patch.json
+++ b/infra/bots/recipes/upload_nano_results.expected/recipe_with_gerrit_patch.json
@@ -19,7 +19,7 @@
"-z",
"json",
"[CWD]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data/nanobench_abc123.json",
- "gs://skia-perf/trybot/nano-json-v1/2012/05/14/12/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/2100/2/nanobench_abc123.json"
+ "gs://skia-perf/trybot/nano-json-v1/2012/05/14/12/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/456789/12/nanobench_abc123.json"
],
"name": "upload"
},
diff --git a/infra/bots/recipes/upload_nano_results.py b/infra/bots/recipes/upload_nano_results.py
index 50883e7c05..cf71fdcd67 100644
--- a/infra/bots/recipes/upload_nano_results.py
+++ b/infra/bots/recipes/upload_nano_results.py
@@ -43,8 +43,8 @@ def RunSteps(api):
patchset = str(api.properties.get('patchset', ''))
if (api.properties.get('patch_storage', '') == 'gerrit' and
api.properties.get('nobuildbot', '') != 'True'):
- issue = str(api.properties['event.change.number'])
- patchset = str(api.properties['event.patchSet.ref']).split('/')[-1]
+ issue = str(api.properties['patch_issue'])
+ patchset = str(api.properties['patch_ref']).split('/')[-1]
if issue and patchset:
gs_path = '/'.join(('trybot', gs_path, issue, patchset))
@@ -74,17 +74,16 @@ def GenTests(api):
patchset='1002')
)
- gerrit_kwargs = {
- 'patch_storage': 'gerrit',
- 'repository': 'skia',
- 'event.patchSet.ref': 'refs/changes/00/2100/2',
- 'event.change.number': '2100',
- }
yield (
api.test('recipe_with_gerrit_patch') +
api.properties(
buildername=builder,
revision='abc123',
path_config='kitchen',
- **gerrit_kwargs)
+ patch_storage='gerrit') +
+ api.properties.tryserver(
+ buildername=builder,
+ gerrit_project='skia',
+ gerrit_url='https://skia-review.googlesource.com/',
+ )
)