Commit ffdd3d2a authored by Tom Prince's avatar Tom Prince
Browse files

Bug 1531592: [taskgraph] Ensure that treeherder platform has the correct format; r=dustin

A recent change caused the treeherder platform for several jobs to have an extra `/` in it.
This add a check to ensure that the platform is formatted correctly, and fixes the tasks
with the incorrect format.

Differential Revision: https://phabricator.services.mozilla.com/D21650

--HG--
extra : moz-landing-system : lando
parent 0d71623b
......@@ -223,7 +223,7 @@ def make_job_description(config, jobs):
else:
treeherder.setdefault('symbol', 'Rpk')
dep_th_platform = dep_job.task.get('extra', {}).get('treeherder-platform')
treeherder.setdefault('platform', "{}/opt".format(dep_th_platform))
treeherder.setdefault('platform', dep_th_platform)
treeherder.setdefault('tier', 1)
treeherder.setdefault('kind', 'build')
......
......@@ -52,8 +52,7 @@ def make_repackage_signing_description(config, jobs):
else:
treeherder.setdefault('symbol', 'rs(B)')
dep_th_platform = dep_job.task.get('extra', {}).get('treeherder-platform')
treeherder.setdefault('platform',
"{}/opt".format(dep_th_platform))
treeherder.setdefault('platform', dep_th_platform)
treeherder.setdefault(
'tier',
dep_job.task.get('extra', {}).get('treeherder', {}).get('tier', 1)
......
......@@ -36,7 +36,7 @@ from taskgraph.util.scriptworker import (
add_scope_prefix,
)
from taskgraph.util.signed_artifacts import get_signed_artifacts
from voluptuous import Any, Required, Optional, Extra
from voluptuous import Any, Required, Optional, Extra, Match
from taskgraph import GECKO, MAX_DEPENDENCIES
from ..util import docker as dockerutil
......@@ -109,7 +109,7 @@ task_description_schema = Schema({
# task platform, in the form platform/collection, used to set
# treeherder.machine.platform and treeherder.collection or
# treeherder.labels
'platform': basestring,
'platform': Match('^[A-Za-z0-9_-]{1,50}/[A-Za-z0-9_-]{1,50}$'),
},
# information for indexing this build so its artifacts can be discovered;
......
Supports Markdown
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