diff --git a/treeherder/model/sql/jobs.json b/treeherder/model/sql/jobs.json index b37b0cf6c..f1de12221 100644 --- a/treeherder/model/sql/jobs.json +++ b/treeherder/model/sql/jobs.json @@ -229,6 +229,8 @@ "sql":"SELECT j.id, j.`option_collection_hash`, + j.failure_classification_id, + m.`name` as machine_name, mp.`platform` as platform, jt.`name` as job_type_name, jt.`symbol` as job_type_symbol, @@ -238,6 +240,8 @@ j.`result`, j.`state` FROM `job` as j + LEFT JOIN `REP0`.`machine` as m + ON j.`machine_id` = m.id LEFT JOIN `REP0`.`machine_platform` as mp ON j.`machine_platform_id` = mp.id LEFT JOIN `REP0`.`job_type` as jt @@ -256,13 +260,14 @@ j.`job_coalesced_to_guid`, j.`build_platform_id`, j.`option_collection_hash`, + j.failure_classification_id, + m.`name` as machine_name, mp.`platform` as platform, mp.`os_name` as machine_platform_os, mp.`architecture` as machine_platform_architecture, bp.`platform` as build_platform, bp.`os_name` as build_os, bp.`architecture` as build_architecture, - m.`name` as machine_name, jt.`name` as job_type_name, jt.`symbol` as job_type_symbol, jt.`description` as job_type_description, @@ -430,6 +435,8 @@ "sql":"SELECT j.`id`, j.`option_collection_hash`, + j.failure_classification_id, + m.`name` as machine_name, mp.`platform` as platform, jt.`name` as job_type_name, jt.`symbol` as job_type_symbol, @@ -460,13 +467,14 @@ j.`job_coalesced_to_guid`, j.`build_platform_id`, j.`option_collection_hash`, + j.failure_classification_id, + m.`name` as machine_name, mp.`platform` as platform, mp.`os_name` as machine_platform_os, mp.`architecture` as machine_platform_architecture, bp.`platform` as build_platform, bp.`os_name` as build_os, bp.`architecture` as build_architecture, - m.`name` as machine_name, jt.`name` as job_type_name, jt.`symbol` as job_type_symbol, jt.`description` as job_type_description, diff --git a/treeherder/model/sql/template_schema/project_jobs_1.sql.tmpl b/treeherder/model/sql/template_schema/project_jobs_1.sql.tmpl index b66fe4d0a..71ef3d90e 100644 --- a/treeherder/model/sql/template_schema/project_jobs_1.sql.tmpl +++ b/treeherder/model/sql/template_schema/project_jobs_1.sql.tmpl @@ -103,7 +103,7 @@ CREATE TABLE `job` ( `option_collection_hash` varchar(64) COLLATE utf8_bin DEFAULT NULL, `job_type_id` int(10) unsigned NOT NULL, `product_id` int(10) unsigned DEFAULT NULL, - `failure_classification_id` int(10) unsigned DEFAULT 1, + `failure_classification_id` int(10) unsigned DEFAULT NULL, `who` varchar(50) COLLATE utf8_bin NOT NULL, `reason` varchar(125) COLLATE utf8_bin NOT NULL, `result` varchar(25) COLLATE utf8_bin DEFAULT NULL, diff --git a/treeherder/webapp/api/views.py b/treeherder/webapp/api/views.py index 1848fba58..ce0051b61 100644 --- a/treeherder/webapp/api/views.py +++ b/treeherder/webapp/api/views.py @@ -504,6 +504,7 @@ class ResultSetViewSet(viewsets.ViewSet): del(job["result_set_id"]) del(job["option_collection_hash"]) + job["platform_option"] = platform_option job["resource_uri"] = reverse("jobs-detail", kwargs={"project": jm.project, "pk": job["id"]})