Bug 1272176 - Move performance artifact schema into mozharness directory; r=wlach
authorGregory Szorc <gps@mozilla.com>
Wed, 18 May 2016 11:56:14 -0700
changeset 300286 901aee13bd76c45d6d0c31c7b65e99988ade774b
parent 300285 4353662915021fe5da16a9df0bf4ab4efee426c5
child 300287 82fb632252de2b13ac47500bc16f43d12e19eb17
push id30309
push usercbook@mozilla.com
push dateFri, 03 Jun 2016 10:00:40 +0000
treeherdermozilla-central@e27fe24a746f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswlach
bugs1272176
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1272176 - Move performance artifact schema into mozharness directory; r=wlach Currently, only Talos accesses this file. An uncoming commit will add a non-Talos consumer. Enable all mozharness consumers to access the file by including it in the mozharness directory (previously it was part of the Talos test archive). MozReview-Commit-ID: ADlCj9E5BwC
testing/mozharness/external_tools/performance-artifact-schema.json
testing/mozharness/mozharness/mozilla/testing/talos.py
testing/talos/treeherder-schemas/performance-artifact.json
rename from testing/talos/treeherder-schemas/performance-artifact.json
rename to testing/mozharness/external_tools/performance-artifact-schema.json
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -20,16 +20,21 @@ from mozharness.base.log import OutputPa
 from mozharness.base.log import INFO, WARNING
 from mozharness.mozilla.blob_upload import BlobUploadMixin, blobupload_config_options
 from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options
 from mozharness.base.vcs.vcsbase import MercurialScript
 from mozharness.mozilla.testing.errors import TinderBoxPrintRe
 from mozharness.mozilla.buildbot import TBPL_SUCCESS, TBPL_WORST_LEVEL_TUPLE
 from mozharness.mozilla.buildbot import TBPL_RETRY, TBPL_FAILURE, TBPL_WARNING
 
+external_tools_path = os.path.join(
+    os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__))),
+    'external_tools',
+)
+
 TalosErrorList = PythonErrorList + [
     {'regex': re.compile(r'''run-as: Package '.*' is unknown'''), 'level': DEBUG},
     {'substr': r'''FAIL: Graph server unreachable''', 'level': CRITICAL},
     {'substr': r'''FAIL: Busted:''', 'level': CRITICAL},
     {'substr': r'''FAIL: failed to cleanup''', 'level': ERROR},
     {'substr': r'''erfConfigurator.py: Unknown error''', 'level': CRITICAL},
     {'substr': r'''talosError''', 'level': CRITICAL},
     {'regex': re.compile(r'''No machine_name called '.*' can be found'''), 'level': CRITICAL},
@@ -335,18 +340,18 @@ class Talos(TestingMixin, MercurialScrip
         import jsonschema
 
         if len(parser.found_perf_data) != 1:
             self.critical("PERFHERDER_DATA was seen %d times, expected 1."
                           % len(parser.found_perf_data))
             parser.update_worst_log_and_tbpl_levels(WARNING, TBPL_WARNING)
             return
 
-        schema_path = os.path.join(self.talos_path, 'treeherder-schemas',
-                                   'performance-artifact.json')
+        schema_path = os.path.join(external_tools_path,
+                                   'performance-artifact-schema.json')
         self.info("Validating PERFHERDER_DATA against %s" % schema_path)
         try:
             with open(schema_path) as f:
                 schema = json.load(f)
             data = json.loads(parser.found_perf_data[0])
             jsonschema.validate(data, schema)
         except:
             self.exception("Error while validating PERFHERDER_DATA")