Repository navigation
Description
Update 2026-11-26 (infra move): the Grafana side goes to dan-petty/homelab.
- The plugin, the datasource, the token mount,
services.tomland the built dashboards are there (follow-up issue). - This issue keeps the builder changes in
src/devops_cli/grafana/, their tests, and panels of product dashboards ink8s/devops/dashboards/. - Read
k8s/monitoring/...below as a homelab path.
Follow-up: dan-petty/homelab#267.
Problem or Motivation
Two panels of the pipeline dashboard are lists, not time series: the runs in flight and the claims. Prometheus cannot hold them without an issue-number label, which #3851 forbids. The read API of the roadmap Service serves both lists.
Proposed Solution & Architectural Design
k8s/monitoring/grafana-values.yamlof dan-petty/homelab (follow-up issue):yesoreyeram-infinity-datasource@<version>inplugins(the newest release that fixes the known security and bug issues and that the Grafana version supports; no minimum release age; Renovate updates it).- The datasource with
allowedHostsset to the in-cluster Service URL of the roadmap Service only, and the read tokengrafanafrom a Secret throughsecureJsonData. - The runs panel reads
GET /api/v1/roadmap/runs?phase=Running(Root selectorruns); the claims panel readsGET /api/v1/roadmap/claims(Root selectorclaims). The item number is a link to GitHub. - The Grafana token is read-only. Grafana gives anonymous viewers what its token reads (Infinity allows GET and POST, and
allowedHostslimits hosts, not paths), so the lists are readable with no login from the home address. The owner decides whether item titles may show there.
Target Subsystem
Kubernetes & Minikube Automation (monitoring: k8s/monitoring/).
Existing Tool Considered
The Infinity datasource, maintained by Grafana Labs (configuration of an open tool, no build). Cost: about 100,000 tokens and 1.5 hours, about 3,000 tokens a month to keep. One Grafana restart of about 1 minute.
Acceptance Criteria
- Grafana starts with the plugin at the pinned version.
- The datasource refuses a URL outside
allowedHosts. - The two panels show the API lists through the Root selector, with the item number as a link to GitHub.
- No token value is in the repository or in the dashboard JSON.
- A test checks that each Infinity panel uses the provisioned datasource uid, an allowed host and a path of the API OpenAPI document.
Dependencies
- feat(roadmap): a dashboard and alerts for the pipeline #3655 (the pipeline dashboard).
- "feat(service): serve a read-only roadmap API with OpenAPI".
- "feat(roadmap): keep a record of each roadmap run".
- Person step: run
uv run devops k8s push-secretsafter the merge (it generates thegrafanaread token). Owner decision 2026-11-11: item titles of private repositories may show in Grafana.
Source: #4517
Alternatives check of 2026-11-29: covers.
Tool: grafana/grafana-infinity-datasource (https://github.com/grafana/grafana-infinity-datasource), Apache-2.0, last activity 2026-11-28, maintained.
Reason: Searches returned nothing useful, but the facts of grafana/grafana-infinity-datasource confirm an open, maintained plugin that reads a JSON HTTP API with a root selector, an allowedHosts list and a token; the issue already adopts it.
Covers:
- Table panels from a JSON HTTP endpoint with a root selector
- Host allowlist through allowedHosts and a token through secureJsonData
- Data links on a column to the GitHub issue URL
- Ships as a Grafana plugin at a pinned release
Lacks:
- Builder and linter support for Infinity targets in devops-cli
- Check of each panel path against the Service OpenAPI document
- Plugin, datasource and token mount (homelab follow-up)
- Generation of the read-only grafana token
Proposed design
Problem statement
The pipeline dashboard needs two list panels, the runs in flight and the claims. Prometheus cannot hold them without an issue-number label, which #3851 forbids. The roadmap Service read API (ADR 0029) serves both lists, and Grafana reads them through the Infinity datasource. This issue keeps the builder changes in src/devops_cli/grafana/, their tests and the panels of the Roadmap Service product dashboard in k8s/devops/dashboards/. The plugin, the datasource, the token mount, services.toml and the built Service dashboard are in dan-petty/homelab#267.
Acceptance criteria
Requirement: Roadmap API list panel in the spec
ServiceSpec SHALL accept an optional API host and a roadmap API list panel with a title, a path, a root selector and an item number field.
Scenario: A valid API list panel validates
- WHEN
uv run pytest tests/grafana/test_service_dashboard.py -k api_listruns. - THEN The test passes and asserts the API host, the title, the path, the root selector and the item number field of the panel.
Requirement: API host from the spec
The service dashboard builder SHALL set the URL host of each API list panel from the API host of ServiceSpec.
Scenario: The builder uses the spec host
- WHEN
uv run pytest tests/grafana/test_service_dashboard.py -k api_hostruns withexample.comas the API host of the spec. - THEN The test passes and asserts that each API list panel URL starts with
example.comand ends with the panel path.
Requirement: Runs panel
The service dashboard builder SHALL render a table panel from GET /api/v1/roadmap/runs?phase=Running with the datasource uid infinity and the root selector runs.
Scenario: The builder renders the runs table
- WHEN
uv run pytest tests/grafana/test_service_dashboard.py -k runs_panelruns. - THEN The test passes and asserts the datasource uid
infinity, the path/api/v1/roadmap/runs?phase=Runningand the root selectorruns.
Requirement: Claims panel
The service dashboard builder SHALL render a table panel from GET /api/v1/roadmap/claims with the datasource uid infinity and the root selector claims.
Scenario: The builder renders the claims table
- WHEN
uv run pytest tests/grafana/test_service_dashboard.py -k claims_panelruns. - THEN The test passes and asserts the datasource uid
infinity, the path/api/v1/roadmap/claimsand the root selectorclaims.
Requirement: Item number link
The service dashboard builder SHALL render the item number column of each API list panel as a data link to the GitHub issue URL.
Scenario: The item number column links to GitHub
- WHEN
uv run pytest tests/grafana/test_service_dashboard.py -k item_number_linkruns. - THEN The test passes and asserts that the data link URL starts with
https://github.com/and ends with the item number field.
Requirement: Panel API contract
The service dashboard test SHALL report a panel whose datasource uid is not infinity, whose host is not the API host of the spec, or whose path the OpenAPI schema of the roadmap Service does not list.
Scenario: A panel outside the API contract is reported
- WHEN
uv run pytest tests/grafana/test_service_dashboard.py -k api_contractruns with a spec whose panel breaks one of the three rules. - THEN The test passes and the report names the panel and the value that breaks the rule.
Requirement: Builder output
The service dashboard builder SHALL write <uid>.json next to the spec file for a spec with the two API list panels.
Scenario: The build writes the API list panels
- WHEN
uv run pytest tests/grafana/test_service_dashboard.py -k api_lists_writeruns on a spec in a temporary folder. - THEN The test passes and asserts that the written file holds the runs panel and the claims panel.
Requirement: Infinity target in the linter
The dashboard linter SHALL accept an Infinity target with a URL and a root selector, and SHALL report a target with no URL.
Scenario: The linter reads an Infinity target
- WHEN
uv run pytest tests/grafana/test_grafana_dashboards.py -k infinity_targetruns. - THEN The test passes and asserts no issue for the valid target and one issue that names the panel for the target with no URL.
Requirement: Product dashboard panels
The Roadmap Service product dashboard k8s/devops/dashboards/roadmap-service-telemetry.json SHALL hold the runs panel and the claims panel with the infinity datasource and the in-cluster Service URL.
Scenario: The product dashboard lints with the Infinity panels
- WHEN
uv run devops grafana dashboards lint k8s/devops/dashboards/roadmap-service-telemetry.jsonruns. - THEN The command exits 0 and reports no error.
Requirement: No literal token
The repository MUST hold no literal value of the grafana read token.
Scenario: The secret scan finds no token
- WHEN
uv run devops scan secrets .runs on the change. - THEN The command reports no secret and exits 0.
Existing Tool Considered
grafana/grafana-infinity-datasource (https://github.com/grafana/grafana-infinity-datasource), Apache-2.0, maintained, last activity 2026-11-28. The alternatives block of 2026-11-29 in the issue body gives the verdict covers, and its Lacks: list states what the tool lacks. This issue adds no datasource code and no build cost: dan-petty/homelab#267 holds the plugin, the datasource, the token mount and the token generation.
Key questions
- Which open, maintained tool covers the need, and may the item adopt it?: Adopt
grafana/grafana-infinity-datasource. The alternatives check of 2026-11-29 gives the verdictcovers, and ADR 0029 already names the Infinity datasource as the Grafana reader of the API. AGENTS.md rule 3 puts an open tool before code that the project builds, and this issue adds no datasource code. (best practice) [sources: docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:62, AGENTS.md:9]- Chosen: Adopt grafana/grafana-infinity-datasource. The check records
covers, ADR 0029 names Infinity as the Grafana reader, and AGENTS.md rule 3 puts an open tool first. - Rejected: Keep the item with a written reason. The tool is in use and covers the need, so a reason to keep leaves the two lists with no reader.
- Rejected: Build a custom datasource. It duplicates a maintained tool and adds build and keep cost.
- Chosen: Adopt grafana/grafana-infinity-datasource. The check records
- The alternatives check found that grafana/grafana-infinity-datasource covers this item: adopt the tool, or keep the item and give the reason?: Adopt the tool. The verdict is
covers, ADR 0029:62 names the Infinity datasource as the reader, and the issue body already adopts it, so no reason to keep the item stands. (best practice) [sources: docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:62]- Chosen: Adopt the tool. The check returns
covers, and the project record already names the tool as the reader. - Rejected: Keep the item and give the reason. No reason stands against an open, maintained tool that the project record adopts.
- Chosen: Adopt the tool. The check returns
- What does this issue keep after the Grafana side moves to dan-petty/homelab?: The builder in
src/devops_cli/grafana/, its tests, and the panels of the Roadmap Service product dashboard ink8s/devops/dashboards/. The plugin, the datasource, the token mount,services.tomland the built Service dashboard are indan-petty/homelab#267. (best practice) [sources: k8s/README.md:527, k8s/devops/dashboards/kustomization.yaml:1, docs/DESIGN.md:258]- Chosen: Keep the builder, its tests and the product dashboard panels in devops-cli.
k8s/devops/dashboards/kustomization.yaml:1states that the product dashboards are product content and stay in devops-cli,k8s/README.md:527puts the environment tree in dan-petty/homelab, and the builder is a product module. - Rejected: Move the builder and its tests to dan-petty/homelab. The builder is a product module of devops-cli, and dan-petty/homelab runs it from this repository (
docs/DESIGN.md:258). - Rejected: Keep the plugin and the token mount here. The Grafana Helm values are environment manifests of dan-petty/homelab.
- Chosen: Keep the builder, its tests and the product dashboard panels in devops-cli.
- Which dashboards hold the runs and claims panels?: The SRE template renders the two panels for the Service dashboard that dan-petty/homelab builds from its
services.toml. The Roadmap Service product dashboardk8s/devops/dashboards/roadmap-service-telemetry.jsonholds the two panels that this repository keeps. (best practice) [sources: docs/DESIGN.md:258, docs/DESIGN.md:259, k8s/devops/dashboards/roadmap-service-telemetry.json:36, src/devops_cli/grafana/service_dashboard.py:864]- Chosen: The builder and the Roadmap Service product dashboard. The builder writes the generated Service dashboard of homelab, and the issue update keeps the panels of the product dashboards in
k8s/devops/dashboards/, whichk8s/devops/dashboards/kustomization.yaml:1names product content. - Rejected: The builder only. It drops the product dashboard panels that the issue update keeps in this repository.
- Rejected: A new
services.tomlunderk8s/devops/dashboards/. No spec file exists there, and the builder writes next to its spec file, not into the product folder.
- Chosen: The builder and the Roadmap Service product dashboard. The builder writes the generated Service dashboard of homelab, and the issue update keeps the panels of the product dashboards in
- How does the builder set the API host?: The spec holds the API host, as it holds the namespace and the workload:
ServiceSpecgains an optional API host field. The test usesexample.com. The homelab spec supplieshttp://roadmap-service.devops.svc.cluster.local:8000, the in-cluster Serviceroadmap-servicein namespacedevopson port 8000. (best practice) [sources: src/devops_cli/grafana/service_specs.py:26, k8s/devops/roadmap-service/service.yaml:4, k8s/devops/roadmap-service/service.yaml:15, docs/CLUSTER.md:142]- Chosen: Read the host from the spec.
ServiceSpecholds the environment values (src/devops_cli/grafana/service_specs.py:26), dan-petty/homelab runs the builder on itsservices.toml, and the test usesexample.com. - Rejected: Hard-code the in-cluster URL in the builder. It fixes an environment value in product code and leaves the homelab spec unable to set it.
- Rejected: Use the public hostname. The API has no Ingress, and a public host would widen the datasource allowed hosts.
- Chosen: Read the host from the spec.
- Which datasource uid do the API list panels use?: The uid
infinity, a fixed constant beside the uidsprometheus,lokiandpyroscopeof the builder.dan-petty/homelab#267provisions the datasource with the same uid, so the panel and the datasource agree. (best practice) [sources: src/devops_cli/grafana/service_dashboard.py:71, docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:62]- Chosen: Use the uid
infinity. It names the datasource in the short lowercase form of the uids that the builder already fixes. - Rejected: Use the uid
roadmap-api. It names the target, not the datasource, and breaks the short-name pattern of the fixed uids.
- Chosen: Use the uid
- May anonymous viewers see the item titles of private repositories in Grafana?: Yes. The owner decision of 2026-11-11 in the issue body permits the item titles of private repositories in Grafana. ADR 0029 records that Grafana gives anonymous viewers what its read token reads, from the home address with no login, and the homelab follow-up keeps
auth.anonymousat theViewerrole. (best practice) [sources: docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:66]- Chosen: Keep the anonymous Viewer role and show the titles. The owner decision permits the titles, and ADR 0029 gives anonymous viewers what the read token reads.
- Rejected: Require a login. It reverses the owner decision and the anonymous access that ADR 0029 records.
- Does the dashboard linter accept an Infinity target today?: No. Every target that is not the expression datasource falls to the empty-
exprerror, and theTargetmodel holds nourlorroot_selector, so a dashboard with an Infinity panel failsdevops grafana dashboards lint. [sources: src/devops_cli/grafana/linter.py:271, src/devops_cli/grafana/schema.py:59] - How does the linter learn the Infinity target?: Add an Infinity branch to
schema.Targetandlinter._check_one_target: a target of the Infinity datasource needs aurland may hold aroot_selector, and a target with no URL is reported with its panel. (best practice) [sources: src/devops_cli/grafana/linter.py:257, src/devops_cli/grafana/schema.py:59, docs/TESTING.md:68]- Chosen: Extend the schema and the linter. Every product dashboard is linted (
k8s/README.md:220), so an Infinity panel fails the lint until the linter reads its URL. - Rejected: Lint only the Prometheus dashboards. It lowers the check for the product dashboards that the repository ships.
- Rejected: Keep the panels out of the product dashboards. The issue keeps the product dashboard panels in this repository.
- Chosen: Extend the schema and the linter. Every product dashboard is linted (
- Which checks hold the new work?: The builder and the linter are source code and get pytest cases in
tests/grafana/. The product dashboard is a config file, so its proof isuv run devops grafana dashboards lint k8s/devops/dashboards/roadmap-service-telemetry.json, and the token check isuv run devops scan secrets .. No pytest case reads the dashboard JSON. (best practice) [sources: docs/TESTING.md:68, docs/commands/grafana.md:154, docs/commands/scan.md:46]- Chosen: Pytest for the source code and validator commands for the config. The builder and the linter are source code, and
docs/TESTING.md:68gives a config file a validator command as its proof. - Rejected: Pytest cases that read the dashboard JSON. A test asserts no value of a manifest or a config file.
- Chosen: Pytest for the source code and validator commands for the config. The builder and the linter are source code, and
- How does the test check each panel path against the roadmap Service API?: The test reads the OpenAPI schema of the roadmap Service app and compares the path part of each panel URL, without its query, with its
paths. It reports the panel and the value that the schema does not list. It waits for feat(service): serve a read-only roadmap API with OpenAPI #4586, which adds the routes and the document. (best practice) [sources: docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:32, docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:42, src/devops_cli/server/service.py:1314]- Chosen: Read the OpenAPI schema of the Service. The API issue serves the document, and the schema of the app is source code that the test reads offline.
- Rejected: Hard-code the two paths. It misses a path that the API removes or renames.
- How does a test check the builder output?: The builder writes
<uid>.jsonnext to its spec file, and the spec and the built Service dashboard are in dan-petty/homelab. A pytest case builds a spec with the two API lists intmp_pathand asserts the written file, astest_the_build_writes_the_dashboard_of_each_spec_next_to_the_spec_filedoes. The Makefile holds nodashboardstarget today. (best practice) [sources: src/devops_cli/grafana/service_dashboard.py:864, tests/grafana/test_service_dashboard.py:523, docs/DESIGN.md:258]- Chosen: A pytest case that builds and writes a spec in
tmp_path. The builder is source code, the existing build test does the same, and the spec and the built dashboard of the Service are in dan-petty/homelab. - Rejected: A pytest case that reads the committed dashboards.
docs/TESTING.md:68gives a config file a validator command, never a test that reads it.
- Chosen: A pytest case that builds and writes a spec in
- Which routes and answer envelope does the roadmap Service API define?:
GET /api/v1/roadmap/runsandGET /api/v1/roadmap/claims. Each answer holdsas_of,linksand one list field, so the root selectors arerunsandclaims. [sources: docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:38, docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:39, docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:50] - Does the webhook router serve the read API today?: No. The router builds a FastAPI app with
openapi_url=Noneand includes only the webhook router. feat(service): serve a read-only roadmap API with OpenAPI #4586 adds the routes, the document and the read token. [sources: src/devops_cli/server/service.py:1317, src/devops_cli/server/service.py:1327, docs/adr/0029-the-roadmap-service-serves-a-read-only-api.md:82]
Open questions
- The alternatives check found that
https://github.com/grafana/grafana-infinity-datasourcecovers this item. Adopt the tool, or keep the item and give the reason. (a person decides)
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(monitoring)scope of the title gives the scope.It adds operational visibility into pipeline runs and claims but does not fix a broken or missing critical path.Operators gain live lists of runs and claims without Prometheus label workarounds.Plugin install, datasource config with secret, two panels, and a test; body estimates about 1.5 hours.k8s/monitoring/dashboards/) #693, which asks for a different change.Both work in k8s/monitoring/ Grafana dashboards, but #693 adds Prometheus metrics panels while the candidate adds an Infinity datasource panel that reads a Service API.dan-petty commentedon Nov 11, 2026
Scope from the project brain plan (2026-11-11)
The project brain plan #4624 adds one panel to this item (child 16 of that plan).
Problem: the "Project brain" row of the roadmap-pipeline dashboard needs one list panel, the top insights, and only the API can serve it.
Added scope: a table "Project insights" in the "Project brain" row of roadmap-pipeline, over the new insights route of #4586, through the same Infinity datasource (
allowedHostsholds the in-cluster Service URL only; thegrafanaread token).Added acceptance criteria:
Added dependencies: the brain dashboard child (#4699), which adds the "Project brain" row, and the insights route of #4586. The other panels of this item do not wait for them. This item stays a child of #4517.
dan-petty commentedon Nov 11, 2026
Owner direction of 2026-11-11:
New rule: no minimum release age for dependencies, images, charts or tools. Pin the newest release that fixes the known security and bug issues and that the surrounding tools support (the tests pass).
Body changes: the Infinity plugin pin is the newest release that fixes the known issues and that the Grafana version supports, not a release that is 14 days old.
devops-cli-service commentedon Nov 13, 2026
Alternatives check: covers
Reason: The searches and repository facts identify Grafana Labs' Infinity datasource as the maintained open-source plugin that the issue already proposes. It reads HTTP JSON APIs with a root selector and supports provisioned allowed hosts and secure authentication, so it covers the runs, claims and added insights panels; the remaining work is project-side provisioning, token generation, dashboard JSON and tests.
Tool: grafana/grafana-infinity-datasource (https://github.com/grafana/grafana-infinity-datasource)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-13. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 14, 2026
Refine cannot set this item to Ready at b15faab until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
devops-cli-service commentedon Nov 20, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 21, 2026
Answer to the open question: adopt
grafana/grafana-infinity-datasource(plugin idyesoreyeram-infinity-datasource). This item is that adoption, so no separate build stays.pluginslist updates the pin. Keep the newest pin, because 4.1.8 fixed a Base URL origin check.monitoringgets thegrafanakey ofservice.api.tokens, which feat(service): serve a read-only roadmap API with OpenAPI #4586 adds (owner decision of 2026-11-11 on feat(service): serve a read-only roadmap API with OpenAPI #4586). This item adds no second Secret row and no second keyring value. It mounts the Secret that feat(service): serve a read-only roadmap API with OpenAPI #4586 writes.allowedHostslimits hosts, not paths.The "Project insights" table is not in the scope of this item. It is in #6599, with the insights route and the "Project brain" row. #6599 is no dependency of this item.
devops-cli-service commentedon Nov 21, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 23, 2026
The result in the alternatives block of the issue body changed. Before this check:
covers, tool https://github.com/grafana/grafana-infinity-datasource. A person decides what the new result means for the item.Searches (5)
Tools considered:
Searches run:
Sources:
dan-petty commentedon Nov 24, 2026
Adopt the tool: grafana-infinity-datasource. AGENTS.md rule 3 requires using an open tool before building.
devops-cli-service commentedon Nov 24, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 25, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 26, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
The result in the alternatives block of the issue body changed. Before this check:
in-use, tool https://github.com/grafana/grafana-infinity-datasource. A person decides what the new result means for the item.Searches (3)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 29, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence