mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
No bug: Be strict about treeherder symbol splitting; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D82624
This commit is contained in:
parent
ef6f52b8e9
commit
927f176328
@ -11,6 +11,7 @@ from __future__ import absolute_import, print_function, unicode_literals
|
||||
from taskgraph.transforms.base import TransformSequence
|
||||
from taskgraph.util.attributes import RELEASE_PROJECTS
|
||||
from taskgraph.util.schema import resolve_keyed_by
|
||||
from taskgraph.util.treeherder import add_suffix
|
||||
from taskgraph.util.workertypes import worker_type_implementation
|
||||
|
||||
from mozbuild.artifact_builds import JOB_CHOICES as ARTIFACT_JOBS
|
||||
@ -131,7 +132,7 @@ def use_artifact(config, jobs):
|
||||
# If tests aren't packaged, then we are not able to rebuild all the packages
|
||||
and job['worker']['env'].get('MOZ_AUTOMATION_PACKAGE_TESTS') == '1'
|
||||
):
|
||||
job['treeherder']['symbol'] += 'a'
|
||||
job['treeherder']['symbol'] = add_suffix(job['treeherder']['symbol'], 'a')
|
||||
job['worker']['env']['USE_ARTIFACT'] = '1'
|
||||
job['attributes']['artifact-build'] = True
|
||||
yield job
|
||||
|
@ -5,6 +5,8 @@
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
import re
|
||||
|
||||
_JOINED_SYMBOL_RE = re.match(r'([^(]*)\(([^)]*)\)$')
|
||||
|
||||
|
||||
def split_symbol(treeherder_symbol):
|
||||
"""Split a symbol expressed as grp(sym) into its two parts. If no group is
|
||||
@ -12,7 +14,11 @@ def split_symbol(treeherder_symbol):
|
||||
groupSymbol = '?'
|
||||
symbol = treeherder_symbol
|
||||
if '(' in symbol:
|
||||
groupSymbol, symbol = re.match(r'([^(]*)\(([^)]*)\)', symbol).groups()
|
||||
match = _JOINED_SYMBOL_RE.match(symbol)
|
||||
if match:
|
||||
groupSymbol, symbol = match
|
||||
else:
|
||||
raise Exception("`{}` is not a valid treeherder symbol.".format(symbol))
|
||||
return groupSymbol, symbol
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user