зеркало из https://github.com/mozilla/treeherder.git
add failure_classification_id to jobs
This commit is contained in:
Родитель
0c979369d3
Коммит
330a418678
|
@ -171,6 +171,15 @@ class JobsModel(TreeherderModelBase):
|
||||||
debug_show=self.DEBUG
|
debug_show=self.DEBUG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.get_jobs_dhub().execute(
|
||||||
|
proc='jobs.updates.update_last_job_classification',
|
||||||
|
placeholders=[
|
||||||
|
failure_classification_id,
|
||||||
|
job_id,
|
||||||
|
],
|
||||||
|
debug_show=self.DEBUG
|
||||||
|
)
|
||||||
|
|
||||||
def get_result_set_ids(self, revision_hashes, where_in_list):
|
def get_result_set_ids(self, revision_hashes, where_in_list):
|
||||||
"""Return the a dictionary of revision_hash to id mappings given
|
"""Return the a dictionary of revision_hash to id mappings given
|
||||||
a list of revision_hashes and a where_in_list.
|
a list of revision_hashes and a where_in_list.
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"pk": 1,
|
||||||
|
"model": "model.failureclassification",
|
||||||
|
"fields": {
|
||||||
|
"name": "not classified",
|
||||||
|
"description": "",
|
||||||
|
"active_status": "active"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pk": 2,
|
||||||
|
"model": "model.failureclassification",
|
||||||
|
"fields": {
|
||||||
|
"name": "expected fail",
|
||||||
|
"description": "",
|
||||||
|
"active_status": "active"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pk": 3,
|
||||||
|
"model": "model.failureclassification",
|
||||||
|
"fields": {
|
||||||
|
"name": "expected fail",
|
||||||
|
"description": "",
|
||||||
|
"active_status": "active"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pk": 4,
|
||||||
|
"model": "model.failureclassification",
|
||||||
|
"fields": {
|
||||||
|
"name": "intermittent",
|
||||||
|
"description": "",
|
||||||
|
"active_status": "active"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pk": 5,
|
||||||
|
"model": "model.failureclassification",
|
||||||
|
"fields": {
|
||||||
|
"name": "infra",
|
||||||
|
"description": "",
|
||||||
|
"active_status": "active"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pk": 6,
|
||||||
|
"model": "model.failureclassification",
|
||||||
|
"fields": {
|
||||||
|
"name": "intermittent needs filing",
|
||||||
|
"description": "",
|
||||||
|
"active_status": "active"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -9,4 +9,5 @@ class Command(BaseCommand):
|
||||||
call_command('loaddata',
|
call_command('loaddata',
|
||||||
'repository_group',
|
'repository_group',
|
||||||
'repository',
|
'repository',
|
||||||
'tasks')
|
'tasks',
|
||||||
|
'failure_classification')
|
||||||
|
|
|
@ -153,6 +153,13 @@
|
||||||
SET `job_coalesced_to_guid` = ?
|
SET `job_coalesced_to_guid` = ?
|
||||||
WHERE `job_guid` = ?",
|
WHERE `job_guid` = ?",
|
||||||
|
|
||||||
|
"host":"master_host"
|
||||||
|
},
|
||||||
|
"update_last_job_classification":{
|
||||||
|
"sql":"UPDATE `job`
|
||||||
|
SET `failure_classification_id` = ?
|
||||||
|
WHERE `job_id` = ?",
|
||||||
|
|
||||||
"host":"master_host"
|
"host":"master_host"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -83,6 +83,7 @@ DROP TABLE IF EXISTS `job`;
|
||||||
* option_collection_hash - References treeherder_reference_1.option_collection.option_collection_hash
|
* option_collection_hash - References treeherder_reference_1.option_collection.option_collection_hash
|
||||||
* job_type_id - References treeherder_reference_1.job_type.id
|
* job_type_id - References treeherder_reference_1.job_type.id
|
||||||
* product_id - References treeherder_reference_1.product.id
|
* product_id - References treeherder_reference_1.product.id
|
||||||
|
* failure_classification_id - References treeherder_reference_1.failure_classification.id
|
||||||
* who - Description of who submitted the job: gaia | scheduler name | username
|
* who - Description of who submitted the job: gaia | scheduler name | username
|
||||||
* reason - Reason for the job: push | scheduled | self-serve | manual
|
* reason - Reason for the job: push | scheduled | self-serve | manual
|
||||||
* result - Job outcome description: success | failure | ...
|
* result - Job outcome description: success | failure | ...
|
||||||
|
@ -102,6 +103,7 @@ CREATE TABLE `job` (
|
||||||
`option_collection_hash` varchar(64) COLLATE utf8_bin DEFAULT NULL,
|
`option_collection_hash` varchar(64) COLLATE utf8_bin DEFAULT NULL,
|
||||||
`job_type_id` int(10) unsigned NOT NULL,
|
`job_type_id` int(10) unsigned NOT NULL,
|
||||||
`product_id` int(10) unsigned DEFAULT NULL,
|
`product_id` int(10) unsigned DEFAULT NULL,
|
||||||
|
`failure_classification_id` int(10) unsigned DEFAULT 1,
|
||||||
`who` varchar(50) COLLATE utf8_bin NOT NULL,
|
`who` varchar(50) COLLATE utf8_bin NOT NULL,
|
||||||
`reason` varchar(125) COLLATE utf8_bin NOT NULL,
|
`reason` varchar(125) COLLATE utf8_bin NOT NULL,
|
||||||
`result` varchar(25) COLLATE utf8_bin DEFAULT NULL,
|
`result` varchar(25) COLLATE utf8_bin DEFAULT NULL,
|
||||||
|
@ -120,6 +122,7 @@ CREATE TABLE `job` (
|
||||||
KEY `idx_option_collection_hash` (`option_collection_hash`),
|
KEY `idx_option_collection_hash` (`option_collection_hash`),
|
||||||
KEY `idx_job_type_id` (`job_type_id`),
|
KEY `idx_job_type_id` (`job_type_id`),
|
||||||
KEY `idx_product_id` (`product_id`),
|
KEY `idx_product_id` (`product_id`),
|
||||||
|
KEY `idx_failure_classification_id` (`failure_classification_id`),
|
||||||
KEY `idx_who` (`who`),
|
KEY `idx_who` (`who`),
|
||||||
KEY `idx_reason` (`reason`),
|
KEY `idx_reason` (`reason`),
|
||||||
KEY `idx_result` (`result`),
|
KEY `idx_result` (`result`),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче