Skip to content

Commit fecc6fb

Browse files
authored
feat(service): chart the Service and filter the CLI dashboard by job (#3704)
Add the row Roadmap Service and the query variable `job` to the `devops-cli Telemetry` dashboard. Each Prometheus query of the dashboard filters by `$job`, so a reader of the Service alerts can read the GitHub requests of the Service apart from those of the cluster Jobs and the workstations. The variable reads `devops_cli_github_requests_total` as well as `devops_cli_command_total`. The Service adds to the command series only when `devops serve` stops, and the list follows the time range of the dashboard, so that series alone does not list the Service in most hours. `k8s/README.md` now says that the Jobs act as the same App and do not count in `service.github_requests_per_hour`. The Service gateway key moved to #3685, and the model retry needed no work. Closes #2479 Change: `openspec/changes/archive/2026-11-05-2479-service-dashboard-row-job-variable/`
1 parent 6a88012 commit fecc6fb

16 files changed

Lines changed: 1127 additions & 82 deletions

File tree

‎k8s/README.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,12 @@ The rule group `roadmap-service` in `monitoring/prometheus-values.yaml` watches
699699
| Alert | Fires when | For | Severity | Do this |
700700
| :--- | :--- | :--- | :--- | :--- |
701701
| `RoadmapServiceIdentityRefused` | GitHub refused the identity of the Service. The Service stopped all rounds and starts no round, also after a restart, until a person removes its halt record, and `/healthz` stays healthy. A start that finds the halt record counts the refusal again, so the alert holds through a restart. | — | critical | Read the refusal in the Service log. Repair the App or its installation (step 1), or rotate its private key (step 9). Then remove the halt record and restart the Service (step 11). |
702-
| `RoadmapServiceGitHubThrottled` | GitHub refused a request of the Service with a rate limit, or gave a 5xx for a read, in the last 15 minutes | — | critical | Read the GitHub API panels of the `devops-cli Telemetry` dashboard. Lower `service.github_requests_per_hour` or remove a repository from `service.repos`, then run `devops k8s deploy-stack --stack devops`. |
702+
| `RoadmapServiceGitHubThrottled` | GitHub refused a request of the Service with a rate limit, or gave a 5xx for a read, in the last 15 minutes | — | critical | Set the variable `Job` of the `devops-cli Telemetry` dashboard to `roadmap-service`, and read the row GitHub API. Lower `service.github_requests_per_hour` or remove a repository from `service.repos`, then run `devops k8s deploy-stack --stack devops`. |
703703
| `RoadmapServiceJobsFailing` | All jobs of one row of a repository failed in 1 hour (increase in errors is greater than zero, and increase in successes is zero). A success of another row of the lane does not clear the alert. | 30m | warning | Read the errors of that repository in the Service log: `kubectl -n devops logs deployment/roadmap-service`. The log line of a failed round names its rows. Repair the cause, for example the repository's `.github/roadmap.toml`. |
704704
| `RoadmapServiceLaneStalled` | No job of a repository and lane started in 2 hours while the deployment has an available replica. In a new pod, the 2 hours start when the worker of the lane starts. | 10m | warning | Find in the Service log a pause of the rounds, a spent request budget, or a job that does not end. If a job does not end, restart the deployment. |
705705
| `RoadmapServiceRestarted` | The `service` container restarted in the last hour | — | warning | Read the log before the restart: `kubectl -n devops logs deployment/roadmap-service --previous`. |
706706
| `RoadmapServiceUnavailable` | The deployment has an unavailable replica. A rollout stops the old pod before it starts the new one, so the rule waits 10 minutes. | 10m | warning | Read the events: `kubectl -n devops describe deployment/roadmap-service` and `kubectl -n devops get events --sort-by=.lastTimestamp`. |
707-
| `RoadmapServiceGitHubRequestsHigh` | The Service sent more GitHub requests in 1 hour than 90% of the budget it reports in `devops_cli_service_budget_limit_requests` (`service.github_requests_per_hour`, 500 by default) | — | warning | Read the GitHub Requests by Resource panel of the `devops-cli Telemetry` dashboard, and find the repository in the Service log. If the requests are expected, raise the budget with `devops config set service.github_requests_per_hour <n>`. Otherwise, remove the repository from `service.repos`. Then run `devops k8s deploy-stack --stack devops`. |
707+
| `RoadmapServiceGitHubRequestsHigh` | The Service sent more GitHub requests in 1 hour than 90% of the budget it reports in `devops_cli_service_budget_limit_requests` (`service.github_requests_per_hour`, 500 by default) | — | warning | Set the variable `Job` of the `devops-cli Telemetry` dashboard to `roadmap-service`, read the GitHub Requests by Resource panel, and find the repository in the Service log. If the requests are expected, raise the budget with `devops config set service.github_requests_per_hour <n>`. Otherwise, remove the repository from `service.repos`. Then run `devops k8s deploy-stack --stack devops`. |
708708
| `RoadmapServiceModelRequestsHigh` | The Service sent more than 352 model requests in 1 hour. A request that the cache answered does not count. | — | warning | Find the model on the `AI Spend & LLM Usage Telemetry` dashboard, and the repository in the Service log. Remove the repository from `service.repos` until the cause is known, then run `devops k8s deploy-stack --stack devops`. |
709709
| `RoadmapServiceWebhooksRejected` | The webhook route rejected more than 20 deliveries in 15 minutes (Webhook route). A label set that starts in the 15 minutes counts from zero. | — | warning | Check the last response of each hook (step 8). A hook whose last `code` is 401 has a secret that is not the one in `service.webhook_secrets`: set the same secret on both sides (step 9). If each hook gets 200 or 202, the deliveries are forged: read them in the Service log (`kubectl -n devops logs deployment/roadmap-service \| grep rejected`), and the 429 answers of Traefik (Webhook route). |
710710

@@ -1002,6 +1002,10 @@ This repository is public, so it holds no homelab value. Ingress hosts sit under
10021002

10031003
To change the hourly GitHub request budget of the Service, run `devops config set service.github_requests_per_hour <n>`, then `devops k8s deploy-stack --stack devops`. The Service shows the budget it runs with in `devops_cli_service_budget_limit_requests{job="roadmap-service"}`, and the alert `RoadmapServiceGitHubRequestsHigh` follows that value.
10041004

1005+
The cluster Jobs act as the same App as the Service, and they do not count in `service.github_requests_per_hour`. Only the Service keeps this budget, in a record on its volume. A Job pod has no budget and an `emptyDir` home, so the Service does not see the requests of a Job. GitHub counts the requests of both against the one rate limit of the App installation. To read the requests of the Jobs, set the variable `Job` of the `devops-cli Telemetry` dashboard to `devops-cli-job`, and read the row GitHub API. The list of the variable follows the time range of the dashboard. If the list does not show this value, no Job ended or sent a request in that range: make the range wider.
1006+
1007+
The row Roadmap Service of that dashboard charts the rounds, the budget, the queues, the stops and the inputs of the Service.
1008+
10051009
The rest of ConfigMap `devops-cli-config` (gateway URL, models, context windows, telemetry) comes from `k8s/devops/configmap.example.yaml` in the checkout deploy-stack runs from (`--k8s-dir`, default `./k8s`), so run it from a checkout of `main`, the revision the cluster runs.
10061010

10071011
Unlike the ConfigMap, the host patches do not depend on the checkout. deploy-stack derives them from what each Application renders at the revision Argo CD builds: it fetches the Application's `targetRevision` from its `repoURL` into a temporary directory and builds its path with Kustomize, whichever branch is checked out locally. `--argocd-revision <ref>` builds another revision instead, to stage hosts before a pull request merges.
@@ -1334,7 +1338,7 @@ k8s/
13341338
│ ├── kustomization.yaml # configMapGenerator: sidecar-labelled ConfigMaps for four dashboard groups
13351339
│ ├── k8s-views-global.json, k8s-views-pods.json # ConfigMap grafana-k8s-global-dashboards
13361340
│ ├── k8s-views-nodes.json, k8s-views-namespaces.json # ConfigMap grafana-k8s-node-dashboards
1337-
│ ├── devops-cli.json # devops-cli commands, reviews, RAG and spend (grafana-devops-cli-dashboards)
1341+
│ ├── devops-cli.json # devops-cli commands, reviews, RAG, spend and the roadmap Service (grafana-devops-cli-dashboards)
13381342
│ ├── ai-spend.json # AI spend and LLM usage (grafana-devops-cli-dashboards)
13391343
│ ├── project-metrics.json # Project & engineering velocity, release cadence and CI pass rates (grafana-devops-cli-dashboards)
13401344
│ ├── coredns.json # CoreDNS traffic, latency, forwarders and cache; provisioned in grafana-stack-dashboards

0 commit comments

Comments
 (0)