Repository navigation
fix(monitoring): the roadmap Service alerts count a series that starts in the hour, and a lane of a new pod can stall - #2514
Merged
Conversation
The count rules of the group roadmap-service miss the first value of a series that starts in the hour, the failed-jobs correction counts a sparse old series in full, and a lane of a new pod has no job start series. Plan the fix as the change 2505-roadmap-service-alert-gaps.
…arts in the hour, and a lane of a new pod has no job start (#2505) promtool cases: a sparse error series from before the hour, a new error series with one sample, GitHub and model request streams that start in the hour, a sparse GitHub request stream at 2000, and a lane of a new pod. The pinned expressions count a new series by its last value. A worker sets the job start of its lane when it starts.
…he hour, and a lane of a new pod can stall (#2505) RoadmapServiceJobsFailing, RoadmapServiceGitHubRequestsHigh and RoadmapServiceModelRequestsHigh give a series with no sample in the hour before its last value, and every other series its increase(). The old correction read the series an hour ago with the 5-minute lookback, so a sparse series from before the hour added all of its count. RepoWorker.start sets the job start of its lane, so RoadmapServiceLaneStalled sees a lane of a new pod that starts no job.
Owner
Author
|
Fail-to-pass:
The promtool case of a lane of a new pod passes on the base rules, because the rule does not change. It shows the alert with the series that the worker now exports. Review findings of #2496:
Also checked before the push: |
dan-petty
marked this pull request as ready for review
October 28, 2026 19:31
dan-petty
pushed a commit
that referenced
this pull request
Oct 28, 2026
🤖 I have created a release *beep* *boop* --- ## [0.11.0](v0.10.1...v0.11.0) (2026-10-28) ### Features * **monitoring:** the roadmap Service's identity refusals, failing and stalled jobs, restarts, and GitHub and model request volume raise alerts ([#2496](#2496)) ([0137f23](0137f23)), closes [#2472](#2472) * **service:** roadmap-service runs at one replica, and each model call in the cluster is sent at most two times ([#2500](#2500)) ([2d32dae](2d32dae)), closes [#2494](#2494) ### Bug Fixes * **cli:** every command reports a DevOpsCLIError through one exit seam ([#2502](#2502)) ([eadd55f](eadd55f)), closes [#2487](#2487) * **github:** pr monitor waits until the checks settle and names every blocker, and pr ready reads the merge-readiness verdict ([#2498](#2498)) ([43326ea](43326ea)) * **k8s:** a pod that does not call the Kubernetes API mounts no service account token ([#2522](#2522)) ([305d3ba](305d3ba)) * **k8s:** the cloudflared tunnel replicas prefer different nodes and keep one up through a drain ([#2499](#2499)) ([d4edaf6](d4edaf6)), closes [#1023](#1023) * **k8s:** the grafana, prometheus, argo cd and loki clients dial through the egress-checked factory, and their pre-flight address checks go ([#2497](#2497)) ([e7ca1d5](e7ca1d5)) * **monitoring:** the roadmap Service alerts count a series that starts in the hour, and a lane of a new pod can stall ([#2514](#2514)) ([c7692b2](c7692b2)), closes [#2505](#2505) * **review:** a review's scanners leave out the rules that never gave a valid finding here ([#2508](#2508)) ([fe953ac](fe953ac)) * **roadmap:** a refine round leaves an outside account issue to a person, and refine neutralizes comment openers, www links and cross-repository references ([#2507](#2507)) ([e6230dc](e6230dc)), closes [#2478](#2478) * **sandbox:** the metrics scrape and the whitelist NetworkPolicy resolve each host one time, through the egress check ([#2521](#2521)) ([7c01426](7c01426)) * **security:** the subprocess environment guard refuses the zsh and interpreter keys that make a child run code ([#2510](#2510)) ([459621a](459621a)) * **service:** a restart keeps the halt, the budget window and the failure ledger, and a rate limit or a suspended installation stops every worker ([#2515](#2515)) ([3630de1](3630de1)), closes [#2474](#2474) ### Code Refactoring * **config:** settings resolve in one declared order through pydantic-settings sources ([#2518](#2518)) ([6a5447a](6a5447a)), closes [#2445](#2445) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A review of #2496 found that the rule group
roadmap-servicemisses real incidents, and a check of the same rules found a false alert.RoadmapServiceJobsFailing,RoadmapServiceGitHubRequestsHighandRoadmapServiceModelRequestsHighcount each series of the last hour in one way:(last_over_time(x[1h]) unless last_over_time(x[1h] offset 1h)) or increase(x[1h]). A series with no sample in the hour before started in the hour, so its last value is all of its count. Prometheus gets no zero sample at the start of a series (fix(telemetry): created timestamps from the collector do not reach Prometheus, so increase() still drops the first export #2506), andincrease()does not count the first value. Before this change, the two request rules missed a stream that the collector starts again, for example when the Service comes back after an hour: 520 GitHub requests and 415 model requests in an hour gave no alert.RoadmapServiceJobsFailingread the series one hour ago with the 5-minute lookback. A sparse error series from before the hour added all of its count ("8 model jobs" for 2 failed jobs), and a new series with one sample gave no result. The new count reads neither of these wrongly. On the samples of the cluster for 30 days, the old and the new expressions fire at the same steps, and at the incident of 2026-10-10 both find the 16 failing repository and lane pairs.RepoWorker.startsets the gaugedevops_cli_service_job_start_timestamp_secondsof its lane to the time the worker starts. Before this change, a lane of a new pod had no series until its first job, soRoadmapServiceLaneStalledstayed silent after a rollout when the lane started no job.k8s/README.md, "Roadmap service", "Alerts", says how the counts read a new series and when the 2 hours of a new pod start.tests/fixtures/prometheus_rules/roadmap_service_tests.yamlhas a promtool case for each gap,tests/test_k8s_monitoring_alerting.pypins the expressions, andtests/test_server_service.pychecks the gauge at the start of a worker.Closes #2505