monitoring: publish atlas testing dashboard
This commit is contained in:
parent
b6c921b291
commit
8fb5831e00
@ -34,6 +34,7 @@ data:
|
||||
|
||||
PROM_DS = {"type": "prometheus", "uid": "atlas-vm"}
|
||||
PUBLIC_FOLDER = "overview"
|
||||
PUBLIC_DASHBOARD_FOLDER = "atlas-public"
|
||||
PRIVATE_FOLDER = "atlas-internal"
|
||||
ASTRAIOS_MOUNTPOINT = "/mnt/astraios"
|
||||
GLOBAL_STATUS_COLOR_TONES = {
|
||||
@ -1515,6 +1516,7 @@ DASHBOARD_LINK_TITLES = {
|
||||
"atlas-network": "Open Atlas Network",
|
||||
"atlas-mail": "Open Atlas Mail",
|
||||
"atlas-jobs": "Open Atlas Testing",
|
||||
"atlas-testing": "Open Atlas Testing",
|
||||
"atlas-power": "Open Atlas Power",
|
||||
"atlas-gitops": "Open Atlas GitOps",
|
||||
"atlas-gpu": "Open Atlas GPU",
|
||||
@ -2574,7 +2576,7 @@ def build_overview():
|
||||
},
|
||||
"time": {"from": "now-1h", "to": "now"},
|
||||
"refresh": "1m",
|
||||
"links": [],
|
||||
"links": link_to("atlas-testing"),
|
||||
}
|
||||
|
||||
|
||||
@ -4333,6 +4335,8 @@ def build_jobs_dashboard():
|
||||
def build_testing_dashboard():
|
||||
dashboard = build_jobs_dashboard()
|
||||
dashboard["uid"] = "atlas-testing"
|
||||
dashboard["folderUid"] = PUBLIC_DASHBOARD_FOLDER
|
||||
dashboard["editable"] = False
|
||||
return dashboard
|
||||
|
||||
|
||||
|
||||
@ -67,6 +67,9 @@ def test_overview_uses_readable_quality_power_and_gitops_panels():
|
||||
dashboard = mod.build_overview()
|
||||
panels_by_title = {panel["title"]: panel for panel in flatten_panels(dashboard["panels"])}
|
||||
|
||||
assert dashboard["links"] == [
|
||||
{"title": "Open Atlas Testing", "url": "/d/atlas-testing", "targetBlank": True}
|
||||
]
|
||||
assert "Platform Test Success Rate" not in panels_by_title
|
||||
assert panels_by_title["Gate Checks Passing by Suite"]["type"] == "bargauge"
|
||||
assert panels_by_title["Gate Checks Passing by Suite"]["options"]["displayMode"] == "basic"
|
||||
@ -110,6 +113,18 @@ def test_testing_suite_variable_uses_canonical_values_only():
|
||||
assert [option["value"] for option in variable["options"]] == mod.PLATFORM_TEST_SUITE_NAMES
|
||||
|
||||
|
||||
def test_testing_dashboard_is_public_but_jobs_dashboard_remains_internal():
|
||||
mod = load_module()
|
||||
jobs = mod.build_jobs_dashboard()
|
||||
testing = mod.build_testing_dashboard()
|
||||
|
||||
assert jobs["folderUid"] == mod.PRIVATE_FOLDER
|
||||
assert jobs["editable"] is True
|
||||
assert testing["uid"] == "atlas-testing"
|
||||
assert testing["folderUid"] == mod.PUBLIC_DASHBOARD_FOLDER
|
||||
assert testing["editable"] is False
|
||||
|
||||
|
||||
def test_jobs_dashboard_separates_current_gate_health_from_reliability():
|
||||
mod = load_module()
|
||||
dashboard = mod.build_jobs_dashboard()
|
||||
|
||||
@ -3950,5 +3950,11 @@
|
||||
"to": "now"
|
||||
},
|
||||
"refresh": "1m",
|
||||
"links": []
|
||||
"links": [
|
||||
{
|
||||
"title": "Open Atlas Testing",
|
||||
"url": "/d/atlas-testing",
|
||||
"targetBlank": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
"uid": "atlas-testing",
|
||||
"title": "Atlas Testing",
|
||||
"folderUid": "atlas-internal",
|
||||
"editable": true,
|
||||
"folderUid": "atlas-public",
|
||||
"editable": false,
|
||||
"panels": [
|
||||
{
|
||||
"id": 2,
|
||||
|
||||
@ -3959,5 +3959,11 @@ data:
|
||||
"to": "now"
|
||||
},
|
||||
"refresh": "1m",
|
||||
"links": []
|
||||
"links": [
|
||||
{
|
||||
"title": "Open Atlas Testing",
|
||||
"url": "/d/atlas-testing",
|
||||
"targetBlank": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -10,8 +10,8 @@ data:
|
||||
{
|
||||
"uid": "atlas-testing",
|
||||
"title": "Atlas Testing",
|
||||
"folderUid": "atlas-internal",
|
||||
"editable": true,
|
||||
"folderUid": "atlas-public",
|
||||
"editable": false,
|
||||
"panels": [
|
||||
{
|
||||
"id": 2,
|
||||
|
||||
@ -19,6 +19,15 @@ data:
|
||||
permission: Edit
|
||||
- role: Admin
|
||||
permission: Admin
|
||||
- uid: atlas-public
|
||||
title: Atlas Public
|
||||
permissions:
|
||||
- role: Viewer
|
||||
permission: View
|
||||
- role: Editor
|
||||
permission: Edit
|
||||
- role: Admin
|
||||
permission: Admin
|
||||
- uid: atlas-internal
|
||||
title: Atlas Internal
|
||||
permissions:
|
||||
|
||||
@ -517,13 +517,22 @@ spec:
|
||||
path: /var/lib/grafana/dashboards/jobs
|
||||
- name: testing
|
||||
orgId: 1
|
||||
folder: Atlas Internal
|
||||
folder: Atlas Public
|
||||
type: file
|
||||
disableDeletion: false
|
||||
editable: true
|
||||
editable: false
|
||||
updateIntervalSeconds: 10
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards/testing
|
||||
- name: testing-public
|
||||
orgId: 2
|
||||
folder: Atlas Public
|
||||
type: file
|
||||
disableDeletion: false
|
||||
editable: false
|
||||
updateIntervalSeconds: 10
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards/testing-public
|
||||
- name: power
|
||||
orgId: 1
|
||||
folder: Atlas Internal
|
||||
@ -544,6 +553,7 @@ spec:
|
||||
mail: grafana-dashboard-mail
|
||||
jobs: grafana-dashboard-jobs
|
||||
testing: grafana-dashboard-testing
|
||||
testing-public: grafana-dashboard-testing
|
||||
power: grafana-dashboard-power
|
||||
extraConfigmapMounts:
|
||||
- name: grafana-folders
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user