Bug 1400069 - Ingest superseded result value from pulse

This commit is contained in:
Cameron Dawson 2017-09-26 16:34:09 -07:00
Родитель f9ffe34960
Коммит 75e2766e7b
3 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -178,6 +178,7 @@ properties:
- fail
- exception
- canceled
- superseded
- unknown
jobKind:
type: "string"

Просмотреть файл

@ -199,6 +199,15 @@ def test_transition_running_pending_stays_running(first_job,
change_state_result(first_job, jl, "pending", "unknown", "running", "unknown")
def test_transition_running_superseded(first_job,
failure_classifications,
mock_log_parser):
jl = JobLoader()
change_state_result(first_job, jl, "running", "unknown", "running", "unknown")
change_state_result(first_job, jl, "completed", "superseded", "completed", "superseded")
def test_transition_pending_retry_fail_stays_retry(first_job,
failure_classifications,
mock_log_parser):

Просмотреть файл

@ -23,6 +23,7 @@ class JobLoader:
"fail": "testfailed",
"exception": "exception",
"canceled": "usercancel",
"superseded": "superseded",
"unknown": "unknown"
}
BUILD_RESULT_MAP = {
@ -30,6 +31,7 @@ class JobLoader:
"fail": "busted",
"exception": "exception",
"canceled": "usercancel",
"superseded": "superseded",
"unknown": "unknown"
}
TIME_FIELD_MAP = {
@ -131,7 +133,7 @@ class JobLoader:
"log_references": self._get_log_references(pulse_job),
"artifacts": self._get_artifacts(pulse_job, job_guid),
},
"coalesced": pulse_job.get("coalesced", []),
"superseded": pulse_job.get("coalesced", []),
"revision": pulse_job["origin"]["revision"]
}