From c9b1738b3d4e2181123e3f7fafe16193abc59620 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sat, 10 Oct 2026 12:27:09 +0300 Subject: [PATCH] Count failed jobs of the shown tag only on the service line --- README.md | 7 ++++--- release_scope/_static/index.html | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 48e4b05..73242db 100644 --- a/README.md +++ b/README.md @@ -119,9 +119,10 @@ the language, and so do warnings and errors from `collect`; texts from GitLab an Jira's own error details, stay as written. **Services** lists every service with a production deployment or with rows, and every service that failed to collect, -as one line: what production runs, the picked tag, how many merge requests or commits and Jira tasks it ships, failed jobs -with the ones allowed to fail counted apart, a mark when the range was cut at `RELEASE_SCOPE_MAX_COMMITS`, and how -many rows have no tag yet. +as one line: what production runs, the picked tag, how many merge requests or commits and Jira tasks it ships, the +failed jobs of the picked tag, or of the newest tag before a pick, with the ones allowed to fail counted apart, a mark +when the range was cut at `RELEASE_SCOPE_MAX_COMMITS`, and how many rows have no tag yet. The failed jobs are those of +the tag's pipeline and of the main pipeline of its commit; failures in other rows show only when the line is opened. Opening a line shows the service's environments, warnings, a link to create the next tag on the head when rows have no tag yet, merge requests that are not merged yet, and its rows with tags and their pipelines, merge requests or commits, Jira keys with their status, environments, and failed jobs; rows diff --git a/release_scope/_static/index.html b/release_scope/_static/index.html index 1c23038..e38109a 100644 --- a/release_scope/_static/index.html +++ b/release_scope/_static/index.html @@ -723,14 +723,18 @@

return pipeline ? ICONS[pipeline.status] || pipeline.status : "⚠️"; }, failureCounts(service) { - const pipelines = service.rows.flatMap((row) => [row.main_pipeline, ...row.tags.map((tag) => tag.pipeline)]); + const candidate = this.pickOf(service) || service.candidates[0]; + if (!candidate) return ""; + const row = service.rows.find((item) => item.tags.some((tag) => tag.name === candidate.tag.name)); + const pipelines = [row && row.main_pipeline, candidate.tag.pipeline]; const jobs = pipelines.filter(Boolean).flatMap((pipeline) => pipeline.failed_jobs); const allowed = jobs.filter((job) => job.allow_failure).length; const blocking = jobs.length - allowed; - return [ + const counts = [ blocking ? this.t("failedCount", { count: blocking }) : "", allowed ? this.t("allowedCount", { count: allowed }) : "", ].filter(Boolean).join(" · "); + return counts && !this.pickOf(service) ? `${candidate.tag.name}: ${counts}` : counts; }, failedJobs(row) { const lines = [];