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