Skip to content

feat(telemetry): Hide empty sub-command panels in devops-cli dashboard #2703

Closed as not planned

Description

@dan-petty

Problem or Motivation

After #2700, the panel "Telemetry: $sub_command" of k8s/monitoring/dashboards/devops-cli.json repeats for each selected sub-command. With All selected, a sub-command that did not run in the time range still gets a panel with "No data", and the row gets long.

Proposed Solution & Architectural Design

Grafana 13 dynamic dashboards give the Auto grid layout and a show/hide rule "Query result: has data", which hides such a panel. Both need the v2 dashboard schema.

The dashboard sidecar feeds the classic file provider. That provider refuses a plain v2 dashboard with "dashboard appears to be in v2 format. Please use the /apis/dashboard.grafana.app/v2 API". One report says that a Kubernetes-style file with apiVersion: dashboard.grafana.app/v2 loads (https://community.grafana.com/t/provisioning-in-grafana-13-with-v2-dashboards/163029).

  1. Confirm on the cluster that the sidecar's file provider loads a Kubernetes-style v2 dashboard, and that it stays provisioned after a restart.
  2. If it loads: convert devops-cli.json to v2, put the sub-command row on an Auto grid, add the "has data" rule to the repeated panel, and change src/devops_cli/grafana and the dashboard tests to read the v2 shape.
  3. If it does not load: return this issue with the evidence.

Target Subsystem

Telemetry: k8s/monitoring/dashboards/devops-cli.json, src/devops_cli/grafana/, the dashboard tests.

Existing Tool Considered

Grafana dynamic dashboards (Auto grid, conditional rendering). No code is built.

Depends on #2700.

Alternatives check of 2026-11-04: partly.
Tool: grafana/grafana-foundation-sdk (https://github.com/grafana/grafana-foundation-sdk), Apache-2.0, last activity 2026-11-03, maintained.

Proposed design

Problem statement

Close this item as not planned. #4707 (#5194) removed the panel Telemetry: $sub_command and made the row "Sub-commands" one table. No panel repeats, so no empty panel is left to hide. The v2 conversion and the Auto grid have no object. The repository at this commit already holds the table and the test that guards it.

Acceptance criteria

Requirement: The Sub-commands row holds one table

The row "Sub-commands" of k8s/devops/dashboards/devops-cli.json SHALL hold one table panel and no panel that repeats.

Scenario: No repeated panel in the row

  • WHEN A test reads the row "Sub-commands" of k8s/devops/dashboards/devops-cli.json
  • THEN The row holds one panel of type table, and that panel has no repeat key

Requirement: The dashboard keeps the classic schema

k8s/devops/dashboards/devops-cli.json MUST keep a top-level panels array and MUST hold no apiVersion key.

Scenario: Classic schema check

  • WHEN A test parses k8s/devops/dashboards/devops-cli.json as JSON
  • THEN The object holds a panels array and no apiVersion key

Existing Tool Considered

grafana/grafana-foundation-sdk (https://github.com/grafana/grafana-foundation-sdk), Apache-2.0, last activity 2026-11-03, maintained. It covers the need in part: typed builders for the v2 dashboard resource model, AutoGrid and AutoGridItem builders for the sub-command row, conditional-rendering builders including a data condition with a boolean value, and a Python package. It lacks the rest: it does not verify that the sidecar's classic file provider loads a Kubernetes-style v2 file or that the file stays provisioned after a restart; it does not convert the existing devops-cli.json; it gives no ready-made v2 JSON for this dashboard; and it does not provision dashboards. The need is gone: #4707 (#5194) replaced the repeated panel with one table, so no panel repeats and no v2 builder is needed. The change builds no code to replace the SDK, so it has no build cost.

Key questions

  • Does the panel Telemetry: $sub_command still repeat in the devops-cli dashboard?: No. fix(monitoring): make the GitHub and command panels readable #4707 (fix(monitoring): make the GitHub and command panels readable #5194) removed the repeated panel and the row "Sub-commands" now holds one table of the selected sub-commands. The command-telemetry spec states that the row holds one table and no panel that repeats, and test_cli_dashboard_shows_the_selected_sub_commands_in_one_table asserts it. [sources: openspec/specs/command-telemetry/spec.md, tests/grafana/test_grafana_dashboards.py, k8s/devops/dashboards/devops-cli.json]
  • Which file holds the devops-cli dashboard?: k8s/devops/dashboards/devops-cli.json. The product dashboards moved to k8s/devops/dashboards/ (refactor(k8s): split the product dashboards and rules in place #5292), so the path in the issue body, k8s/monitoring/dashboards/devops-cli.json, is out of date. The dashboard tests read the file from the product folder. [sources: tests/grafana/test_grafana_dashboards.py, openspec/specs/command-telemetry/spec.md]
  • Does the item still need the v2 dashboard schema, the Auto grid and the has-data rule?: No. No panel repeats, so no empty panel is left to hide and no Auto grid or hide rule is needed. Keep the dashboard in the classic schema and close the item as not planned. (best practice) [sources: openspec/specs/command-telemetry/spec.md, tests/grafana/test_grafana_dashboards.py]
    • Chosen: Keep the classic schema and close the item as not planned. The repeated panel is gone, so the change has no object and the file provider needs no v2 file.
    • Rejected: Convert devops-cli.json to v2 and add the Auto grid and the has-data rule. No panel repeats, so the conversion hides nothing and changes a working dashboard for no result.
    • Rejected: Return the issue with the file-provider evidence. The block is moot when the need is gone; no cluster check is needed.
  • Does the sidecar's classic file provider load a Kubernetes-style v2 dashboard?: No source shows it. The cited report shows the classic file provider rejecting a v2 dashboard with "dashboard appears to be in v2 format. Please use the /apis/dashboard.grafana.app/v2 API", and its Kubernetes-style file loaded only as the old schema. The repository configures the classic file provider and the dashboard sidecar in k8s/monitoring/grafana-values.yaml. This block no longer applies, because the item needs no v2 file. [sources: k8s/monitoring/grafana-values.yaml]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    enhancement
    on Oct 29, 2026
  2. added
    type/feature
    status/new
    value/medium
    effort/medium
    on Oct 29, 2026
  3. devops-cli-service commented on Oct 29, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The candidate adds a new capability (conditional panel visibility) using Grafana 13 v2 features.
    • Priority: P2-Medium. It improves dashboard readability but does not block any workflow or fix a broken feature.
    • Value: Medium. Users see fewer empty panels, which reduces visual noise, but the data is still accessible.
    • Effort: Medium. Requires v2 schema conversion, sidecar verification, code updates in src/devops_cli/grafana, and test changes.
    • Related: fix(telemetry): devops-cli dashboard command variable covers all registered subcommands #1241, which asks for a different change. Both address sub-command panels that have no data, but #1241 fixed the variable to list all subcommands while the candidate adds a show/hide rule to hide empty panels.
  4. added
    scope/telemetry
    on Oct 30, 2026
  5. devops-cli-service commented on Oct 30, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 46fd02d 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.

    • Does the Grafana sidecar file provider accept a Kubernetes-style v2 dashboard file? (missing verified source)
    • What is the exact v2 dashboard file format that the sidecar expects? (missing verified source)
    • What is the Auto grid layout configuration in the v2 schema? (missing verified source)
  6. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Tool: grafana/grafana-foundation-sdk (https://github.com/grafana/grafana-foundation-sdk)

    • License: Apache-2.0
    • Last activity: 2026-11-03
    • Maintained: yes

    Covers:

    • Provides typed builders for the Grafana v2 dashboard resource model, so the dashboard can be produced in the v2 shape the issue needs.
    • Provides AutoGrid/AutoGridItem builders for putting the sub-command row on an Auto grid.
    • Provides conditional-rendering builders, including a data condition with a boolean value, which can express the 'Query result: has data' hide rule on a repeated panel or row.
    • Is distributed as an open Python package as well as libraries for other languages, matching this project's Python stack.

    Lacks:

    • Does not verify whether the sidecar's classic file provider loads a Kubernetes-style v2 dashboard, or whether it stays provisioned after a restart.
    • Does not convert the existing devops-cli.json; dashboards are built from code, so the file conversion and the src/devops_cli/grafana reader and dashboard-test updates remain.
    • Does not hand back ready-made v2 JSON for this dashboard; it only offers builders to generate the Auto grid and conditional-rendering structures.
    • Does not provision dashboards itself; provisioning still goes through Grafana's file provider.
    • The other dashboard-as-code option, grafonnet, does not yet provide the v2 resource model (tracked in its issue docs(agent): reconcile task-262 as merged and prune completed item from matrix #264), so it is not a ready drop-in for this change.

    Searches run:

    • Grafana 13 v2 dashboard schema provisioning sidecar file provider
    • grafonnet v2 dashboard schema auto grid conditional rendering has data
    • grafana-foundation-sdk dashboard v2 schema support
    • Grafana dashboard v2 JSON AutoGrid conditionalRendering has data example
    • grafonnet issue 264 support Dashboard V2 resource model status
    • grafana-foundation-sdk DashboardV2 conditionalRendering autoGrid v2 dashboard builder
    • pkg.go.dev grafana-foundation-sdk dashboardv2 ConditionalRendering builder
    • grafana v2 dashboard conditionalRendering query hasData hide panel json
    • grafana-foundation-sdk python dashboardv2 package pypi

    Sources:

    Checked on 2026-11-04. A person decides what this means for the item. The check changes no label and closes no issue.

  7. changed the title [-]feat(telemetry): the devops-cli dashboard hides a sub-command panel that has no data, with the Grafana 13 Auto grid[/-] [+]feat(telemetry): Hide empty sub-command panels in devops-cli dashboard[/+] on Nov 6, 2026
  8. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    The job shortened the title of this item. The summary had 98 characters, and the limit is 60. The type and the scope stay.

    • Before: feat(telemetry): the devops-cli dashboard hides a sub-command panel that has no data, with the Grafana 13 Auto grid
    • After: feat(telemetry): Hide empty sub-command panels in devops-cli dashboard
    • Source of the summary: the background model
  9. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at acb4e19 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.

    • Who confirms on the cluster that the sidecar's file provider loads a v2 dashboard and keeps it provisioned after a restart? (a person decides)

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: k8s/monitoring/grafana-values.yaml.

  10. 7 remaining items

  11. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Staged: branch feat/2703-hide-empty-sub-command-panels-in, draft pull request #5598. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:

    1. State and guard the classic schema of the devops-cli dashboard: 41210 tokens

    A model review of the plan found these points. They stop no draft, and a person judges them:

    • major criterion_dropped at issue (Requirement: The dashboard keeps the classic schema): The issue's acceptance criteria include a requirement that the dashboard keeps the classic schema, with a scenario in which a test parses the file and finds a panels array and no apiVersion key. The plan has a spec delta of none, no test and no criteria. It records the rule only in prose in docs/DESIGN.md. A document edit does not assert that rule, and the uv run devops ci docs verify cannot check it. A search found no existing test for the rule. Evidence: "k8s/devops/dashboards/devops-cli.json MUST keep a top-level panels array and MUST hold no apiVersion key."

    The runs of the planner and the review made 59 model request(s), and used 3130218 input tokens and 94686 output tokens. The tool calls, in order:

    1. search_code({"text":"\"repeat\""})
    2. list_files({"directory":"k8s/devops/dashboards"})
    3. read_file({"path":"tests/grafana/test_grafana_dashboards.py","start_line":1120,"end_line":1190})
    4. read_file({"path":"tests/prometheus/test_k8s_monitoring_dashboards.py","start_line":680,"end_line":850})
    5. search_code({"text":"k8s/monitoring/dashboards/devops-cli.json"})
    6. search_code({"text":"Sub-commands"})
    7. list_files({"directory":"docs"})
    8. search_code({"text":"devops-cli-telemetry"})
    9. list_files({"directory":"tests/fixtures/roadmap_eval/stage"})
    10. search_code({"text":"dashboard"})
    11. read_issue({"number":2700})
    12. read_issue({"number":4707})
    13. find_issues({"terms":"devops-cli.json dashboard"})
    14. search_code({"text":"\"skip_specs\": true"})
    15. read_spec({"capability":"grafana-dashboard-lint"})
    16. read_file({"path":"docs/TELEMETRY.md","start_line":1,"end_line":70})
    17. list_files({"directory":"docs/guidelines"})
    18. search_code({"text":"Grafana dashboards"})
    19. search_code({"text":"dashboards/"})
    20. search_code({"text":"devops ci docs"})
    21. read_file({"path":"docs/DESIGN.md","start_line":250,"end_line":266})
    22. search_code({"text":"sidecar"})
    23. read_file({"path":"k8s/monitoring/grafana-values.yaml","start_line":1,"end_line":60})
    24. read_file({"path":"k8s/monitoring/grafana-values.yaml","start_line":200,"end_line":235})
    25. search_code({"text":"_PRODUCT_DASHBOARDS"})
    26. read_file({"path":"tests/grafana/test_grafana_dashboards.py","start_line":25,"end_line":70})
    27. search_code({"text":"_REPO_DASHBOARD_FILES"})
    28. read_file({"path":"tests/grafana/test_grafana_dashboards.py","start_line":175,"end_line":230})
    29. search_code({"text":"apiVersion"})
    30. search_code({"text":"| Grafana"})
    31. search_code({"text":"apiVersion"})
    32. search_code({"text":"test_cli_dashboard_shows_the_selected_sub_commands_in_one_table"})
    33. read_file({"path":"tests/grafana/test_grafana_dashboards.py","start_line":1135,"end_line":1165})
    34. search_code({"text":"\"apiVersion\" not in"})
    35. search_code({"text":"apiVersion\" not in"})
    36. search_code({"text":"\"panels\" in"})
    37. search_code({"text":"classic schema"})
    38. search_code({"text":"v2 format"})
    39. search_code({"text":"\"docs\""})
    40. search_code({"text":"devops ci docs"})
    41. search_code({"text":"no 'apiVersion'"})
    42. list_files({"directory":"k8s/devops/dashboards"})
    43. search_code({"text":"repeatDirection"})
    44. read_file({"path":"tests/grafana/test_grafana_dashboards.py","start_line":1100,"end_line":1180})
    45. search_code({"text":"k8s/devops/dashboards"})
    46. read_file({"end_line":90,"path":"tests/grafana/test_grafana_dashboards.py","start_line":1})
    47. search_code({"text":"apiVersion"})
    48. search_code({"text":"classic"})
    49. search_code({"text":"schemaVersion"})
    50. read_file({"end_line":3440,"path":"k8s/devops/dashboards/devops-cli.json","start_line":3380})
    51. search_code({"text":"\"repeat\""})
    52. search_code({"text":"CONST_GRAFANA_SCHEMA_VERSION"})
    53. search_code({"text":"apiversion\" not in"})
    54. search_code({"text":"schema_version"})
    55. read_file({"path":"tests/prometheus/test_k8s_monitoring_dashboards.py","start_line":690,"end_line":740})
    56. read_spec({"capability":"command-telemetry","requirement":"The devops-cli dashboards lists each sub-command of its series in one table"})
    57. file_symbols({"path":"src/devops_cli/grafana/linter.py"})
    58. read_spec({"capability":"command-telemetry","requirement":"The devops-cli dashboard lists each sub-command of its series in one table"})
    59. read_issue({"number":4707})
    60. find_issues({"terms":"devops-cli dashboard"})
    61. search_code({"text":"The row \"Sub-commands\" SHALL hold one table"})
    62. read_issue({"number":5278})
    63. read_issue({"number":2700})
    64. search_code({"text":"dashboard.grafana.app"})
    65. search_code({"text":"\"apiVersion\":"})
    66. read_file({"path":"tests/grafana/test_grafana_dashboards.py","start_line":1100,"end_line":1180})
    67. read_file({"path":"k8s/devops/dashboards/devops-cli.json","start_line":3405,"end_line":3430})
    68. read_file({"path":"openspec/changes/archive/2026-10-29-2700-sub-command-dashboard/proposal.md","start_line":30,"end_line":45})
    69. read_file({"path":"openspec/specs/command-telemetry/spec.md","start_line":190,"end_line":215})
    70. search_code({"text":"\"schemaVersion\": 42"})
    71. search_code({"text":"_PRODUCT_DASHBOARDS ="})
    72. search_code({"text":"CONST_GRAFANA_SCHEMA_VERSION"})
    73. search_code({"text":"\"repeat\""})
    74. search_code({"text":"schemaVersion"})
    75. search_code({"text":"def dashboards_lint"})
    76. find_issues({"terms":"devops-cli dashboard schemaVersion"})
    77. read_issue({"number":4707})
    78. read_issue({"number":2700})
    79. find_issues({"terms":"devops-cli.json dashboard"})
    80. search_code({"text":"\"apiVersion\":"})
    81. search_code({"text":"dashboard.grafana.app"})
    82. search_code({"text":"schemaVersion"})
    83. search_code({"text":"schema_version"})
    84. search_code({"text":"def ci_test"})
    85. search_code({"text":"devops ci test"})

    Tool calls: file_symbols=1 (empty=0), find_issues=4 (empty=1), list_files=5 (empty=0), read_file=17 (empty=0), read_issue=7 (empty=0), read_spec=3 (empty=0), search_code=48 (empty=3)

    The stage job read the open pull requests and their files in 1 GraphQL request(s).

  12. added
    owner/service
    status/in-progress
    and removed
    owner/service
    status/ready
    on Nov 14, 2026
  13. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-runner-20261114-021622-4407 ended: succeeded.
    Image digest: sha256:393d04a07a0962a6e3a13174e6fca704b3a020f52570d1ef80cb8770a6322db9

    The last lines of its log:

    # Implement plan for dan-petty/devops-cli
    
    ## Left out
    - #2703 feat(telemetry): Hide empty sub-command panels in devops-cli dashboard: Its pull request #5598 is not an open draft.
    ✓ Took 0 item(s) to a ready pull request, stopped 0.
    

    Failure class: ci_infra.
    Action taken: none.
    Action left: retry: run the item again.

    The Job left this item without a result. The item is Blocked. When a retry can fix the class of the stop, the Service starts a new Job in the next round. The limit is roadmap.implement.continuations_per_item, and the comment of that round says so. If no continuation is left, fix the cause. Then comment implement: retry. A new runner image also clears the stop. This holds only if a retry can fix the class of the stop. The limits of roadmap.implement.digest_clears_per_class and roadmap.implement.digest_clears_per_item must also allow it.

  14. added
    status/blocked
    status/ready
    and removed
    owner/service
    status/in-progress
    status/blocked
    on Nov 14, 2026
  15. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Cleared the stop at job by the rule continue: the runner Job devops-cli-runner-20261114-021622-4407 ended without a result. The class ci_infra of the stop is one that a new attempt can fix. This is continuation 1 of 4 for this item. The item is Ready again. The Service takes it in the next round. The new Job takes the branch from origin, so it keeps the work that the run pushed there.

  16. dan-petty commented on Nov 14, 2026

    @dan-petty
    OwnerAuthor

    Closed as not planned. PR #5194 (#4707, merged 2026-11-12) removed the repeated panel Telemetry: $sub_command: the row Sub-commands on main holds one table with no repeat key, and tests/grafana/test_grafana_dashboards.py::test_cli_dashboard_shows_the_selected_sub_commands_in_one_table guards it. The owner comment of 2026-11-12 says that this issue closes as not planned when #5194 merges. The plan PR #5598 is closed without a merge (vet comment on #5598).

  17. removed
    status/ready
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumenhancementpriority/p2-mediumscope/telemetrytriagetype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions