diff --git a/ci/scripts/publish_test_metrics.py b/ci/scripts/publish_test_metrics.py index b4ceea0a..15154937 100644 --- a/ci/scripts/publish_test_metrics.py +++ b/ci/scripts/publish_test_metrics.py @@ -29,11 +29,11 @@ def _read_text(url: str) -> str: def _post_text(url: str, payload: str) -> None: - """POST a plain-text payload and fail on any 4xx/5xx response.""" + """PUT a plain-text payload and fail on any 4xx/5xx response.""" request = urllib.request.Request( url, data=payload.encode("utf-8"), - method="POST", + method="PUT", headers={"Content-Type": "text/plain"}, ) with urllib.request.urlopen(request, timeout=10) as response: @@ -78,6 +78,48 @@ def _collect_junit_totals(pattern: str) -> dict[str, int]: return totals +def _load_junit_cases(path: str) -> list[tuple[str, str]]: + """Parse individual JUnit test case outcomes for flakiness panels.""" + if not os.path.exists(path): + return [] + + tree = ET.parse(path) + root = tree.getroot() + suites: list[ET.Element] + if root.tag == "testsuite": + suites = [root] + elif root.tag == "testsuites": + suites = [elem for elem in root if elem.tag == "testsuite"] + else: + suites = [] + + cases: list[tuple[str, str]] = [] + for suite in suites: + for case in suite.findall("testcase"): + name = (case.attrib.get("name") or "").strip() + classname = (case.attrib.get("classname") or "").strip() + if not name: + continue + test_id = f"{classname}::{name}" if classname else name + status = "passed" + if case.find("failure") is not None: + status = "failed" + elif case.find("error") is not None: + status = "error" + elif case.find("skipped") is not None: + status = "skipped" + cases.append((test_id, status)) + return cases + + +def _collect_junit_cases(pattern: str) -> list[tuple[str, str]]: + """Collect test-case statuses across all matching JUnit XML files.""" + cases: list[tuple[str, str]] = [] + for path in sorted(glob(pattern)): + cases.extend(_load_junit_cases(path)) + return cases + + def _read_exit_code(path: str) -> int: """Read the quality-gate exit code, defaulting to failure if missing.""" try: @@ -136,6 +178,7 @@ def _build_payload( suite: str, status: str, tests: dict[str, int], + test_cases: list[tuple[str, str]], ok_count: int, failed_count: int, branch: str, @@ -171,7 +214,12 @@ def _build_payload( f'platform_quality_gate_workspace_line_coverage_percent{{suite="{suite}"}} {workspace_line_coverage_percent:.3f}', "# TYPE platform_quality_gate_source_lines_over_500_total gauge", f'platform_quality_gate_source_lines_over_500_total{{suite="{suite}"}} {source_lines_over_500}', + "# TYPE platform_quality_gate_test_case_result gauge", ] + lines.extend( + f'platform_quality_gate_test_case_result{{suite="{suite}",test="{_escape_label(test_name)}",status="{_escape_label(test_status)}"}} 1' + for test_name, test_status in test_cases + ) results = summary.get("results", []) if isinstance(summary, dict) else [] if results: lines.append("# TYPE titan_iac_quality_gate_checks_total gauge") @@ -188,7 +236,7 @@ def _build_payload( def main() -> int: """Publish the quality-gate metrics and print a compact run summary.""" - suite = os.getenv("SUITE_NAME", "titan-iac") + suite = os.getenv("SUITE_NAME", "titan_iac") pushgateway_url = os.getenv("PUSHGATEWAY_URL", "http://platform-quality-gateway.monitoring.svc.cluster.local:9091") job_name = os.getenv("QUALITY_GATE_JOB_NAME", "platform-quality-ci") junit_glob = os.getenv("JUNIT_GLOB", os.getenv("JUNIT_PATH", "build/junit-*.xml")) @@ -198,6 +246,7 @@ def main() -> int: build_number = os.getenv("BUILD_NUMBER", "") tests = _collect_junit_totals(junit_glob) + test_cases = _collect_junit_cases(junit_glob) exit_code = _read_exit_code(exit_code_path) status = "ok" if exit_code == 0 else "failed" summary = _load_summary(summary_path) @@ -227,6 +276,7 @@ def main() -> int: suite=suite, status=status, tests=tests, + test_cases=test_cases, ok_count=ok_count, failed_count=failed_count, branch=branch, diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index ea1772e8..0c3e04ba 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -492,33 +492,48 @@ PLATFORM_TEST_SUITE_NAMES = [ "metis", "ananke", "atlasbot", - "lesavka", "pegasus", "soteria", - "titan-iac", - "bstein-home", - "arcanagon", - "data-prepper", + "titan_iac", + "bstein_home", + "data_prepper", ] -PLATFORM_TEST_SUITE_MATCHER = "|".join(PLATFORM_TEST_SUITE_NAMES) PLATFORM_TEST_SUCCESS_STATUS = "ok|passed|success" +PLATFORM_TEST_CI_JOB = "platform-quality-ci" +PLATFORM_TEST_EXPORT_FILTER = f'exported_job="{PLATFORM_TEST_CI_JOB}"' +PLATFORM_TEST_SUITE_VALUE_BY_NAME = { + "ariadne": "ariadne", + "metis": "metis", + "ananke": "ananke", + "atlasbot": "atlasbot", + "pegasus": "pegasus|pegasus-health|pegasus_health", + "soteria": "soteria", + "titan_iac": "titan_iac|titan-iac", + "bstein_home": "bstein_home|bstein-home", + "data_prepper": "data_prepper|data-prepper", +} +PLATFORM_TEST_SUITE_MATCHER = "|".join( + PLATFORM_TEST_SUITE_VALUE_BY_NAME.get(suite, suite) for suite in PLATFORM_TEST_SUITE_NAMES +) +PLATFORM_TEST_SUITE_CANONICAL_MATCHER = "|".join(PLATFORM_TEST_SUITE_NAMES) +PLATFORM_TEST_SUITE_VARIABLE_ALL_MATCHER = PLATFORM_TEST_SUITE_MATCHER PLATFORM_TEST_SUCCESS_EVENTS_30D = ( - f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[30d])) or on() vector(0))' + f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}",{PLATFORM_TEST_EXPORT_FILTER}}}[30d])) or on() vector(0))' ) PLATFORM_TEST_TOTAL_EVENTS_30D = ( - f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}"}}[30d])) or on() vector(0))' + f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",{PLATFORM_TEST_EXPORT_FILTER}}}[30d])) or on() vector(0))' ) PLATFORM_TEST_SUCCESS_EVENTS_7D = ( - f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[7d])) or on() vector(0))' + f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}",{PLATFORM_TEST_EXPORT_FILTER}}}[7d])) or on() vector(0))' ) PLATFORM_TEST_TOTAL_EVENTS_7D = ( - f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}"}}[7d])) or on() vector(0))' + f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",{PLATFORM_TEST_EXPORT_FILTER}}}[7d])) or on() vector(0))' ) PLATFORM_TEST_SUCCESS_EVENTS_24H = ( - f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[24h])) or on() vector(0))' + f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}",{PLATFORM_TEST_EXPORT_FILTER}}}[24h])) or on() vector(0))' ) PLATFORM_TEST_TOTAL_EVENTS_24H = ( - f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}"}}[24h])) or on() vector(0))' + f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",{PLATFORM_TEST_EXPORT_FILTER}}}[24h])) or on() vector(0))' ) TEST_SUCCESS_RATE = ( f"100 * ({PLATFORM_TEST_SUCCESS_EVENTS_30D}) / clamp_min(({PLATFORM_TEST_TOTAL_EVENTS_30D}), 1)" @@ -530,21 +545,46 @@ TEST_SUCCESS_RATE_24H = ( f"100 * ({PLATFORM_TEST_SUCCESS_EVENTS_24H}) / clamp_min(({PLATFORM_TEST_TOTAL_EVENTS_24H}), 1)" ) TEST_FAILURES_24H_TOTAL = ( - f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status!~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[24h])) or on() vector(0))' + f'(sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status!~"{PLATFORM_TEST_SUCCESS_STATUS}",{PLATFORM_TEST_EXPORT_FILTER}}}[24h])) or on() vector(0))' ) PLATFORM_TEST_FAILURES_24H_BY_SUITE = ( - f'sort_desc(sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status!~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[24h])))' + f'sort_desc(sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status!~"{PLATFORM_TEST_SUCCESS_STATUS}",{PLATFORM_TEST_EXPORT_FILTER}}}[24h])))' ) PLATFORM_TEST_ACTIVITY_30D = ( - f'sum by (suite, status) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}"}}[30d]))' + f'sum by (suite, status) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",{PLATFORM_TEST_EXPORT_FILTER}}}[30d]))' ) PLATFORM_TEST_RUNS_24H_TOTAL = PLATFORM_TEST_TOTAL_EVENTS_24H PLATFORM_TEST_ACTIVE_SUITES_24H = ( - f'sum((sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}"}}[24h])) > 0)) ' + f'sum((sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",{PLATFORM_TEST_EXPORT_FILTER}}}[24h])) > 0)) ' "or on() vector(0)" ) PLATFORM_TEST_POINT_WINDOW = "1h" PLATFORM_TEST_SUCCESS_RATE_SUITE_TARGETS = [ + { + "refId": chr(ord("A") + index), + "expr": ( + f'(100 * (sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_VALUE_BY_NAME.get(suite, suite)}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}",{PLATFORM_TEST_EXPORT_FILTER}}}' + f'[{PLATFORM_TEST_POINT_WINDOW}]))) / ' + f'clamp_min((sum(increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_VALUE_BY_NAME.get(suite, suite)}",{PLATFORM_TEST_EXPORT_FILTER}}}[{PLATFORM_TEST_POINT_WINDOW}]))), 1))' + ), + "legendFormat": suite, + } + for index, suite in enumerate(PLATFORM_TEST_SUITE_NAMES) +] +OVERVIEW_PLATFORM_TEST_SUITE_NAMES = [ + "ariadne", + "metis", + "ananke", + "atlasbot", + "lesavka", + "pegasus", + "soteria", + "titan-iac", + "bstein-home", + "arcanagon", + "data-prepper", +] +OVERVIEW_PLATFORM_TEST_SUCCESS_RATE_SUITE_TARGETS = [ { "refId": chr(ord("A") + index), "expr": ( @@ -556,12 +596,30 @@ PLATFORM_TEST_SUCCESS_RATE_SUITE_TARGETS = [ ), "legendFormat": suite, } - for index, suite in enumerate(PLATFORM_TEST_SUITE_NAMES) + for index, suite in enumerate(OVERVIEW_PLATFORM_TEST_SUITE_NAMES) ] PLATFORM_TEST_SUCCESS_RATE_24H_BY_SUITE = ( - f'sort_desc((100 * (sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[24h]))) ' - f'/ clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}"}}[24h]))), 1)) ' - f'and on(suite) ((sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}"}}[24h]))) > 0))' + f'sort_desc(100 * (sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}",{PLATFORM_TEST_EXPORT_FILTER}}}[24h]))) ' + f'/ clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",{PLATFORM_TEST_EXPORT_FILTER}}}[24h]))), 1))' +) +QUALITY_GATE_SUITE_INDEX_30D = ( + f'sum by (suite) (increase(platform_quality_gate_runs_total{{suite=~"{PLATFORM_TEST_SUITE_MATCHER}",{PLATFORM_TEST_EXPORT_FILTER}}}[30d]))' +) +QUALITY_GATE_COVERAGE_BY_SUITE = ( + f'(max by (suite) ({{__name__=~".*_quality_gate_coverage_percent",{PLATFORM_TEST_EXPORT_FILTER}}})) ' + f'or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{{{PLATFORM_TEST_EXPORT_FILTER}}}))' +) +QUALITY_GATE_COVERAGE_BY_SUITE_WITH_MISSING = ( + f"({QUALITY_GATE_COVERAGE_BY_SUITE}) or on(suite) (0 * ({QUALITY_GATE_SUITE_INDEX_30D}) - 1)" +) +QUALITY_GATE_COVERAGE_GAP_BY_SUITE = ( + f"clamp_min(95 - ({QUALITY_GATE_COVERAGE_BY_SUITE}), 0)" +) +QUALITY_GATE_SMELL_INFRACTIONS_BY_SUITE = ( + f"max by (suite) (platform_quality_gate_source_lines_over_500_total{{{PLATFORM_TEST_EXPORT_FILTER}}})" +) +QUALITY_GATE_SMELL_INFRACTIONS_BY_SUITE_WITH_MISSING = ( + f"({QUALITY_GATE_SMELL_INFRACTIONS_BY_SUITE}) or on(suite) (0 * ({QUALITY_GATE_SUITE_INDEX_30D}) - 1)" ) PVC_BACKUP_AGE_HOURS_BY_PVC = "sort_desc(max by (namespace, pvc) (pvc_backup_age_hours or on(namespace, pvc) ((1 - pvc_backup_health) * 999)))" ANANKE_SELECTOR = 'job="ananke-power"' @@ -611,10 +669,6 @@ ANANKE_UPS_DRAW_WATTS_TETHYS = ( f'max((ananke_ups_load_percent{{{ANANKE_UPS_TETHYS_SELECTOR}}} ' f'* ananke_ups_power_nominal_watts{{{ANANKE_UPS_TETHYS_SELECTOR}}}) / 100) or on() vector(0)' ) -ANANKE_UPS_DRAW_WATTS_TOTAL = ( - f'sum((ananke_ups_load_percent{{{ANANKE_SELECTOR}}} * ananke_ups_power_nominal_watts{{{ANANKE_SELECTOR}}}) / 100) ' - "or on() vector(0)" -) ANANKE_UPS_DRAW_WATTS_DB_SERIES = ( f'((ananke_ups_load_percent{{{ANANKE_UPS_DB_SELECTOR}}} ' f'* ananke_ups_power_nominal_watts{{{ANANKE_UPS_DB_SELECTOR}}}) / 100)' @@ -623,9 +677,6 @@ ANANKE_UPS_DRAW_WATTS_TETHYS_SERIES = ( f'((ananke_ups_load_percent{{{ANANKE_UPS_TETHYS_SELECTOR}}} ' f'* ananke_ups_power_nominal_watts{{{ANANKE_UPS_TETHYS_SELECTOR}}}) / 100)' ) -ANANKE_UPS_DRAW_WATTS_TOTAL_SERIES = ( - f'sum((ananke_ups_load_percent{{{ANANKE_SELECTOR}}} * ananke_ups_power_nominal_watts{{{ANANKE_SELECTOR}}}) / 100)' -) ANANKE_UPS_RUNTIME_BY_SOURCE = f"ananke_ups_runtime_seconds{{{ANANKE_SELECTOR}}}" ANANKE_UPS_LOAD_BY_SOURCE = f"ananke_ups_load_percent{{{ANANKE_SELECTOR}}}" ANANKE_UPS_CHARGE_BY_SOURCE = f"ananke_ups_battery_charge_percent{{{ANANKE_SELECTOR}}}" @@ -1055,18 +1106,29 @@ def namespace_scope_links(var_name): def testing_suite_variable(): - options = [{"text": suite, "value": suite, "selected": False} for suite in PLATFORM_TEST_SUITE_NAMES] + options = [ + { + "text": suite, + "value": PLATFORM_TEST_SUITE_VALUE_BY_NAME.get(suite, suite), + "selected": False, + } + for suite in PLATFORM_TEST_SUITE_NAMES + ] + query = ",".join( + f"{suite} : {PLATFORM_TEST_SUITE_VALUE_BY_NAME.get(suite, suite)}" + for suite in PLATFORM_TEST_SUITE_NAMES + ) return { "name": "suite", "label": "Suite", "type": "custom", - "query": ",".join(PLATFORM_TEST_SUITE_NAMES), + "query": query, "current": {"text": "All", "value": "$__all", "selected": True}, "options": options, "hide": 0, "multi": False, "includeAll": True, - "allValue": PLATFORM_TEST_SUITE_MATCHER, + "allValue": PLATFORM_TEST_SUITE_VARIABLE_ALL_MATCHER, "refresh": 1, "sort": 1, "skipUrlSync": False, @@ -1487,7 +1549,6 @@ def build_overview(): targets=[ {"refId": "A", "expr": ANANKE_UPS_DRAW_WATTS_DB_SERIES, "legendFormat": ANANKE_UPS_DB_NAME}, {"refId": "B", "expr": ANANKE_UPS_DRAW_WATTS_TETHYS_SERIES, "legendFormat": ANANKE_UPS_TETHYS_NAME}, - {"refId": "C", "expr": ANANKE_UPS_DRAW_WATTS_TOTAL_SERIES, "legendFormat": "combined"}, ], legend_display="list", legend_placement="bottom", @@ -1661,7 +1722,7 @@ def build_overview(): None, {"h": 5, "w": 6, "x": 12, "y": 7}, unit="percent", - targets=PLATFORM_TEST_SUCCESS_RATE_SUITE_TARGETS, + targets=OVERVIEW_PLATFORM_TEST_SUCCESS_RATE_SUITE_TARGETS, legend_display="table", legend_placement="right", legend_calcs=["lastNotNull"], @@ -2917,53 +2978,177 @@ def build_mail_dashboard(): def build_jobs_dashboard(): panels = [] suite_var = "${suite:regex}" + test_var = "${test:regex}" + success = PLATFORM_TEST_SUCCESS_STATUS + exported = PLATFORM_TEST_EXPORT_FILTER + runs_selector = f'suite=~"{suite_var}",{exported}' + runs_success_selector = f'{runs_selector},status=~"{success}"' + runs_failure_selector = f'{runs_selector},status!~"{success}"' + checks_selector = f'__name__=~".*_quality_gate_checks_total",suite=~"{suite_var}",{exported}' + tests_selector = f'__name__=~".*_quality_gate_tests_total",suite=~"{suite_var}",{exported}' + test_case_selector = f'suite=~"{suite_var}",{exported}' + coverage_metric_selector = f'__name__=~".*_quality_gate_coverage_percent",suite=~"{suite_var}",{exported}' + workspace_coverage_selector = f'suite=~"{suite_var}",{exported}' + smell_selector = f'suite=~"{suite_var}",{exported}' + + suite_universe = " or ".join( + f'label_replace(vector(1), "suite", "{suite}", "__name__", ".*")' + for suite in PLATFORM_TEST_SUITE_NAMES + ) + + runs_24h = f'(sum(increase(platform_quality_gate_runs_total{{{runs_selector}}}[24h])) or on() vector(0))' + runs_30d = f'(sum(increase(platform_quality_gate_runs_total{{{runs_selector}}}[30d])) or on() vector(0))' + success_24h = ( + f'(sum(increase(platform_quality_gate_runs_total{{{runs_success_selector}}}[24h])) or on() vector(0))' + ) + success_30d = ( + f'(sum(increase(platform_quality_gate_runs_total{{{runs_success_selector}}}[30d])) or on() vector(0))' + ) + failures_24h = ( + f'(sum(increase(platform_quality_gate_runs_total{{{runs_failure_selector}}}[24h])) or on() vector(0))' + ) + success_rate_24h = f"100 * ({success_24h}) / clamp_min(({runs_24h}), 1)" + success_rate_30d = f"100 * ({success_30d}) / clamp_min(({runs_30d}), 1)" + success_rate_by_suite_24h = ( + f'sort_desc(100 * (sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_success_selector}}}[24h]))) ' + f'/ clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[24h]))), 1))' + ) + failures_by_suite_24h = ( + f'sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_failure_selector}}}[24h]))' + ) + success_history_by_suite_core = ( + f'100 * (sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_success_selector}}}[$__interval])) ' + f'/ clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[$__interval]))), 1))' + ) + success_history_by_suite = ( + f'({success_history_by_suite_core}) ' + f'or on(suite) (0 * sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[$__range])))' + ) + coverage_by_suite = ( + f'(max by (suite) ({{{coverage_metric_selector}}})) ' + f'or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{{{workspace_coverage_selector}}}))' + ) + coverage_with_missing = ( + f"({coverage_by_suite}) or on(suite) (0 * (sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[30d]))) - 1)" + ) + coverage_gap = f"clamp_min(95 - ({coverage_by_suite}), 0)" + smell_by_suite = f'max by (suite) (platform_quality_gate_source_lines_over_500_total{{{smell_selector}}})' + smell_with_missing = ( + f"({smell_by_suite}) or on(suite) (0 * (sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[30d]))) - 1)" + ) + average_coverage = f"(avg(({coverage_by_suite})) or on() vector(0))" + suites_loc_violating = f'(sum((({smell_by_suite}) > bool 0)) or on() vector(0))' + + checks_failed_total = f'(sum({{{checks_selector},result!~"{success}"}}) or on() vector(0))' + checks_failed_tests = ( + f'(sum(count by (suite) ({{{checks_selector},check=~"tests|unit|build",result!~"{success}"}})) or on() vector(0))' + ) + checks_failed_coverage = ( + f'(sum(count by (suite) ({{{checks_selector},check=~"coverage",result!~"{success}"}})) or on() vector(0))' + ) + checks_failed_loc = ( + f'(sum(count by (suite) ({{{checks_selector},check=~"loc|smell",result!~"{success}"}})) or on() vector(0))' + ) + checks_failed_docs = ( + f'(sum(count by (suite) ({{{checks_selector},check=~"docs|naming|hygiene|lint|docs_naming",result!~"{success}"}})) or on() vector(0))' + ) + checks_failed_gate = ( + f'(sum(count by (suite) ({{{checks_selector},check=~"gate|glue|gate_glue",result!~"{success}"}})) or on() vector(0))' + ) + checks_failed_sonarqube = ( + f'(sum(count by (suite) ({{{checks_selector},check=~"sonarqube|sonar",result!~"{success}"}})) or on() vector(0))' + ) + checks_failed_supply_chain = ( + f'(sum(count by (suite) ({{{checks_selector},check=~"ironbank|supply_chain|image_compliance|artifact_security",result!~"{success}"}})) or on() vector(0))' + ) + check_regex_tests = "tests|unit|build" + check_regex_coverage = "coverage" + check_regex_loc = "loc|smell" + check_regex_style = "docs|naming|hygiene|lint|docs_naming|style" + check_regex_gate_glue = "gate|glue|gate_glue" + check_regex_sonarqube = "sonarqube|sonar" + check_regex_supply_chain = "ironbank|supply_chain|image_compliance|artifact_security" + + def _check_state_series(regex: str, failed: bool) -> str: + state = f'result!~"{success}"' if failed else f'result=~"{success}"' + core = ( + f'sum by (suite) (max_over_time(({{{checks_selector},check=~"{regex}",{state}}})[$__interval]))' + ) + return f'({core}) or on(suite) (0 * ({suite_universe}))' + + missing_tests_by_suite = ( + f'(({suite_universe}) unless on(suite) count by (suite) ({{__name__=~".*_quality_gate_tests_total",{exported}}}))' + ) + missing_checks_by_suite = ( + f'(({suite_universe}) unless on(suite) count by (suite) ({{__name__=~".*_quality_gate_checks_total",{exported}}}))' + ) + missing_coverage_by_suite = ( + f'(({suite_universe}) unless on(suite) count by (suite) (platform_quality_gate_workspace_line_coverage_percent{{{exported}}}))' + ) + missing_loc_by_suite = ( + f'(({suite_universe}) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{{{exported}}}))' + ) + missing_test_case_by_suite = ( + f'(({suite_universe}) unless on(suite) count by (suite) (platform_quality_gate_test_case_result{{{exported}}}))' + ) + problematic_tests_30d = ( + f'topk(20, sort_desc(sum by (suite, test) (max_over_time(platform_quality_gate_test_case_result{{{test_case_selector},status=~"failed|error"}}[30d]))))' + ) + selected_test_status_history = ( + f'sum by (suite, test, status) (max_over_time(platform_quality_gate_test_case_result{{{test_case_selector},test=~"{test_var}"}}[$__interval]))' + ) + success_thresholds = { "mode": "absolute", "steps": [ {"color": "red", "value": None}, - {"color": "orange", "value": 70}, - {"color": "yellow", "value": 85}, - {"color": "green", "value": 95}, + {"color": "orange", "value": 80}, + {"color": "yellow", "value": 95}, + {"color": "green", "value": 99}, ], } - count_thresholds = { + failures_thresholds = { "mode": "absolute", "steps": [ {"color": "green", "value": None}, {"color": "yellow", "value": 1}, {"color": "orange", "value": 3}, - {"color": "red", "value": 6}, + {"color": "red", "value": 5}, + ], + } + coverage_gap_thresholds = { + "mode": "absolute", + "steps": [ + {"color": "green", "value": None}, + {"color": "yellow", "value": 1}, + {"color": "orange", "value": 5}, + {"color": "red", "value": 10}, + ], + } + smell_thresholds = { + "mode": "absolute", + "steps": [ + {"color": "red", "value": None}, + {"color": "green", "value": 0}, + {"color": "yellow", "value": 1}, + {"color": "orange", "value": 3}, + {"color": "red", "value": 5}, + ], + } + missing_thresholds = { + "mode": "absolute", + "steps": [ + {"color": "green", "value": None}, + {"color": "red", "value": 1}, ], } - - panels.append( - text_panel( - 1, - "Testing Modes", - ( - "### Atlas Testing\n" - "- **Overview mode**: set `Suite=All` to compare every project.\n" - "- **Suite drilldown mode**: choose one `Suite` to inspect run outcomes, coverage drift, and failure mix.\n" - "- Jenkins drilldown: [ananke](https://jenkins.bstein.dev/job/ananke/) · " - "[ariadne](https://jenkins.bstein.dev/job/ariadne/) · " - "[atlasbot](https://jenkins.bstein.dev/job/atlasbot/) · " - "[bstein-dev-home](https://jenkins.bstein.dev/job/bstein-dev-home/) · " - "[lesavka](https://jenkins.bstein.dev/job/lesavka/) · " - "[metis](https://jenkins.bstein.dev/job/metis/) · " - "[pegasus](https://jenkins.bstein.dev/job/pegasus/) · " - "[titan-iac](https://jenkins.bstein.dev/job/titan-iac/) · " - "[typhon](https://jenkins.bstein.dev/job/typhon/)" - ), - {"h": 4, "w": 24, "x": 0, "y": 0}, - ) - ) panels.append( stat_panel( 2, "Success Rate (24h)", - TEST_SUCCESS_RATE_24H, - {"h": 6, "w": 4, "x": 0, "y": 4}, + success_rate_24h, + {"h": 5, "w": 4, "x": 0, "y": 0}, unit="percent", decimals=2, instant=True, @@ -2973,9 +3158,9 @@ def build_jobs_dashboard(): panels.append( stat_panel( 3, - "Success Rate (7d)", - TEST_SUCCESS_RATE_7D, - {"h": 6, "w": 4, "x": 4, "y": 4}, + "Success Rate (30d)", + success_rate_30d, + {"h": 5, "w": 4, "x": 4, "y": 0}, unit="percent", decimals=2, instant=True, @@ -2985,32 +3170,20 @@ def build_jobs_dashboard(): panels.append( stat_panel( 4, - "Success Rate (30d)", - TEST_SUCCESS_RATE, - {"h": 6, "w": 4, "x": 8, "y": 4}, - unit="percent", - decimals=2, + "Failures (24h)", + failures_24h, + {"h": 5, "w": 4, "x": 8, "y": 0}, + unit="none", instant=True, - thresholds=success_thresholds, + thresholds=failures_thresholds, ) ) panels.append( stat_panel( 5, - "Failures (24h)", - TEST_FAILURES_24H_TOTAL, - {"h": 6, "w": 4, "x": 12, "y": 4}, - unit="none", - instant=True, - thresholds=count_thresholds, - ) - ) - panels.append( - stat_panel( - 6, "Runs (24h)", - PLATFORM_TEST_RUNS_24H_TOTAL, - {"h": 6, "w": 4, "x": 16, "y": 4}, + runs_24h, + {"h": 5, "w": 4, "x": 12, "y": 0}, unit="none", instant=True, thresholds={ @@ -3021,64 +3194,171 @@ def build_jobs_dashboard(): ) panels.append( stat_panel( - 7, - "Suites Active (24h)", - PLATFORM_TEST_ACTIVE_SUITES_24H, - {"h": 6, "w": 4, "x": 20, "y": 4}, - unit="none", - decimals=0, + 6, + "Avg Coverage (%)", + average_coverage, + {"h": 5, "w": 4, "x": 16, "y": 0}, + unit="percent", + decimals=2, instant=True, - thresholds={ - "mode": "absolute", - "steps": [ - {"color": "red", "value": None}, - {"color": "yellow", "value": 4}, - {"color": "green", "value": 8}, - ], - }, + thresholds=success_thresholds, + ) + ) + panels.append( + stat_panel( + 7, + "Suites with LOC >500", + suites_loc_violating, + {"h": 5, "w": 4, "x": 20, "y": 0}, + unit="none", + instant=True, + thresholds=smell_thresholds, + ) + ) + + panels.append( + stat_panel( + 19, + "Failing Tests", + checks_failed_tests, + {"h": 4, "w": 3, "x": 0, "y": 5}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + panels.append( + stat_panel( + 20, + "Failing Coverage", + checks_failed_coverage, + {"h": 4, "w": 3, "x": 3, "y": 5}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + panels.append( + stat_panel( + 21, + "Failing LOC", + checks_failed_loc, + {"h": 4, "w": 3, "x": 6, "y": 5}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + panels.append( + stat_panel( + 22, + "Failing Docs/Naming", + checks_failed_docs, + {"h": 4, "w": 3, "x": 9, "y": 5}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + panels.append( + stat_panel( + 23, + "Failing Gate/Glue", + checks_failed_gate, + {"h": 4, "w": 3, "x": 12, "y": 5}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + panels.append( + stat_panel( + 24, + "Failing SonarQube", + checks_failed_sonarqube, + {"h": 4, "w": 3, "x": 15, "y": 5}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + panels.append( + stat_panel( + 25, + "Failing Supply Chain", + checks_failed_supply_chain, + {"h": 4, "w": 3, "x": 18, "y": 5}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + panels.append( + stat_panel( + 26, + "Total Failing Checks", + checks_failed_total, + {"h": 4, "w": 3, "x": 21, "y": 5}, + unit="none", + instant=True, + thresholds=failures_thresholds, ) ) panels.append( bargauge_panel( 8, - "Suite Scoreboard: Success Rate (24h)", - PLATFORM_TEST_SUCCESS_RATE_24H_BY_SUITE, - {"h": 8, "w": 12, "x": 0, "y": 10}, - unit="percent", + "Failures by Suite (24h)", + failures_by_suite_24h, + {"h": 8, "w": 8, "x": 0, "y": 9}, + unit="none", instant=True, legend="{{suite}}", - thresholds=success_thresholds, - decimals=2, + thresholds=failures_thresholds, ) ) panels.append( bargauge_panel( 9, - "Suite Scoreboard: Failures (24h)", - PLATFORM_TEST_FAILURES_24H_BY_SUITE, - {"h": 8, "w": 12, "x": 12, "y": 10}, - unit="none", + "Success Rate by Suite (24h)", + success_rate_by_suite_24h, + {"h": 8, "w": 8, "x": 8, "y": 9}, + unit="percent", instant=True, legend="{{suite}}", - thresholds=count_thresholds, - decimals=0, + sort_order="asc", + thresholds=success_thresholds, + decimals=2, ) ) - - suite_panel = timeseries_panel( + coverage_gap_panel = bargauge_panel( 10, - "Suite Success History (1h points)", - None, - {"h": 8, "w": 24, "x": 0, "y": 18}, + "Coverage Gap to 95% by Suite", + coverage_gap, + {"h": 8, "w": 8, "x": 16, "y": 9}, unit="percent", - targets=PLATFORM_TEST_SUCCESS_RATE_SUITE_TARGETS, + instant=True, + legend="{{suite}}", + sort_order="desc", + thresholds=coverage_gap_thresholds, + decimals=2, + ) + coverage_gap_panel["description"] = "Gap from the 95% target. 0 means the suite is at or above target." + panels.append(coverage_gap_panel) + + history_panel = timeseries_panel( + 11, + "Success History by Suite", + success_history_by_suite, + {"h": 8, "w": 24, "x": 0, "y": 17}, + unit="percent", + legend="{{suite}}", legend_display="list", legend_placement="bottom", ) - suite_panel["fieldConfig"]["defaults"]["min"] = 0 - suite_panel["fieldConfig"]["defaults"]["max"] = 100 - suite_panel["fieldConfig"]["defaults"]["custom"] = { + history_panel["fieldConfig"]["defaults"]["min"] = 0 + history_panel["fieldConfig"]["defaults"]["max"] = 100 + history_panel["fieldConfig"]["defaults"]["custom"] = { "drawStyle": "line", "lineInterpolation": "linear", "lineWidth": 2, @@ -3087,129 +3367,459 @@ def build_jobs_dashboard(): "pointSize": 3, "spanNulls": True, } - panels.append(suite_panel) - - panels.append( - table_panel( - 11, - "Suite Activity Matrix (30d)", - PLATFORM_TEST_ACTIVITY_30D, - {"h": 8, "w": 24, "x": 0, "y": 26}, - unit="none", - transformations=[ - {"id": "labelsToFields", "options": {}}, - {"id": "sortBy", "options": {"fields": ["Value"], "order": "desc"}}, - ], - instant=True, - description="Totals by suite and status over the last 30 days.", - ) - ) + panels.append(history_panel) panels.append( timeseries_panel( 12, - "Selected Suite Run Outcomes", + "Run Outcomes (Selected Scope)", None, - {"h": 8, "w": 12, "x": 0, "y": 34}, + {"h": 8, "w": 8, "x": 0, "y": 25}, unit="none", targets=[ { "refId": "A", - "expr": f'sum(increase(platform_quality_gate_runs_total{{suite=~"{suite_var}",status=~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[$__interval])) or on() vector(0)', + "expr": f'sum(increase(platform_quality_gate_runs_total{{{runs_success_selector}}}[$__interval])) or on() vector(0)', "legendFormat": "Success", }, { "refId": "B", - "expr": f'sum(increase(platform_quality_gate_runs_total{{suite=~"{suite_var}",status!~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[$__interval])) or on() vector(0)', + "expr": f'sum(increase(platform_quality_gate_runs_total{{{runs_failure_selector}}}[$__interval])) or on() vector(0)', "legendFormat": "Failure", }, { "refId": "C", - "expr": f'sum(increase(platform_quality_gate_runs_total{{suite=~"{suite_var}"}}[$__interval])) or on() vector(0)', + "expr": f'sum(increase(platform_quality_gate_runs_total{{{runs_selector}}}[$__interval])) or on() vector(0)', "legendFormat": "Total", }, ], - legend_display="table", - legend_placement="right", + legend_display="list", + legend_placement="bottom", legend_calcs=["lastNotNull", "sum"], - description="Use Suite Drilldown to isolate one project.", ) ) - panels.append( timeseries_panel( 13, - "Selected Suite Hygiene & Coverage History", + "Coverage & LOC History (Selected Scope)", None, - {"h": 8, "w": 12, "x": 12, "y": 34}, + {"h": 8, "w": 8, "x": 8, "y": 25}, unit="none", targets=[ { "refId": "A", - "expr": f'max_over_time(platform_quality_gate_workspace_line_coverage_percent{{suite=~"{suite_var}"}}[$__interval])', + "expr": f'max_over_time(platform_quality_gate_workspace_line_coverage_percent{{{workspace_coverage_selector}}}[$__interval])', "legendFormat": "{{suite}} coverage %", }, { "refId": "B", - "expr": f'max_over_time(platform_quality_gate_source_lines_over_500_total{{suite=~"{suite_var}"}}[$__interval])', + "expr": f'max_over_time(platform_quality_gate_source_lines_over_500_total{{{smell_selector}}}[$__interval])', "legendFormat": "{{suite}} files >500 LOC", }, ], - legend_display="table", - legend_placement="right", + legend_display="list", + legend_placement="bottom", legend_calcs=["lastNotNull", "max"], - description="Coverage and LOC hygiene trend for selected suite(s).", ) ) + run_mix_panel = pie_panel( + 14, + "Run Status Mix (30d)", + f'sum by (status) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[30d]))', + {"h": 8, "w": 8, "x": 16, "y": 25}, + ) + run_mix_panel["targets"][0]["legendFormat"] = "{{status}}" + run_mix_panel["fieldConfig"]["defaults"]["unit"] = "none" + panels.append(run_mix_panel) panels.append( - table_panel( - 14, - "Selected Suite Failure Mix (30d)", - f'sum by (suite, status) (increase(platform_quality_gate_runs_total{{suite=~"{suite_var}",status!~"{PLATFORM_TEST_SUCCESS_STATUS}"}}[30d]))', - {"h": 8, "w": 12, "x": 0, "y": 42}, + timeseries_panel( + 130, + "Fail Trend: Tests", + _check_state_series(check_regex_tests, True), + {"h": 6, "w": 3, "x": 0, "y": 33}, unit="none", - transformations=[ - {"id": "labelsToFields", "options": {}}, - {"id": "sortBy", "options": {"fields": ["Value"], "order": "desc"}}, - ], - instant=True, - description="Breakdown of non-success outcomes by status over 30 days.", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], ) ) - panels.append( - table_panel( + timeseries_panel( + 131, + "Fail Trend: Coverage", + _check_state_series(check_regex_coverage, True), + {"h": 6, "w": 3, "x": 3, "y": 33}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 132, + "Fail Trend: LOC", + _check_state_series(check_regex_loc, True), + {"h": 6, "w": 3, "x": 6, "y": 33}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 133, + "Fail Trend: Style", + _check_state_series(check_regex_style, True), + {"h": 6, "w": 3, "x": 9, "y": 33}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 134, + "Fail Trend: Gate Glue", + _check_state_series(check_regex_gate_glue, True), + {"h": 6, "w": 3, "x": 12, "y": 33}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 135, + "Fail Trend: SonarQube", + _check_state_series(check_regex_sonarqube, True), + {"h": 6, "w": 3, "x": 15, "y": 33}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 136, + "Fail Trend: Supply Chain", + _check_state_series(check_regex_supply_chain, True), + {"h": 6, "w": 3, "x": 18, "y": 33}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 138, + "Pass Trend: Tests", + _check_state_series(check_regex_tests, False), + {"h": 6, "w": 3, "x": 0, "y": 39}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 139, + "Pass Trend: Coverage", + _check_state_series(check_regex_coverage, False), + {"h": 6, "w": 3, "x": 3, "y": 39}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 140, + "Pass Trend: LOC", + _check_state_series(check_regex_loc, False), + {"h": 6, "w": 3, "x": 6, "y": 39}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 141, + "Pass Trend: Style", + _check_state_series(check_regex_style, False), + {"h": 6, "w": 3, "x": 9, "y": 39}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 142, + "Pass Trend: Gate Glue", + _check_state_series(check_regex_gate_glue, False), + {"h": 6, "w": 3, "x": 12, "y": 39}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 143, + "Pass Trend: SonarQube", + _check_state_series(check_regex_sonarqube, False), + {"h": 6, "w": 3, "x": 15, "y": 39}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + timeseries_panel( + 144, + "Pass Trend: Supply Chain", + _check_state_series(check_regex_supply_chain, False), + {"h": 6, "w": 3, "x": 18, "y": 39}, + unit="none", + legend="{{suite}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + ) + panels.append( + bargauge_panel( 15, - "Selected Suite Latest Test Counters", - f'sum by (suite, result, __name__) ({{__name__=~".*_quality_gate_tests_total",suite=~"{suite_var}"}})', - {"h": 8, "w": 12, "x": 12, "y": 42}, + "Latest Test Counters (Suite + Result)", + f'sum by (suite, result) ({{{tests_selector}}})', + {"h": 6, "w": 3, "x": 21, "y": 39}, unit="none", - transformations=[ - {"id": "labelsToFields", "options": {}}, - {"id": "sortBy", "options": {"fields": ["Value"], "order": "desc"}}, - ], instant=True, - description="Latest per-suite counters (passed/failed/error/skipped/total) from each pipeline exporter.", + legend="{{suite}} · {{result}}", + sort_order="desc", + limit=24, ) ) + coverage_panel = bargauge_panel( + 17, + "Coverage by Suite (Latest, gate 95)", + coverage_with_missing, + {"h": 8, "w": 12, "x": 0, "y": 45}, + unit="percent", + instant=True, + legend="{{suite}}", + sort_order="asc", + thresholds=success_thresholds, + decimals=2, + ) + coverage_panel["fieldConfig"]["defaults"]["mappings"] = [ + {"type": "value", "options": {"-1": {"text": "missing"}}} + ] + panels.append(coverage_panel) + + smell_panel = bargauge_panel( + 18, + "Files >500 LOC by Suite (Latest)", + smell_with_missing, + {"h": 8, "w": 12, "x": 12, "y": 45}, + unit="none", + instant=True, + legend="{{suite}}", + sort_order="desc", + thresholds=smell_thresholds, + ) + smell_panel["fieldConfig"]["defaults"]["mappings"] = [ + {"type": "value", "options": {"-1": {"text": "missing"}}} + ] + panels.append(smell_panel) + panels.append( - table_panel( - 16, - "Selected Suite Check-Level Failures", - ( - f'sum by (suite, check, result, __name__) ' - f'({{__name__=~".*_quality_gate_checks_total",suite=~"{suite_var}",result!~"ok|passed|success"}})' - ), - {"h": 8, "w": 24, "x": 0, "y": 50}, + bargauge_panel( + 27, + "Missing Tests Metrics by Suite", + missing_tests_by_suite, + {"h": 7, "w": 6, "x": 0, "y": 53}, unit="none", - transformations=[ - {"id": "labelsToFields", "options": {}}, - {"id": "sortBy", "options": {"fields": ["Value"], "order": "desc"}}, - ], instant=True, - description="Per-check failure details for suites that publish quality_gate_checks_total metrics.", + legend="{{suite}}", + sort_order="desc", + thresholds=missing_thresholds, + decimals=0, + ) + ) + panels.append( + bargauge_panel( + 28, + "Missing Checks Metrics by Suite", + missing_checks_by_suite, + {"h": 7, "w": 6, "x": 6, "y": 53}, + unit="none", + instant=True, + legend="{{suite}}", + sort_order="desc", + thresholds=missing_thresholds, + decimals=0, + ) + ) + panels.append( + bargauge_panel( + 29, + "Missing Coverage Metrics by Suite", + missing_coverage_by_suite, + {"h": 7, "w": 6, "x": 12, "y": 53}, + unit="none", + instant=True, + legend="{{suite}}", + sort_order="desc", + thresholds=missing_thresholds, + decimals=0, + ) + ) + panels.append( + bargauge_panel( + 30, + "Missing LOC Metrics by Suite", + missing_loc_by_suite, + {"h": 7, "w": 6, "x": 18, "y": 53}, + unit="none", + instant=True, + legend="{{suite}}", + sort_order="desc", + thresholds=missing_thresholds, + decimals=0, + ) + ) + panels.append( + stat_panel( + 31, + "SonarQube API Up", + "(max(sonarqube_up) or on() vector(0))", + {"h": 6, "w": 4, "x": 0, "y": 60}, + unit="none", + instant=True, + thresholds={ + "mode": "absolute", + "steps": [ + {"color": "red", "value": None}, + {"color": "green", "value": 1}, + ], + }, + ) + ) + panels.append( + stat_panel( + 32, + "Sonar Projects (Selected)", + f'(count(sonarqube_project_quality_gate_pass{{project_key=~"{suite_var}"}}) or on() vector(0))', + {"h": 6, "w": 4, "x": 4, "y": 60}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + panels.append( + stat_panel( + 33, + "Sonar Gate Fetch Errors", + "(max(sonarqube_quality_gate_fetch_errors_total) or on() vector(0))", + {"h": 6, "w": 4, "x": 8, "y": 60}, + unit="none", + instant=True, + thresholds=failures_thresholds, + ) + ) + sonar_status_mix_panel = pie_panel( + 34, + "Sonar Gate Status Mix (Selected)", + f'count by (status) (sonarqube_project_quality_gate_pass{{project_key=~"{suite_var}"}})', + {"h": 6, "w": 6, "x": 12, "y": 60}, + ) + sonar_status_mix_panel["targets"][0]["legendFormat"] = "{{status}}" + panels.append(sonar_status_mix_panel) + panels.append( + bargauge_panel( + 35, + "Projects Failing Sonar Gate", + f'sort_desc(count by (project_key) (sonarqube_project_quality_gate_pass{{project_key=~"{suite_var}",status!~"OK|ok"}}))', + {"h": 6, "w": 6, "x": 18, "y": 60}, + unit="none", + instant=True, + legend="{{project_key}}", + sort_order="desc", + thresholds=failures_thresholds, + ) + ) + panels.append( + bargauge_panel( + 145, + "Problematic Tests (Failed at Least Once, 30d)", + problematic_tests_30d, + {"h": 8, "w": 12, "x": 0, "y": 66}, + unit="none", + instant=True, + legend="{{suite}} · {{test}}", + sort_order="desc", + limit=20, + thresholds=failures_thresholds, + ) + ) + test_history_panel = timeseries_panel( + 146, + "Selected Test Status History", + selected_test_status_history, + {"h": 8, "w": 12, "x": 12, "y": 66}, + unit="none", + legend="{{suite}} · {{test}} · {{status}}", + legend_display="list", + legend_placement="bottom", + legend_calcs=["lastNotNull", "max"], + ) + test_history_panel["description"] = ( + "Use the Test filter to inspect one test across time. Value 1 means that status was observed in an execution interval." + ) + test_history_panel["fieldConfig"]["defaults"]["min"] = 0 + test_history_panel["fieldConfig"]["defaults"]["max"] = 1 + panels.append(test_history_panel) + panels.append( + bargauge_panel( + 147, + "Missing Test-Case Metrics by Suite", + missing_test_case_by_suite, + {"h": 6, "w": 24, "x": 0, "y": 74}, + unit="none", + instant=True, + legend="{{suite}}", + sort_order="desc", + thresholds=missing_thresholds, + decimals=0, ) ) @@ -3227,6 +3837,29 @@ def build_jobs_dashboard(): "templating": { "list": [ testing_suite_variable(), + { + "name": "test", + "label": "Test", + "type": "query", + "datasource": PROM_DS, + "refresh": 1, + "definition": ( + f'label_values(platform_quality_gate_test_case_result{{suite=~"${{suite:regex}}",{exported}}}, test)' + ), + "query": { + "query": ( + f'label_values(platform_quality_gate_test_case_result{{suite=~"${{suite:regex}}",{exported}}}, test)' + ), + "refId": "PrometheusVariableQueryEditor-Test", + }, + "current": {"text": "All", "value": "$__all", "selected": True}, + "multi": False, + "includeAll": True, + "allValue": ".*", + "sort": 1, + "hide": 0, + "skipUrlSync": False, + }, ] }, } @@ -3304,11 +3937,10 @@ def build_power_dashboard(): targets=[ {"refId": "A", "expr": ANANKE_UPS_DRAW_WATTS_DB_SERIES, "legendFormat": ANANKE_UPS_DB_NAME}, {"refId": "B", "expr": ANANKE_UPS_DRAW_WATTS_TETHYS_SERIES, "legendFormat": ANANKE_UPS_TETHYS_NAME}, - {"refId": "C", "expr": ANANKE_UPS_DRAW_WATTS_TOTAL_SERIES, "legendFormat": "combined"}, ], legend_display="table", legend_placement="right", - description="Historical UPS power consumption in watts for titan-db, tethys, and combined load.", + description="Historical UPS power consumption in watts for titan-db and tethys.", ) ) panels.append( diff --git a/services/monitoring/dashboards/atlas-jobs.json b/services/monitoring/dashboards/atlas-jobs.json index 33267af1..92b443a4 100644 --- a/services/monitoring/dashboards/atlas-jobs.json +++ b/services/monitoring/dashboards/atlas-jobs.json @@ -4,22 +4,6 @@ "folderUid": "atlas-internal", "editable": true, "panels": [ - { - "id": 1, - "type": "text", - "title": "Testing Modes", - "gridPos": { - "h": 4, - "w": 24, - "x": 0, - "y": 0 - }, - "datasource": null, - "options": { - "mode": "markdown", - "content": "### Atlas Testing\n- **Overview mode**: set `Suite=All` to compare every project.\n- **Suite drilldown mode**: choose one `Suite` to inspect run outcomes, coverage drift, and failure mix.\n- Jenkins drilldown: [ananke](https://jenkins.bstein.dev/job/ananke/) \u00b7 [ariadne](https://jenkins.bstein.dev/job/ariadne/) \u00b7 [atlasbot](https://jenkins.bstein.dev/job/atlasbot/) \u00b7 [bstein-dev-home](https://jenkins.bstein.dev/job/bstein-dev-home/) \u00b7 [lesavka](https://jenkins.bstein.dev/job/lesavka/) \u00b7 [metis](https://jenkins.bstein.dev/job/metis/) \u00b7 [pegasus](https://jenkins.bstein.dev/job/pegasus/) \u00b7 [titan-iac](https://jenkins.bstein.dev/job/titan-iac/) \u00b7 [typhon](https://jenkins.bstein.dev/job/typhon/)" - } - }, { "id": 2, "type": "stat", @@ -29,14 +13,14 @@ "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, "x": 0, - "y": 4 + "y": 0 }, "targets": [ { - "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status=~\"ok|passed|success\"}[24h])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h])) or on() vector(0))), 1)", + "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[24h])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))), 1)", "refId": "A", "instant": true } @@ -56,15 +40,15 @@ }, { "color": "orange", - "value": 70 + "value": 80 }, { "color": "yellow", - "value": 85 + "value": 95 }, { "color": "green", - "value": 95 + "value": 99 } ] }, @@ -93,20 +77,20 @@ { "id": 3, "type": "stat", - "title": "Success Rate (7d)", + "title": "Success Rate (30d)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, "x": 4, - "y": 4 + "y": 0 }, "targets": [ { - "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status=~\"ok|passed|success\"}[7d])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[7d])) or on() vector(0))), 1)", + "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[30d])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) or on() vector(0))), 1)", "refId": "A", "instant": true } @@ -126,15 +110,15 @@ }, { "color": "orange", - "value": 70 + "value": 80 }, { "color": "yellow", - "value": 85 + "value": 95 }, { "color": "green", - "value": 95 + "value": 99 } ] }, @@ -163,90 +147,20 @@ { "id": 4, "type": "stat", - "title": "Success Rate (30d)", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 8, - "y": 4 - }, - "targets": [ - { - "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status=~\"ok|passed|success\"}[30d])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[30d])) or on() vector(0))), 1)", - "refId": "A", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 70 - }, - { - "color": "yellow", - "value": 85 - }, - { - "color": "green", - "value": 95 - } - ] - }, - "unit": "percent", - "custom": { - "displayMode": "auto" - }, - "decimals": 2 - }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - } - }, - { - "id": 5, - "type": "stat", "title": "Failures (24h)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, - "x": 12, - "y": 4 + "x": 8, + "y": 0 }, "targets": [ { - "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status!~\"ok|passed|success\"}[24h])) or on() vector(0))", + "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status!~\"ok|passed|success\"}[24h])) or on() vector(0))", "refId": "A", "instant": true } @@ -274,7 +188,7 @@ }, { "color": "red", - "value": 6 + "value": 5 } ] }, @@ -300,7 +214,7 @@ } }, { - "id": 6, + "id": 5, "type": "stat", "title": "Runs (24h)", "datasource": { @@ -308,14 +222,14 @@ "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, - "x": 16, - "y": 4 + "x": 12, + "y": 0 }, "targets": [ { - "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h])) or on() vector(0))", + "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))", "refId": "A", "instant": true } @@ -361,22 +275,22 @@ } }, { - "id": 7, + "id": 6, "type": "stat", - "title": "Suites Active (24h)", + "title": "Avg Coverage (%)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, - "x": 20, - "y": 4 + "x": 16, + "y": 0 }, "targets": [ { - "expr": "sum((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h])) > 0)) or on() vector(0)", + "expr": "(avg(((max by (suite) ({__name__=~\".*_quality_gate_coverage_percent\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})))) or on() vector(0))", "refId": "A", "instant": true } @@ -394,21 +308,650 @@ "color": "red", "value": null }, + { + "color": "orange", + "value": 80 + }, { "color": "yellow", - "value": 4 + "value": 95 }, { "color": "green", - "value": 8 + "value": 99 + } + ] + }, + "unit": "percent", + "custom": { + "displayMode": "auto" + }, + "decimals": 2 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 7, + "type": "stat", + "title": "Suites with LOC >500", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 0 + }, + "targets": [ + { + "expr": "(sum(((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) > bool 0)) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 } ] }, "unit": "none", "custom": { "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 19, + "type": "stat", + "title": "Failing Tests", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"tests|unit|build\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "decimals": 0 + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 20, + "type": "stat", + "title": "Failing Coverage", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 3, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"coverage\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 21, + "type": "stat", + "title": "Failing LOC", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 6, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"loc|smell\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 22, + "type": "stat", + "title": "Failing Docs/Naming", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 9, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"docs|naming|hygiene|lint|docs_naming\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 23, + "type": "stat", + "title": "Failing Gate/Glue", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 12, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"gate|glue|gate_glue\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 24, + "type": "stat", + "title": "Failing SonarQube", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 15, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"sonarqube|sonar\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 25, + "type": "stat", + "title": "Failing Supply Chain", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 18, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 26, + "type": "stat", + "title": "Total Failing Checks", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 21, + "y": 5 + }, + "targets": [ + { + "expr": "(sum({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",result!~\"ok|passed|success\"}) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } }, "overrides": [] }, @@ -429,20 +972,20 @@ { "id": 8, "type": "bargauge", - "title": "Suite Scoreboard: Success Rate (24h)", + "title": "Failures by Suite (24h)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 8, - "w": 12, + "w": 8, "x": 0, - "y": 10 + "y": 9 }, "targets": [ { - "expr": "sort_desc((100 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status=~\"ok|passed|success\"}[24h]))) / clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h]))), 1)) and on(suite) ((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h]))) > 0))", + "expr": "sort_desc(sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status!~\"ok|passed|success\"}[24h])))", "refId": "A", "legendFormat": "{{suite}}", "instant": true @@ -450,31 +993,30 @@ ], "fieldConfig": { "defaults": { - "unit": "percent", + "unit": "none", "min": 0, - "max": 100, + "max": null, "thresholds": { "mode": "absolute", "steps": [ { - "color": "red", + "color": "green", "value": null }, - { - "color": "orange", - "value": 70 - }, { "color": "yellow", - "value": 85 + "value": 1 }, { - "color": "green", - "value": 95 + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 } ] - }, - "decimals": 2 + } }, "overrides": [] }, @@ -504,20 +1046,20 @@ { "id": 9, "type": "bargauge", - "title": "Suite Scoreboard: Failures (24h)", + "title": "Success Rate by Suite (24h)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 10 + "w": 8, + "x": 8, + "y": 9 }, "targets": [ { - "expr": "sort_desc(sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status!~\"ok|passed|success\"}[24h])))", + "expr": "sort_desc(100 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[24h]))) / clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[24h]))), 1))", "refId": "A", "legendFormat": "{{suite}}", "instant": true @@ -525,9 +1067,84 @@ ], "fieldConfig": { "defaults": { - "unit": "none", + "unit": "percent", "min": 0, - "max": null, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 80 + }, + { + "color": "yellow", + "value": 95 + }, + { + "color": "green", + "value": 99 + } + ] + }, + "decimals": 2 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "asc" + } + } + ] + }, + { + "id": 10, + "type": "bargauge", + "title": "Coverage Gap to 95% by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 9 + }, + "targets": [ + { + "expr": "sort_desc(clamp_min(95 - ((max by (suite) ({__name__=~\".*_quality_gate_coverage_percent\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))), 0))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, "thresholds": { "mode": "absolute", "steps": [ @@ -541,15 +1158,15 @@ }, { "color": "orange", - "value": 3 + "value": 5 }, { "color": "red", - "value": 6 + "value": 10 } ] }, - "decimals": 0 + "decimals": 2 }, "overrides": [] }, @@ -574,12 +1191,13 @@ "order": "desc" } } - ] + ], + "description": "Gap from the 95% target. 0 means the suite is at or above target." }, { - "id": 10, + "id": 11, "type": "timeseries", - "title": "Suite Success History (1h points)", + "title": "Success History by Suite", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -588,63 +1206,13 @@ "h": 8, "w": 24, "x": 0, - "y": 18 + "y": 17 }, "targets": [ { + "expr": "(100 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[$__interval])) / clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 1))) or on(suite) (0 * sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__range])))", "refId": "A", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"ariadne\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"ariadne\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"ariadne\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "ariadne" - }, - { - "refId": "B", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"metis\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"metis\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"metis\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "metis" - }, - { - "refId": "C", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"ananke\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"ananke\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"ananke\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "ananke" - }, - { - "refId": "D", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"atlasbot\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"atlasbot\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"atlasbot\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "atlasbot" - }, - { - "refId": "E", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"lesavka\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"lesavka\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"lesavka\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "lesavka" - }, - { - "refId": "F", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"pegasus\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"pegasus\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"pegasus\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "pegasus" - }, - { - "refId": "G", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"soteria\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"soteria\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"soteria\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "soteria" - }, - { - "refId": "H", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"titan-iac\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"titan-iac\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"titan-iac\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "titan-iac" - }, - { - "refId": "I", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"bstein-home\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"bstein-home\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"bstein-home\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "bstein-home" - }, - { - "refId": "J", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"arcanagon\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"arcanagon\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"arcanagon\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "arcanagon" - }, - { - "refId": "K", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"data-prepper\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"data-prepper\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"data-prepper\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "data-prepper" + "legendFormat": "{{suite}}" } ], "fieldConfig": { @@ -674,85 +1242,34 @@ } } }, - { - "id": 11, - "type": "table", - "title": "Suite Activity Matrix (30d)", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 26 - }, - "targets": [ - { - "expr": "sum by (suite, status) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[30d]))", - "refId": "A", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "unit": "none", - "custom": { - "filterable": true - } - }, - "overrides": [] - }, - "options": { - "showHeader": true, - "columnFilters": false - }, - "transformations": [ - { - "id": "labelsToFields", - "options": {} - }, - { - "id": "sortBy", - "options": { - "fields": [ - "Value" - ], - "order": "desc" - } - } - ], - "description": "Totals by suite and status over the last 30 days." - }, { "id": 12, "type": "timeseries", - "title": "Selected Suite Run Outcomes", + "title": "Run Outcomes (Selected Scope)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 8, - "w": 12, + "w": 8, "x": 0, - "y": 34 + "y": 25 }, "targets": [ { "refId": "A", - "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",status=~\"ok|passed|success\"}[$__interval])) or on() vector(0)", + "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[$__interval])) or on() vector(0)", "legendFormat": "Success" }, { "refId": "B", - "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",status!~\"ok|passed|success\"}[$__interval])) or on() vector(0)", + "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status!~\"ok|passed|success\"}[$__interval])) or on() vector(0)", "legendFormat": "Failure" }, { "refId": "C", - "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\"}[$__interval])) or on() vector(0)", + "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])) or on() vector(0)", "legendFormat": "Total" } ], @@ -764,8 +1281,8 @@ }, "options": { "legend": { - "displayMode": "table", - "placement": "right", + "displayMode": "list", + "placement": "bottom", "calcs": [ "lastNotNull", "sum" @@ -774,32 +1291,31 @@ "tooltip": { "mode": "multi" } - }, - "description": "Use Suite Drilldown to isolate one project." + } }, { "id": 13, "type": "timeseries", - "title": "Selected Suite Hygiene & Coverage History", + "title": "Coverage & LOC History (Selected Scope)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 34 + "w": 8, + "x": 8, + "y": 25 }, "targets": [ { "refId": "A", - "expr": "max_over_time(platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\"}[$__interval])", + "expr": "max_over_time(platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])", "legendFormat": "{{suite}} coverage %" }, { "refId": "B", - "expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\"}[$__interval])", + "expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])", "legendFormat": "{{suite}} files >500 LOC" } ], @@ -811,8 +1327,1601 @@ }, "options": { "legend": { - "displayMode": "table", - "placement": "right", + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 14, + "type": "piechart", + "title": "Run Status Mix (30d)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 25 + }, + "targets": [ + { + "expr": "sum by (status) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d]))", + "refId": "A", + "legendFormat": "{{status}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "color": { + "mode": "palette-classic" + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "right" + }, + "pieType": "pie", + "displayLabels": [], + "tooltip": { + "mode": "single" + }, + "colorScheme": "interpolateSpectral", + "colorBy": "value", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + } + }, + { + "id": 130, + "type": "timeseries", + "title": "Fail Trend: Tests", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 0, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"tests|unit|build\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 131, + "type": "timeseries", + "title": "Fail Trend: Coverage", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 3, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"coverage\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 132, + "type": "timeseries", + "title": "Fail Trend: LOC", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 6, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"loc|smell\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 133, + "type": "timeseries", + "title": "Fail Trend: Style", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 9, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 134, + "type": "timeseries", + "title": "Fail Trend: Gate Glue", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 12, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"gate|glue|gate_glue\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 135, + "type": "timeseries", + "title": "Fail Trend: SonarQube", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 15, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"sonarqube|sonar\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 136, + "type": "timeseries", + "title": "Fail Trend: Supply Chain", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 18, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 138, + "type": "timeseries", + "title": "Pass Trend: Tests", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 0, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"tests|unit|build\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 139, + "type": "timeseries", + "title": "Pass Trend: Coverage", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 3, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"coverage\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 140, + "type": "timeseries", + "title": "Pass Trend: LOC", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 6, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"loc|smell\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 141, + "type": "timeseries", + "title": "Pass Trend: Style", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 9, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 142, + "type": "timeseries", + "title": "Pass Trend: Gate Glue", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 12, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"gate|glue|gate_glue\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 143, + "type": "timeseries", + "title": "Pass Trend: SonarQube", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 15, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"sonarqube|sonar\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 144, + "type": "timeseries", + "title": "Pass Trend: Supply Chain", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 18, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 15, + "type": "bargauge", + "title": "Latest Test Counters (Suite + Result)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 21, + "y": 39 + }, + "targets": [ + { + "expr": "sort_desc(sum by (suite, result) ({__name__=~\".*_quality_gate_tests_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))", + "refId": "A", + "legendFormat": "{{suite}} \u00b7 {{result}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 50 + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + }, + { + "id": "limit", + "options": { + "limit": 24 + } + } + ] + }, + { + "id": 17, + "type": "bargauge", + "title": "Coverage by Suite (Latest, gate 95)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 45 + }, + "targets": [ + { + "expr": "sort(((max by (suite) ({__name__=~\".*_quality_gate_coverage_percent\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d]))) - 1))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 80 + }, + { + "color": "yellow", + "value": 95 + }, + { + "color": "green", + "value": 99 + } + ] + }, + "decimals": 2, + "mappings": [ + { + "type": "value", + "options": { + "-1": { + "text": "missing" + } + } + } + ] + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "asc" + } + } + ] + }, + { + "id": 18, + "type": "bargauge", + "title": "Files >500 LOC by Suite (Latest)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 45 + }, + "targets": [ + { + "expr": "sort_desc((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) (0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d]))) - 1))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "mappings": [ + { + "type": "value", + "options": { + "-1": { + "text": "missing" + } + } + } + ] + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 27, + "type": "bargauge", + "title": "Missing Tests Metrics by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 53 + }, + "targets": [ + { + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) ({__name__=~\".*_quality_gate_tests_total\",exported_job=\"platform-quality-ci\"})))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 28, + "type": "bargauge", + "title": "Missing Checks Metrics by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 53 + }, + "targets": [ + { + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) ({__name__=~\".*_quality_gate_checks_total\",exported_job=\"platform-quality-ci\"})))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 29, + "type": "bargauge", + "title": "Missing Coverage Metrics by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 53 + }, + "targets": [ + { + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_workspace_line_coverage_percent{exported_job=\"platform-quality-ci\"})))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 30, + "type": "bargauge", + "title": "Missing LOC Metrics by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 53 + }, + "targets": [ + { + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"})))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 31, + "type": "stat", + "title": "SonarQube API Up", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 0, + "y": 60 + }, + "targets": [ + { + "expr": "(max(sonarqube_up) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 32, + "type": "stat", + "title": "Sonar Projects (Selected)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 4, + "y": 60 + }, + "targets": [ + { + "expr": "(count(sonarqube_project_quality_gate_pass{project_key=~\"${suite:regex}\"}) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 33, + "type": "stat", + "title": "Sonar Gate Fetch Errors", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 8, + "y": 60 + }, + "targets": [ + { + "expr": "(max(sonarqube_quality_gate_fetch_errors_total) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 34, + "type": "piechart", + "title": "Sonar Gate Status Mix (Selected)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 60 + }, + "targets": [ + { + "expr": "count by (status) (sonarqube_project_quality_gate_pass{project_key=~\"${suite:regex}\"})", + "refId": "A", + "legendFormat": "{{status}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "color": { + "mode": "palette-classic" + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "right" + }, + "pieType": "pie", + "displayLabels": [], + "tooltip": { + "mode": "single" + }, + "colorScheme": "interpolateSpectral", + "colorBy": "value", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + } + }, + { + "id": 35, + "type": "bargauge", + "title": "Projects Failing Sonar Gate", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 60 + }, + "targets": [ + { + "expr": "sort_desc(count by (project_key) (sonarqube_project_quality_gate_pass{project_key=~\"${suite:regex}\",status!~\"OK|ok\"}))", + "refId": "A", + "legendFormat": "{{project_key}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + } + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 145, + "type": "bargauge", + "title": "Problematic Tests (Failed at Least Once, 30d)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 66 + }, + "targets": [ + { + "expr": "sort_desc(topk(20, sort_desc(sum by (suite, test) (max_over_time(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"failed|error\"}[30d])))))", + "refId": "A", + "legendFormat": "{{suite}} \u00b7 {{test}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + } + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + }, + { + "id": "limit", + "options": { + "limit": 20 + } + } + ] + }, + { + "id": 146, + "type": "timeseries", + "title": "Selected Test Status History", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 66 + }, + "targets": [ + { + "expr": "sum by (suite, test, status) (max_over_time(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",test=~\"${test:regex}\"}[$__interval]))", + "refId": "A", + "legendFormat": "{{suite}} \u00b7 {{test}} \u00b7 {{status}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", "calcs": [ "lastNotNull", "max" @@ -822,149 +2931,64 @@ "mode": "multi" } }, - "description": "Coverage and LOC hygiene trend for selected suite(s)." + "description": "Use the Test filter to inspect one test across time. Value 1 means that status was observed in an execution interval." }, { - "id": 14, - "type": "table", - "title": "Selected Suite Failure Mix (30d)", + "id": 147, + "type": "bargauge", + "title": "Missing Test-Case Metrics by Suite", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 42 - }, - "targets": [ - { - "expr": "sum by (suite, status) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",status!~\"ok|passed|success\"}[30d]))", - "refId": "A", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "unit": "none", - "custom": { - "filterable": true - } - }, - "overrides": [] - }, - "options": { - "showHeader": true, - "columnFilters": false - }, - "transformations": [ - { - "id": "labelsToFields", - "options": {} - }, - { - "id": "sortBy", - "options": { - "fields": [ - "Value" - ], - "order": "desc" - } - } - ], - "description": "Breakdown of non-success outcomes by status over 30 days." - }, - { - "id": 15, - "type": "table", - "title": "Selected Suite Latest Test Counters", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 42 - }, - "targets": [ - { - "expr": "sum by (suite, result, __name__) ({__name__=~\".*_quality_gate_tests_total\",suite=~\"${suite:regex}\"})", - "refId": "A", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "unit": "none", - "custom": { - "filterable": true - } - }, - "overrides": [] - }, - "options": { - "showHeader": true, - "columnFilters": false - }, - "transformations": [ - { - "id": "labelsToFields", - "options": {} - }, - { - "id": "sortBy", - "options": { - "fields": [ - "Value" - ], - "order": "desc" - } - } - ], - "description": "Latest per-suite counters (passed/failed/error/skipped/total) from each pipeline exporter." - }, - { - "id": 16, - "type": "table", - "title": "Selected Suite Check-Level Failures", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 8, + "h": 6, "w": 24, "x": 0, - "y": 50 + "y": 74 }, "targets": [ { - "expr": "sum by (suite, check, result, __name__) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",result!~\"ok|passed|success\"})", + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_test_case_result{exported_job=\"platform-quality-ci\"})))", "refId": "A", + "legendFormat": "{{suite}}", "instant": true } ], "fieldConfig": { "defaults": { "unit": "none", - "custom": { - "filterable": true - } + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 }, "overrides": [] }, "options": { - "showHeader": true, - "columnFilters": false + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } }, "transformations": [ - { - "id": "labelsToFields", - "options": {} - }, { "id": "sortBy", "options": { @@ -974,8 +2998,7 @@ "order": "desc" } } - ], - "description": "Per-check failure details for suites that publish quality_gate_checks_total metrics." + ] } ], "time": { @@ -999,7 +3022,7 @@ "name": "suite", "label": "Suite", "type": "custom", - "query": "ariadne,metis,ananke,atlasbot,lesavka,pegasus,soteria,titan-iac,bstein-home,arcanagon,data-prepper", + "query": "ariadne : ariadne,metis : metis,ananke : ananke,atlasbot : atlasbot,pegasus : pegasus|pegasus-health|pegasus_health,soteria : soteria,titan_iac : titan_iac|titan-iac,bstein_home : bstein_home|bstein-home,data_prepper : data_prepper|data-prepper", "current": { "text": "All", "value": "$__all", @@ -1026,14 +3049,9 @@ "value": "atlasbot", "selected": false }, - { - "text": "lesavka", - "value": "lesavka", - "selected": false - }, { "text": "pegasus", - "value": "pegasus", + "value": "pegasus|pegasus-health|pegasus_health", "selected": false }, { @@ -1042,33 +3060,54 @@ "selected": false }, { - "text": "titan-iac", - "value": "titan-iac", + "text": "titan_iac", + "value": "titan_iac|titan-iac", "selected": false }, { - "text": "bstein-home", - "value": "bstein-home", + "text": "bstein_home", + "value": "bstein_home|bstein-home", "selected": false }, { - "text": "arcanagon", - "value": "arcanagon", - "selected": false - }, - { - "text": "data-prepper", - "value": "data-prepper", + "text": "data_prepper", + "value": "data_prepper|data-prepper", "selected": false } ], "hide": 0, "multi": false, "includeAll": true, - "allValue": "ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper", + "allValue": "ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper", "refresh": 1, "sort": 1, "skipUrlSync": false + }, + { + "name": "test", + "label": "Test", + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "refresh": 1, + "definition": "label_values(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}, test)", + "query": { + "query": "label_values(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}, test)", + "refId": "PrometheusVariableQueryEditor-Test" + }, + "current": { + "text": "All", + "value": "$__all", + "selected": true + }, + "multi": false, + "includeAll": true, + "allValue": ".*", + "sort": 1, + "hide": 0, + "skipUrlSync": false } ] } diff --git a/services/monitoring/grafana-dashboard-jobs.yaml b/services/monitoring/grafana-dashboard-jobs.yaml index 127c068a..84222ff4 100644 --- a/services/monitoring/grafana-dashboard-jobs.yaml +++ b/services/monitoring/grafana-dashboard-jobs.yaml @@ -13,22 +13,6 @@ data: "folderUid": "atlas-internal", "editable": true, "panels": [ - { - "id": 1, - "type": "text", - "title": "Testing Modes", - "gridPos": { - "h": 4, - "w": 24, - "x": 0, - "y": 0 - }, - "datasource": null, - "options": { - "mode": "markdown", - "content": "### Atlas Testing\n- **Overview mode**: set `Suite=All` to compare every project.\n- **Suite drilldown mode**: choose one `Suite` to inspect run outcomes, coverage drift, and failure mix.\n- Jenkins drilldown: [ananke](https://jenkins.bstein.dev/job/ananke/) \u00b7 [ariadne](https://jenkins.bstein.dev/job/ariadne/) \u00b7 [atlasbot](https://jenkins.bstein.dev/job/atlasbot/) \u00b7 [bstein-dev-home](https://jenkins.bstein.dev/job/bstein-dev-home/) \u00b7 [lesavka](https://jenkins.bstein.dev/job/lesavka/) \u00b7 [metis](https://jenkins.bstein.dev/job/metis/) \u00b7 [pegasus](https://jenkins.bstein.dev/job/pegasus/) \u00b7 [titan-iac](https://jenkins.bstein.dev/job/titan-iac/) \u00b7 [typhon](https://jenkins.bstein.dev/job/typhon/)" - } - }, { "id": 2, "type": "stat", @@ -38,14 +22,14 @@ data: "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, "x": 0, - "y": 4 + "y": 0 }, "targets": [ { - "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status=~\"ok|passed|success\"}[24h])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h])) or on() vector(0))), 1)", + "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[24h])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))), 1)", "refId": "A", "instant": true } @@ -65,15 +49,15 @@ data: }, { "color": "orange", - "value": 70 + "value": 80 }, { "color": "yellow", - "value": 85 + "value": 95 }, { "color": "green", - "value": 95 + "value": 99 } ] }, @@ -102,20 +86,20 @@ data: { "id": 3, "type": "stat", - "title": "Success Rate (7d)", + "title": "Success Rate (30d)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, "x": 4, - "y": 4 + "y": 0 }, "targets": [ { - "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status=~\"ok|passed|success\"}[7d])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[7d])) or on() vector(0))), 1)", + "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[30d])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) or on() vector(0))), 1)", "refId": "A", "instant": true } @@ -135,15 +119,15 @@ data: }, { "color": "orange", - "value": 70 + "value": 80 }, { "color": "yellow", - "value": 85 + "value": 95 }, { "color": "green", - "value": 95 + "value": 99 } ] }, @@ -172,90 +156,20 @@ data: { "id": 4, "type": "stat", - "title": "Success Rate (30d)", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 8, - "y": 4 - }, - "targets": [ - { - "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status=~\"ok|passed|success\"}[30d])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[30d])) or on() vector(0))), 1)", - "refId": "A", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 70 - }, - { - "color": "yellow", - "value": 85 - }, - { - "color": "green", - "value": 95 - } - ] - }, - "unit": "percent", - "custom": { - "displayMode": "auto" - }, - "decimals": 2 - }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - } - }, - { - "id": 5, - "type": "stat", "title": "Failures (24h)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, - "x": 12, - "y": 4 + "x": 8, + "y": 0 }, "targets": [ { - "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status!~\"ok|passed|success\"}[24h])) or on() vector(0))", + "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status!~\"ok|passed|success\"}[24h])) or on() vector(0))", "refId": "A", "instant": true } @@ -283,7 +197,7 @@ data: }, { "color": "red", - "value": 6 + "value": 5 } ] }, @@ -309,7 +223,7 @@ data: } }, { - "id": 6, + "id": 5, "type": "stat", "title": "Runs (24h)", "datasource": { @@ -317,14 +231,14 @@ data: "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, - "x": 16, - "y": 4 + "x": 12, + "y": 0 }, "targets": [ { - "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h])) or on() vector(0))", + "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))", "refId": "A", "instant": true } @@ -370,22 +284,22 @@ data: } }, { - "id": 7, + "id": 6, "type": "stat", - "title": "Suites Active (24h)", + "title": "Avg Coverage (%)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { - "h": 6, + "h": 5, "w": 4, - "x": 20, - "y": 4 + "x": 16, + "y": 0 }, "targets": [ { - "expr": "sum((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h])) > 0)) or on() vector(0)", + "expr": "(avg(((max by (suite) ({__name__=~\".*_quality_gate_coverage_percent\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})))) or on() vector(0))", "refId": "A", "instant": true } @@ -403,21 +317,650 @@ data: "color": "red", "value": null }, + { + "color": "orange", + "value": 80 + }, { "color": "yellow", - "value": 4 + "value": 95 }, { "color": "green", - "value": 8 + "value": 99 + } + ] + }, + "unit": "percent", + "custom": { + "displayMode": "auto" + }, + "decimals": 2 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 7, + "type": "stat", + "title": "Suites with LOC >500", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 0 + }, + "targets": [ + { + "expr": "(sum(((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) > bool 0)) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 } ] }, "unit": "none", "custom": { "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 19, + "type": "stat", + "title": "Failing Tests", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"tests|unit|build\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "decimals": 0 + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 20, + "type": "stat", + "title": "Failing Coverage", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 3, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"coverage\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 21, + "type": "stat", + "title": "Failing LOC", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 6, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"loc|smell\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 22, + "type": "stat", + "title": "Failing Docs/Naming", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 9, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"docs|naming|hygiene|lint|docs_naming\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 23, + "type": "stat", + "title": "Failing Gate/Glue", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 12, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"gate|glue|gate_glue\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 24, + "type": "stat", + "title": "Failing SonarQube", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 15, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"sonarqube|sonar\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 25, + "type": "stat", + "title": "Failing Supply Chain", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 18, + "y": 5 + }, + "targets": [ + { + "expr": "(sum(count by (suite) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",result!~\"ok|passed|success\"})) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 26, + "type": "stat", + "title": "Total Failing Checks", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 21, + "y": 5 + }, + "targets": [ + { + "expr": "(sum({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",result!~\"ok|passed|success\"}) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } }, "overrides": [] }, @@ -438,20 +981,20 @@ data: { "id": 8, "type": "bargauge", - "title": "Suite Scoreboard: Success Rate (24h)", + "title": "Failures by Suite (24h)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 8, - "w": 12, + "w": 8, "x": 0, - "y": 10 + "y": 9 }, "targets": [ { - "expr": "sort_desc((100 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status=~\"ok|passed|success\"}[24h]))) / clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h]))), 1)) and on(suite) ((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[24h]))) > 0))", + "expr": "sort_desc(sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status!~\"ok|passed|success\"}[24h])))", "refId": "A", "legendFormat": "{{suite}}", "instant": true @@ -459,31 +1002,30 @@ data: ], "fieldConfig": { "defaults": { - "unit": "percent", + "unit": "none", "min": 0, - "max": 100, + "max": null, "thresholds": { "mode": "absolute", "steps": [ { - "color": "red", + "color": "green", "value": null }, - { - "color": "orange", - "value": 70 - }, { "color": "yellow", - "value": 85 + "value": 1 }, { - "color": "green", - "value": 95 + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 } ] - }, - "decimals": 2 + } }, "overrides": [] }, @@ -513,20 +1055,20 @@ data: { "id": 9, "type": "bargauge", - "title": "Suite Scoreboard: Failures (24h)", + "title": "Success Rate by Suite (24h)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 10 + "w": 8, + "x": 8, + "y": 9 }, "targets": [ { - "expr": "sort_desc(sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\",status!~\"ok|passed|success\"}[24h])))", + "expr": "sort_desc(100 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[24h]))) / clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[24h]))), 1))", "refId": "A", "legendFormat": "{{suite}}", "instant": true @@ -534,9 +1076,84 @@ data: ], "fieldConfig": { "defaults": { - "unit": "none", + "unit": "percent", "min": 0, - "max": null, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 80 + }, + { + "color": "yellow", + "value": 95 + }, + { + "color": "green", + "value": 99 + } + ] + }, + "decimals": 2 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "asc" + } + } + ] + }, + { + "id": 10, + "type": "bargauge", + "title": "Coverage Gap to 95% by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 9 + }, + "targets": [ + { + "expr": "sort_desc(clamp_min(95 - ((max by (suite) ({__name__=~\".*_quality_gate_coverage_percent\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))), 0))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, "thresholds": { "mode": "absolute", "steps": [ @@ -550,15 +1167,15 @@ data: }, { "color": "orange", - "value": 3 + "value": 5 }, { "color": "red", - "value": 6 + "value": 10 } ] }, - "decimals": 0 + "decimals": 2 }, "overrides": [] }, @@ -583,12 +1200,13 @@ data: "order": "desc" } } - ] + ], + "description": "Gap from the 95% target. 0 means the suite is at or above target." }, { - "id": 10, + "id": 11, "type": "timeseries", - "title": "Suite Success History (1h points)", + "title": "Success History by Suite", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -597,63 +1215,13 @@ data: "h": 8, "w": 24, "x": 0, - "y": 18 + "y": 17 }, "targets": [ { + "expr": "(100 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[$__interval])) / clamp_min((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 1))) or on(suite) (0 * sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__range])))", "refId": "A", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"ariadne\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"ariadne\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"ariadne\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "ariadne" - }, - { - "refId": "B", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"metis\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"metis\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"metis\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "metis" - }, - { - "refId": "C", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"ananke\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"ananke\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"ananke\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "ananke" - }, - { - "refId": "D", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"atlasbot\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"atlasbot\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"atlasbot\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "atlasbot" - }, - { - "refId": "E", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"lesavka\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"lesavka\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"lesavka\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "lesavka" - }, - { - "refId": "F", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"pegasus\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"pegasus\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"pegasus\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "pegasus" - }, - { - "refId": "G", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"soteria\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"soteria\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"soteria\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "soteria" - }, - { - "refId": "H", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"titan-iac\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"titan-iac\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"titan-iac\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "titan-iac" - }, - { - "refId": "I", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"bstein-home\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"bstein-home\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"bstein-home\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "bstein-home" - }, - { - "refId": "J", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"arcanagon\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"arcanagon\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"arcanagon\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "arcanagon" - }, - { - "refId": "K", - "expr": "(100 * (sum(increase(platform_quality_gate_runs_total{suite=\"data-prepper\",status=~\"ok|passed|success\"}[1h]))) / clamp_min((sum(increase(platform_quality_gate_runs_total{suite=\"data-prepper\"}[1h]))), 1)) and on() ((sum(increase(platform_quality_gate_runs_total{suite=\"data-prepper\"}[1h]))) > 0) or on() vector(0)", - "legendFormat": "data-prepper" + "legendFormat": "{{suite}}" } ], "fieldConfig": { @@ -683,85 +1251,34 @@ data: } } }, - { - "id": 11, - "type": "table", - "title": "Suite Activity Matrix (30d)", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 26 - }, - "targets": [ - { - "expr": "sum by (suite, status) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper\"}[30d]))", - "refId": "A", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "unit": "none", - "custom": { - "filterable": true - } - }, - "overrides": [] - }, - "options": { - "showHeader": true, - "columnFilters": false - }, - "transformations": [ - { - "id": "labelsToFields", - "options": {} - }, - { - "id": "sortBy", - "options": { - "fields": [ - "Value" - ], - "order": "desc" - } - } - ], - "description": "Totals by suite and status over the last 30 days." - }, { "id": 12, "type": "timeseries", - "title": "Selected Suite Run Outcomes", + "title": "Run Outcomes (Selected Scope)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 8, - "w": 12, + "w": 8, "x": 0, - "y": 34 + "y": 25 }, "targets": [ { "refId": "A", - "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",status=~\"ok|passed|success\"}[$__interval])) or on() vector(0)", + "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"ok|passed|success\"}[$__interval])) or on() vector(0)", "legendFormat": "Success" }, { "refId": "B", - "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",status!~\"ok|passed|success\"}[$__interval])) or on() vector(0)", + "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status!~\"ok|passed|success\"}[$__interval])) or on() vector(0)", "legendFormat": "Failure" }, { "refId": "C", - "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\"}[$__interval])) or on() vector(0)", + "expr": "sum(increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])) or on() vector(0)", "legendFormat": "Total" } ], @@ -773,8 +1290,8 @@ data: }, "options": { "legend": { - "displayMode": "table", - "placement": "right", + "displayMode": "list", + "placement": "bottom", "calcs": [ "lastNotNull", "sum" @@ -783,32 +1300,31 @@ data: "tooltip": { "mode": "multi" } - }, - "description": "Use Suite Drilldown to isolate one project." + } }, { "id": 13, "type": "timeseries", - "title": "Selected Suite Hygiene & Coverage History", + "title": "Coverage & LOC History (Selected Scope)", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 34 + "w": 8, + "x": 8, + "y": 25 }, "targets": [ { "refId": "A", - "expr": "max_over_time(platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\"}[$__interval])", + "expr": "max_over_time(platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])", "legendFormat": "{{suite}} coverage %" }, { "refId": "B", - "expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\"}[$__interval])", + "expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])", "legendFormat": "{{suite}} files >500 LOC" } ], @@ -820,8 +1336,1601 @@ data: }, "options": { "legend": { - "displayMode": "table", - "placement": "right", + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 14, + "type": "piechart", + "title": "Run Status Mix (30d)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 25 + }, + "targets": [ + { + "expr": "sum by (status) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d]))", + "refId": "A", + "legendFormat": "{{status}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "color": { + "mode": "palette-classic" + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "right" + }, + "pieType": "pie", + "displayLabels": [], + "tooltip": { + "mode": "single" + }, + "colorScheme": "interpolateSpectral", + "colorBy": "value", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + } + }, + { + "id": 130, + "type": "timeseries", + "title": "Fail Trend: Tests", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 0, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"tests|unit|build\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 131, + "type": "timeseries", + "title": "Fail Trend: Coverage", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 3, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"coverage\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 132, + "type": "timeseries", + "title": "Fail Trend: LOC", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 6, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"loc|smell\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 133, + "type": "timeseries", + "title": "Fail Trend: Style", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 9, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 134, + "type": "timeseries", + "title": "Fail Trend: Gate Glue", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 12, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"gate|glue|gate_glue\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 135, + "type": "timeseries", + "title": "Fail Trend: SonarQube", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 15, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"sonarqube|sonar\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 136, + "type": "timeseries", + "title": "Fail Trend: Supply Chain", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 18, + "y": 33 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",result!~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 138, + "type": "timeseries", + "title": "Pass Trend: Tests", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 0, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"tests|unit|build\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 139, + "type": "timeseries", + "title": "Pass Trend: Coverage", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 3, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"coverage\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 140, + "type": "timeseries", + "title": "Pass Trend: LOC", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 6, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"loc|smell\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 141, + "type": "timeseries", + "title": "Pass Trend: Style", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 9, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 142, + "type": "timeseries", + "title": "Pass Trend: Gate Glue", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 12, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"gate|glue|gate_glue\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 143, + "type": "timeseries", + "title": "Pass Trend: SonarQube", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 15, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"sonarqube|sonar\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 144, + "type": "timeseries", + "title": "Pass Trend: Supply Chain", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 18, + "y": 39 + }, + "targets": [ + { + "expr": "(sum by (suite) (max_over_time(({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",result=~\"ok|passed|success\"})[$__interval]))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")))", + "refId": "A", + "legendFormat": "{{suite}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "calcs": [ + "lastNotNull", + "max" + ] + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 15, + "type": "bargauge", + "title": "Latest Test Counters (Suite + Result)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 21, + "y": 39 + }, + "targets": [ + { + "expr": "sort_desc(sum by (suite, result) ({__name__=~\".*_quality_gate_tests_total\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))", + "refId": "A", + "legendFormat": "{{suite}} \u00b7 {{result}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 50 + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + }, + { + "id": "limit", + "options": { + "limit": 24 + } + } + ] + }, + { + "id": 17, + "type": "bargauge", + "title": "Coverage by Suite (Latest, gate 95)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 45 + }, + "targets": [ + { + "expr": "sort(((max by (suite) ({__name__=~\".*_quality_gate_coverage_percent\",suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d]))) - 1))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 80 + }, + { + "color": "yellow", + "value": 95 + }, + { + "color": "green", + "value": 99 + } + ] + }, + "decimals": 2, + "mappings": [ + { + "type": "value", + "options": { + "-1": { + "text": "missing" + } + } + } + ] + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "asc" + } + } + ] + }, + { + "id": 18, + "type": "bargauge", + "title": "Files >500 LOC by Suite (Latest)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 45 + }, + "targets": [ + { + "expr": "sort_desc((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) (0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d]))) - 1))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "mappings": [ + { + "type": "value", + "options": { + "-1": { + "text": "missing" + } + } + } + ] + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 27, + "type": "bargauge", + "title": "Missing Tests Metrics by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 53 + }, + "targets": [ + { + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) ({__name__=~\".*_quality_gate_tests_total\",exported_job=\"platform-quality-ci\"})))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 28, + "type": "bargauge", + "title": "Missing Checks Metrics by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 53 + }, + "targets": [ + { + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) ({__name__=~\".*_quality_gate_checks_total\",exported_job=\"platform-quality-ci\"})))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 29, + "type": "bargauge", + "title": "Missing Coverage Metrics by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 53 + }, + "targets": [ + { + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_workspace_line_coverage_percent{exported_job=\"platform-quality-ci\"})))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 30, + "type": "bargauge", + "title": "Missing LOC Metrics by Suite", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 53 + }, + "targets": [ + { + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"})))", + "refId": "A", + "legendFormat": "{{suite}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 31, + "type": "stat", + "title": "SonarQube API Up", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 0, + "y": 60 + }, + "targets": [ + { + "expr": "(max(sonarqube_up) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 32, + "type": "stat", + "title": "Sonar Projects (Selected)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 4, + "y": 60 + }, + "targets": [ + { + "expr": "(count(sonarqube_project_quality_gate_pass{project_key=~\"${suite:regex}\"}) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 33, + "type": "stat", + "title": "Sonar Gate Fetch Errors", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 8, + "y": 60 + }, + "targets": [ + { + "expr": "(max(sonarqube_quality_gate_fetch_errors_total) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 34, + "type": "piechart", + "title": "Sonar Gate Status Mix (Selected)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 60 + }, + "targets": [ + { + "expr": "count by (status) (sonarqube_project_quality_gate_pass{project_key=~\"${suite:regex}\"})", + "refId": "A", + "legendFormat": "{{status}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "color": { + "mode": "palette-classic" + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "right" + }, + "pieType": "pie", + "displayLabels": [], + "tooltip": { + "mode": "single" + }, + "colorScheme": "interpolateSpectral", + "colorBy": "value", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + } + }, + { + "id": 35, + "type": "bargauge", + "title": "Projects Failing Sonar Gate", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 60 + }, + "targets": [ + { + "expr": "sort_desc(count by (project_key) (sonarqube_project_quality_gate_pass{project_key=~\"${suite:regex}\",status!~\"OK|ok\"}))", + "refId": "A", + "legendFormat": "{{project_key}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + } + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + } + ] + }, + { + "id": 145, + "type": "bargauge", + "title": "Problematic Tests (Failed at Least Once, 30d)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 66 + }, + "targets": [ + { + "expr": "sort_desc(topk(20, sort_desc(sum by (suite, test) (max_over_time(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",status=~\"failed|error\"}[30d])))))", + "refId": "A", + "legendFormat": "{{suite}} \u00b7 {{test}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "orange", + "value": 3 + }, + { + "color": "red", + "value": 5 + } + ] + } + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + }, + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": [ + "Value" + ], + "order": "desc" + } + }, + { + "id": "limit", + "options": { + "limit": 20 + } + } + ] + }, + { + "id": 146, + "type": "timeseries", + "title": "Selected Test Status History", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 66 + }, + "targets": [ + { + "expr": "sum by (suite, test, status) (max_over_time(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\",test=~\"${test:regex}\"}[$__interval]))", + "refId": "A", + "legendFormat": "{{suite}} \u00b7 {{test}} \u00b7 {{status}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", "calcs": [ "lastNotNull", "max" @@ -831,149 +2940,64 @@ data: "mode": "multi" } }, - "description": "Coverage and LOC hygiene trend for selected suite(s)." + "description": "Use the Test filter to inspect one test across time. Value 1 means that status was observed in an execution interval." }, { - "id": 14, - "type": "table", - "title": "Selected Suite Failure Mix (30d)", + "id": 147, + "type": "bargauge", + "title": "Missing Test-Case Metrics by Suite", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 42 - }, - "targets": [ - { - "expr": "sum by (suite, status) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",status!~\"ok|passed|success\"}[30d]))", - "refId": "A", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "unit": "none", - "custom": { - "filterable": true - } - }, - "overrides": [] - }, - "options": { - "showHeader": true, - "columnFilters": false - }, - "transformations": [ - { - "id": "labelsToFields", - "options": {} - }, - { - "id": "sortBy", - "options": { - "fields": [ - "Value" - ], - "order": "desc" - } - } - ], - "description": "Breakdown of non-success outcomes by status over 30 days." - }, - { - "id": 15, - "type": "table", - "title": "Selected Suite Latest Test Counters", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 42 - }, - "targets": [ - { - "expr": "sum by (suite, result, __name__) ({__name__=~\".*_quality_gate_tests_total\",suite=~\"${suite:regex}\"})", - "refId": "A", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "unit": "none", - "custom": { - "filterable": true - } - }, - "overrides": [] - }, - "options": { - "showHeader": true, - "columnFilters": false - }, - "transformations": [ - { - "id": "labelsToFields", - "options": {} - }, - { - "id": "sortBy", - "options": { - "fields": [ - "Value" - ], - "order": "desc" - } - } - ], - "description": "Latest per-suite counters (passed/failed/error/skipped/total) from each pipeline exporter." - }, - { - "id": 16, - "type": "table", - "title": "Selected Suite Check-Level Failures", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 8, + "h": 6, "w": 24, "x": 0, - "y": 50 + "y": 74 }, "targets": [ { - "expr": "sum by (suite, check, result, __name__) ({__name__=~\".*_quality_gate_checks_total\",suite=~\"${suite:regex}\",result!~\"ok|passed|success\"})", + "expr": "sort_desc(((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_test_case_result{exported_job=\"platform-quality-ci\"})))", "refId": "A", + "legendFormat": "{{suite}}", "instant": true } ], "fieldConfig": { "defaults": { "unit": "none", - "custom": { - "filterable": true - } + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "decimals": 0 }, "overrides": [] }, "options": { - "showHeader": true, - "columnFilters": false + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } }, "transformations": [ - { - "id": "labelsToFields", - "options": {} - }, { "id": "sortBy", "options": { @@ -983,8 +3007,7 @@ data: "order": "desc" } } - ], - "description": "Per-check failure details for suites that publish quality_gate_checks_total metrics." + ] } ], "time": { @@ -1008,7 +3031,7 @@ data: "name": "suite", "label": "Suite", "type": "custom", - "query": "ariadne,metis,ananke,atlasbot,lesavka,pegasus,soteria,titan-iac,bstein-home,arcanagon,data-prepper", + "query": "ariadne : ariadne,metis : metis,ananke : ananke,atlasbot : atlasbot,pegasus : pegasus|pegasus-health|pegasus_health,soteria : soteria,titan_iac : titan_iac|titan-iac,bstein_home : bstein_home|bstein-home,data_prepper : data_prepper|data-prepper", "current": { "text": "All", "value": "$__all", @@ -1035,14 +3058,9 @@ data: "value": "atlasbot", "selected": false }, - { - "text": "lesavka", - "value": "lesavka", - "selected": false - }, { "text": "pegasus", - "value": "pegasus", + "value": "pegasus|pegasus-health|pegasus_health", "selected": false }, { @@ -1051,33 +3069,54 @@ data: "selected": false }, { - "text": "titan-iac", - "value": "titan-iac", + "text": "titan_iac", + "value": "titan_iac|titan-iac", "selected": false }, { - "text": "bstein-home", - "value": "bstein-home", + "text": "bstein_home", + "value": "bstein_home|bstein-home", "selected": false }, { - "text": "arcanagon", - "value": "arcanagon", - "selected": false - }, - { - "text": "data-prepper", - "value": "data-prepper", + "text": "data_prepper", + "value": "data_prepper|data-prepper", "selected": false } ], "hide": 0, "multi": false, "includeAll": true, - "allValue": "ariadne|metis|ananke|atlasbot|lesavka|pegasus|soteria|titan-iac|bstein-home|arcanagon|data-prepper", + "allValue": "ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper", "refresh": 1, "sort": 1, "skipUrlSync": false + }, + { + "name": "test", + "label": "Test", + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "refresh": 1, + "definition": "label_values(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}, test)", + "query": { + "query": "label_values(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}, test)", + "refId": "PrometheusVariableQueryEditor-Test" + }, + "current": { + "text": "All", + "value": "$__all", + "selected": true + }, + "multi": false, + "includeAll": true, + "allValue": ".*", + "sort": 1, + "hide": 0, + "skipUrlSync": false } ] } diff --git a/testing/tests/test_publish_test_metrics.py b/testing/tests/test_publish_test_metrics.py index 4263a018..c0c29677 100644 --- a/testing/tests/test_publish_test_metrics.py +++ b/testing/tests/test_publish_test_metrics.py @@ -40,6 +40,27 @@ def test_collect_junit_totals_sums_multiple_files(tmp_path: Path): assert totals == {"tests": 5, "failures": 1, "errors": 1, "skipped": 1} +def test_collect_junit_cases_tracks_individual_statuses(tmp_path: Path): + junit = tmp_path / "junit.xml" + junit.write_text( + ( + "" + '' + '' + '' + '' + "" + ), + encoding="utf-8", + ) + + cases = publish_test_metrics._collect_junit_cases(str(tmp_path / "junit*.xml")) + assert ("pkg.mod::test_ok", "passed") in cases + assert ("pkg.mod::test_fail", "failed") in cases + assert ("pkg.mod::test_error", "error") in cases + assert ("pkg.mod::test_skip", "skipped") in cases + + def test_parse_junit_handles_testsuites_and_invalid_counts(tmp_path: Path): junit_path = tmp_path / "suite.xml" junit_path.write_text( @@ -171,6 +192,7 @@ def test_build_payload_includes_summary_metrics(): suite="titan-iac", status="ok", tests={"tests": 4, "failures": 1, "errors": 0, "skipped": 1}, + test_cases=[("pkg.mod::test_ok", "passed"), ("pkg.mod::test_fail", "failed")], ok_count=7, failed_count=2, branch="main", @@ -190,6 +212,7 @@ def test_build_payload_includes_summary_metrics(): assert 'titan_iac_quality_gate_checks_total{suite="titan-iac",check="unit",result="failed"} 1' in payload assert 'platform_quality_gate_workspace_line_coverage_percent{suite="titan-iac"} 97.125' in payload assert 'platform_quality_gate_source_lines_over_500_total{suite="titan-iac"} 3' in payload + assert 'platform_quality_gate_test_case_result{suite="titan-iac",test="pkg.mod::test_fail",status="failed"} 1' in payload def test_build_payload_skips_incomplete_results(): @@ -197,6 +220,7 @@ def test_build_payload_skips_incomplete_results(): suite="titan-iac", status="failed", tests={"tests": 0, "failures": 0, "errors": 0, "skipped": 0}, + test_cases=[], ok_count=1, failed_count=2, branch="",