diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index f66f0826..4c7602ba 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -4039,38 +4039,34 @@ def build_jobs_dashboard(): check_regex_supply_chain = "ironbank|supply_chain|image_compliance|artifact_security" def _check_state_percent_series(regex: str, failed: bool) -> str: - check_matcher = f'check=~"{regex}"' - family_vector = _latest_check_flags(check_matcher) - state_vector = ( - _latest_check_flags(check_matcher, f'status!~"{non_failure}"') + family_vector = ( + f'platform_quality:check_seen_flag:present_1h{{suite=~"{suite_var}",' + f'branch!="",branch=~"{branch_var}",check=~"{regex}"}}' + ) + state_metric = ( + "platform_quality:check_failed_flag:present_1h" if failed - else _latest_healthy_check_flags(check_matcher) + else "platform_quality:check_healthy_flag:present_1h" ) - state_checks = ( - f'sum by (suite) ({state_vector})' - ) - total_checks = ( - f'sum by (suite) ({family_vector})' + state_vector = ( + f'{state_metric}{{suite=~"{suite_var}",branch!="",' + f'branch=~"{branch_var}",check=~"{regex}"}}' ) + state_checks = f"sum by (suite) ({state_vector})" + total_checks = f"sum by (suite) ({family_vector})" state_percent = f"(100 * ({state_checks}) / clamp_min(({total_checks}), 1))" return f"(({state_percent}) or on(suite) ({selected_suite_zero}))" rollup_failed_tests = ( f'sum by (suite, test) (platform_quality:test_case_status:count_1h{{suite=~"{suite_var}",branch!="",branch=~"{branch_var}",test!="",test!="__no_test_cases__",status="failed"}})' ) - raw_failed_tests = ( - f'sum by (suite, test) (max_over_time(platform_quality_gate_test_case_result{{suite=~"{suite_var}",branch!="",branch=~"{branch_var}",test!="",test!="__no_test_cases__",{exported},status="failed"}}[$__interval]))' - ) - problematic_tests_history_core = f"topk(12, (({rollup_failed_tests}) or on(suite, test) ({raw_failed_tests})))" + problematic_tests_history_core = f"topk(12, ({rollup_failed_tests}))" problematic_tests_history = problematic_tests_history_core rollup_failed_tests_30d = ( f'sum by (suite, test) (sum_over_time(platform_quality:test_case_status:count_1h{{suite=~"{suite_var}",branch!="",branch=~"{branch_var}",test!="",test!="__no_test_cases__",status="failed"}}[30d:1h]))' ) - raw_failed_tests_30d = ( - f'sum by (suite, test) (increase(platform_quality_gate_test_case_result{{suite=~"{suite_var}",branch!="",branch=~"{branch_var}",test!="",test!="__no_test_cases__",{exported},status="failed"}}[30d]))' - ) worst_test_per_suite_core = ( - f"topk by (suite) (1, (({rollup_failed_tests_30d}) or on(suite, test) ({raw_failed_tests_30d})))" + f"topk by (suite) (1, ({rollup_failed_tests_30d}))" ) worst_test_per_suite = worst_test_per_suite_core diff --git a/scripts/tests/test_dashboards_render_atlas.py b/scripts/tests/test_dashboards_render_atlas.py index dbfba22e..18df7f67 100644 --- a/scripts/tests/test_dashboards_render_atlas.py +++ b/scripts/tests/test_dashboards_render_atlas.py @@ -288,6 +288,19 @@ def test_jobs_dashboard_separates_current_gate_health_from_reliability(): assert "Use the Suite filter" in category_panel["description"] assert "skipped tests are healthy" in category_panel["description"] + tests_failure_expr = panels_by_title["Tests Failure Rate"]["targets"][0]["expr"] + assert "platform_quality:check_failed_flag:present_1h" in tests_failure_expr + assert "platform_quality:check_seen_flag:present_1h" in tests_failure_expr + assert "platform_quality:check_status:present_1h" not in tests_failure_expr + + tests_healthy_expr = panels_by_title["Tests Healthy Rate"]["targets"][0]["expr"] + assert "platform_quality:check_healthy_flag:present_1h" in tests_healthy_expr + assert "platform_quality:check_seen_flag:present_1h" in tests_healthy_expr + + problematic_expr = panels_by_title["Problematic Tests Over Time (Top failures)"]["targets"][0]["expr"] + assert "platform_quality:test_case_status:count_1h" in problematic_expr + assert "platform_quality_gate_test_case_result" not in problematic_expr + coverage_panel = panels_by_title["Coverage History by Suite"] loc_panel = panels_by_title["Files <=500 LOC History by Suite"] assert coverage_panel["type"] == "state-timeline" @@ -373,11 +386,12 @@ def test_jobs_dashboard_collapses_heavy_drilldowns_for_light_first_paint(): assert failure_rate_panel["fieldConfig"]["defaults"]["max"] == 100 assert failure_rate_panel["fieldConfig"]["defaults"]["thresholds"]["steps"][0]["color"] == "dark-blue" assert "increase(" not in failure_rate_panel["targets"][0]["expr"] - assert "platform_quality:check_status:present_1h" in failure_rate_panel["targets"][0]["expr"] + assert "platform_quality:check_failed_flag:present_1h" in failure_rate_panel["targets"][0]["expr"] + assert "platform_quality:check_seen_flag:present_1h" in failure_rate_panel["targets"][0]["expr"] + assert "platform_quality:check_status:present_1h" not in failure_rate_panel["targets"][0]["expr"] assert '.*_quality_gate_checks_total' not in failure_rate_panel["targets"][0]["expr"] assert "last_over_time" not in failure_rate_panel["targets"][0]["expr"] assert 'label_replace' not in failure_rate_panel["targets"][0]["expr"] - assert 'status!~"ok|passed|success|not_applicable|skipped|na|n/a"' in failure_rate_panel["targets"][0]["expr"] assert "0 *" in failure_rate_panel["targets"][0]["expr"] assert "and on(suite)" not in failure_rate_panel["targets"][0]["expr"] diff --git a/services/monitoring/dashboards/atlas-testing.json b/services/monitoring/dashboards/atlas-testing.json index b5e8dd12..56b70331 100644 --- a/services/monitoring/dashboards/atlas-testing.json +++ b/services/monitoring/dashboards/atlas-testing.json @@ -1492,7 +1492,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1571,7 +1571,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1650,7 +1650,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1729,7 +1729,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1808,7 +1808,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1887,7 +1887,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1966,7 +1966,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2060,7 +2060,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2139,7 +2139,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2218,7 +2218,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2297,7 +2297,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2376,7 +2376,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2455,7 +2455,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2534,7 +2534,7 @@ }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2628,7 +2628,7 @@ }, "targets": [ { - "expr": "topk(12, ((sum by (suite, test) (platform_quality:test_case_status:count_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",status=\"failed\"})) or on(suite, test) (sum by (suite, test) (max_over_time(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",exported_job=\"platform-quality-ci\",status=\"failed\"}[$__interval])))))", + "expr": "topk(12, (sum by (suite, test) (platform_quality:test_case_status:count_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",status=\"failed\"})))", "refId": "A", "legendFormat": "{{suite}} - {{test}}", "format": "time_series", @@ -2834,7 +2834,7 @@ }, "targets": [ { - "expr": "sort_desc(topk by (suite) (1, ((sum by (suite, test) (sum_over_time(platform_quality:test_case_status:count_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",status=\"failed\"}[30d:1h]))) or on(suite, test) (sum by (suite, test) (increase(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",exported_job=\"platform-quality-ci\",status=\"failed\"}[30d]))))))", + "expr": "sort_desc(topk by (suite) (1, (sum by (suite, test) (sum_over_time(platform_quality:test_case_status:count_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",status=\"failed\"}[30d:1h])))))", "refId": "A", "legendFormat": "{{suite}} \u00b7 {{test}}", "instant": true diff --git a/services/monitoring/grafana-dashboard-testing.yaml b/services/monitoring/grafana-dashboard-testing.yaml index 0c73463b..acb39156 100644 --- a/services/monitoring/grafana-dashboard-testing.yaml +++ b/services/monitoring/grafana-dashboard-testing.yaml @@ -1501,7 +1501,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1580,7 +1580,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1659,7 +1659,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1738,7 +1738,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1817,7 +1817,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1896,7 +1896,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -1975,7 +1975,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_failed_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2069,7 +2069,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"tests|unit|build\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2148,7 +2148,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"coverage\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2227,7 +2227,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"loc|smell\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2306,7 +2306,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"docs|naming|hygiene|lint|docs_naming|style\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2385,7 +2385,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"gate|glue|gate_glue\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2464,7 +2464,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"sonarqube|sonar\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2543,7 +2543,7 @@ data: }, "targets": [ { - "expr": "(((100 * (sum by (suite) (((clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status=~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1)) unless on(suite, check) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status!~\"ok|passed|success|not_applicable|skipped|na|n/a\"})) > 0), 1))))) / clamp_min((sum by (suite) (clamp_max(max by (suite, check) ((sum by (suite, branch, check, status) (platform_quality:check_status:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\",status!=\"\"})) > 0), 1))), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", + "expr": "(((100 * (sum by (suite) (platform_quality:check_healthy_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\"})) / clamp_min((sum by (suite) (platform_quality:check_seen_flag:present_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",check=~\"ironbank|supply_chain|image_compliance|artifact_security\"})), 1))) or on(suite) ((0 * ((count by (suite) (platform_quality_gate_build_info{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",exported_job=\"platform-quality-ci\"}) >= bool 0) or (count by (suite) (max_over_time(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))))", "refId": "A", "legendFormat": "{{suite}}", "format": "time_series", @@ -2637,7 +2637,7 @@ data: }, "targets": [ { - "expr": "topk(12, ((sum by (suite, test) (platform_quality:test_case_status:count_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",status=\"failed\"})) or on(suite, test) (sum by (suite, test) (max_over_time(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",exported_job=\"platform-quality-ci\",status=\"failed\"}[$__interval])))))", + "expr": "topk(12, (sum by (suite, test) (platform_quality:test_case_status:count_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",status=\"failed\"})))", "refId": "A", "legendFormat": "{{suite}} - {{test}}", "format": "time_series", @@ -2843,7 +2843,7 @@ data: }, "targets": [ { - "expr": "sort_desc(topk by (suite) (1, ((sum by (suite, test) (sum_over_time(platform_quality:test_case_status:count_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",status=\"failed\"}[30d:1h]))) or on(suite, test) (sum by (suite, test) (increase(platform_quality_gate_test_case_result{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",exported_job=\"platform-quality-ci\",status=\"failed\"}[30d]))))))", + "expr": "sort_desc(topk by (suite) (1, (sum by (suite, test) (sum_over_time(platform_quality:test_case_status:count_1h{suite=~\"${suite:regex}\",branch!=\"\",branch=~\"${branch:regex}\",test!=\"\",test!=\"__no_test_cases__\",status=\"failed\"}[30d:1h])))))", "refId": "A", "legendFormat": "{{suite}} \u00b7 {{test}}", "instant": true diff --git a/services/monitoring/vmalert-atlas-availability.yaml b/services/monitoring/vmalert-atlas-availability.yaml index bd421467..4cd1bbb5 100644 --- a/services/monitoring/vmalert-atlas-availability.yaml +++ b/services/monitoring/vmalert-atlas-availability.yaml @@ -295,6 +295,44 @@ data: ) labels: rollup: hourly + - record: platform_quality:check_seen_flag:present_1h + expr: | + clamp_max( + max by (suite, branch, check) ( + platform_quality:check_status:present_1h{suite!="",branch!="",check!="",status!=""} > 0 + ), + 1 + ) + labels: + rollup: hourly + - record: platform_quality:check_failed_flag:present_1h + expr: | + clamp_max( + max by (suite, branch, check) ( + platform_quality:check_status:present_1h{suite!="",branch!="",check!="",status!~"ok|passed|success|not_applicable|skipped|na|n/a"} > 0 + ), + 1 + ) + or on (suite, branch, check) + (0 * platform_quality:check_seen_flag:present_1h{suite!="",branch!="",check!=""}) + labels: + rollup: hourly + - record: platform_quality:check_healthy_flag:present_1h + expr: | + ( + clamp_max( + max by (suite, branch, check) ( + platform_quality:check_status:present_1h{suite!="",branch!="",check!="",status=~"ok|passed|success|not_applicable|skipped|na|n/a"} > 0 + ), + 1 + ) + unless on (suite, branch, check) + (platform_quality:check_failed_flag:present_1h{suite!="",branch!="",check!=""} > 0) + ) + or on (suite, branch, check) + (0 * platform_quality:check_seen_flag:present_1h{suite!="",branch!="",check!=""}) + labels: + rollup: hourly --- @@ -324,7 +362,7 @@ spec: labels: app: vmalert-atlas-availability annotations: - bstein.dev/rules-revision: "2026-05-20-platform-quality-latest-rollups" + bstein.dev/rules-revision: "2026-05-20-platform-quality-dashboard-rollups" spec: serviceAccountName: vmalert-atlas-availability affinity: