ci_run_n_monitor: use COMPLETED_STATUSES in more places
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29917>
This commit is contained in:

committed by
Marge Bot

parent
fb2adbeeb7
commit
a578101d5b
@@ -121,7 +121,7 @@ def monitor_pipeline(
|
|||||||
if stress:
|
if stress:
|
||||||
# When stress test, it is necessary to collect this information before start.
|
# When stress test, it is necessary to collect this information before start.
|
||||||
for job in pipeline.jobs.list(all=True, include_retried=True):
|
for job in pipeline.jobs.list(all=True, include_retried=True):
|
||||||
if target_jobs_regex.fullmatch(job.name) and job.status in {"success", "failed"}:
|
if target_jobs_regex.fullmatch(job.name) and job.status in COMPLETED_STATUSES:
|
||||||
stress_status_counter[job.name][job.status] += 1
|
stress_status_counter[job.name][job.status] += 1
|
||||||
execution_times[job.name][job.id] = (job_duration(job), job.status, job.web_url)
|
execution_times[job.name][job.id] = (job_duration(job), job.status, job.web_url)
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ def monitor_pipeline(
|
|||||||
target_id = job.id
|
target_id = job.id
|
||||||
target_status = job.status
|
target_status = job.status
|
||||||
|
|
||||||
if stress and target_status in {"success", "failed"}:
|
if stress and target_status in COMPLETED_STATUSES:
|
||||||
if (
|
if (
|
||||||
stress < 0
|
stress < 0
|
||||||
or sum(stress_status_counter[job.name].values()) < stress
|
or sum(stress_status_counter[job.name].values()) < stress
|
||||||
@@ -229,7 +229,7 @@ def enable_job(
|
|||||||
) -> gitlab.v4.objects.ProjectPipelineJob:
|
) -> gitlab.v4.objects.ProjectPipelineJob:
|
||||||
"""enable job"""
|
"""enable job"""
|
||||||
if (
|
if (
|
||||||
(job.status in {"success", "failed"} and action_type != "retry")
|
(job.status in COMPLETED_STATUSES and action_type != "retry")
|
||||||
or (job.status == "manual" and not force_manual)
|
or (job.status == "manual" and not force_manual)
|
||||||
or job.status in {"skipped", "running", "created", "pending"}
|
or job.status in {"skipped", "running", "created", "pending"}
|
||||||
):
|
):
|
||||||
|
Reference in New Issue
Block a user