Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: infra/bots/recipes/upload_nano_results.py

Issue 2410843002: Recipe fixes to support try jobs in task scheduler (Closed)
Patch Set: Fix recipe simulation Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: infra/bots/recipes/upload_nano_results.py
diff --git a/infra/bots/recipes/upload_nano_results.py b/infra/bots/recipes/upload_nano_results.py
index 1508f03080c32057e3034322ad101479193039de..50883e7c05a60ac4714df9bcb4d063e611b9ec79 100644
--- a/infra/bots/recipes/upload_nano_results.py
+++ b/infra/bots/recipes/upload_nano_results.py
@@ -19,17 +19,6 @@ def RunSteps(api):
# Upload the nanobench resuls.
builder_name = api.properties['buildername']
- patch_storage = api.properties.get('patch_storage', 'rietveld')
- issue = None
- patchset = None
- if builder_name.endswith('-Trybot'):
- if patch_storage == 'gerrit':
- issue = str(api.properties['event.change.number'])
- patchset = str(api.properties['event.patchSet.ref'].split('/')[-1])
- else:
- issue = str(api.properties['issue'])
- patchset = str(api.properties['patchset'])
-
now = api.time.utcnow()
src_path = api.path['cwd'].join(
@@ -50,9 +39,13 @@ def RunSteps(api):
str(now.month).zfill(2), str(now.day).zfill(2), str(now.hour).zfill(2),
builder_name))
- if builder_name.endswith('-Trybot'):
- if not (issue and patchset): # pragma: nocover
- raise Exception('issue and patchset properties are required for trybots.')
+ issue = str(api.properties.get('issue', ''))
+ 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]
+ if issue and patchset:
gs_path = '/'.join(('trybot', gs_path, issue, patchset))
dst = '/'.join(('gs://skia-perf', gs_path, basename))

Powered by Google App Engine
This is Rietveld 408576698