Commit b32eb45f authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'ci/exclude-timed-out-complexity-jobs-from-pages-collection' into 'main'

[CI] Exclude timed-out or stuck jobs from collection for the complexity/coverage webpage

See merge request !1699
parents 3f49cea3 0036e361
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -65,9 +65,12 @@ def get_job_id(branch_name, job_name, project_id, success_only):
                if job_name not in resp_jobs.text:
                    continue

                # find actual job by name
                # find actual job by name, exclude timed out or stuck jobs
                for job in resp_jobs.json():
                    if job["name"] == job_name:
                    name_matches = job["name"] == job_name
                    is_success = job["status"] == "success"
                    has_timed_out = job.get("failure_reason", "") == "stuck_or_timeout_failure"
                    if name_matches and (is_success or not has_timed_out):
                        job_id = job["id"]
                        break
                if job_id >= 0: