From 352a1a928cd07dc294c21a7fec6d0a40ecd58002 Mon Sep 17 00:00:00 2001 From: Ionut Goldan Date: Tue, 5 Nov 2019 09:47:34 +0000 Subject: [PATCH] Bug 1593192 - Add schema validation for name & version of application under test r=perftest-reviewers,sparky,octavian_negru Differential Revision: https://phabricator.services.mozilla.com/D51410 --HG-- extra : moz-landing-system : lando --- .../performance-artifact-schema.json | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/testing/mozharness/external_tools/performance-artifact-schema.json b/testing/mozharness/external_tools/performance-artifact-schema.json index 0eab09cff216..8423f490a330 100644 --- a/testing/mozharness/external_tools/performance-artifact-schema.json +++ b/testing/mozharness/external_tools/performance-artifact-schema.json @@ -1,5 +1,30 @@ { "definitions": { + "application_schema": { + "properties": { + "name": { + "title": "Application under performance test", + "enum": [ + "firefox", + "chrome", + "chromium", + "fennec", + "geckoview", + "refbrow", + "fenix" + ], + "maxLength": 10, + "type": "string" + }, + "version": { + "title": "Application's version", + "maxLength": 40, + "type": "string" + } + }, + "required": ["name"], + "type": "object" + }, "framework_schema": { "properties": { "name": { @@ -157,6 +182,9 @@ "description": "Structure for submitting performance data as part of a job", "id": "https://treeherder.mozilla.org/schemas/v1/performance-artifact.json#", "properties": { + "application":{ + "$ref": "#/definitions/application_schema" + }, "framework": { "$ref": "#/definitions/framework_schema" },