Skip to content

fix(service): render and alert on the hourly request budget - #2760

Merged
dan-petty merged 6 commits into
mainfrom
fix/2755-budget-setting-render
Oct 30, 2026
Merged

dan-petty merged 6 commits into
mainfrom
fix/2755-budget-setting-render

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

What

The roadmap Service reads its hourly GitHub request budget from the ConfigMap devops-cli-config. The renderer did not copy service.github_requests_per_hour into that ConfigMap. Each devops k8s deploy-stack --stack devops therefore put the Service back to the default of 500. The field also had no variable and no description. The alert RoadmapServiceGitHubRequestsHigh used a fixed limit of 450 requests, so it fired in a normal hour at a budget of 2000.

Change

  • _service_block copies github_requests_per_hour when a source sets it (config file, variable or code). With the default, the ConfigMap holds no value.
  • The field has a Variable() marker and a description. The variable is DEVOPS_CLI_SERVICE_GITHUB_REQUESTS_PER_HOUR. The generated documents list it.
  • The alert compares the requests of the hour with 90% of devops_cli_service_budget_limit_requests, the limit that the Service reports. The rule joins the two series with on(), because their instance labels differ. promtool tests the rule.
  • The OpenSpec change 2755-budget-setting-render is archived. It adds one modified and two added requirements.

After the merge

The owner runs devops config set service.github_requests_per_hour 2000, then devops k8s deploy-stack --stack devops. The ConfigMap then keeps 2000.

Closes #2755

@dan-petty
dan-petty marked this pull request as ready for review October 30, 2026 04:16
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results

  • Local devops ci: all checks passed. The test check took 5m 39s on a busy host.
  • GitHub CI: all checks passed. Tests & Coverage took 347 s.
  • Fail-to-pass run (devops ci fail-to-pass --base origin/main): 9 tests fail on the base and pass on the branch. They are in test_config_cmd, test_config_declarations, test_config_field_validation, test_k8s_configmap and test_k8s_monitoring_alerting. The Fail-to-Pass Check in CI also passed.
  • promtool tests the new alert rule, including the on() join.

Review findings: none to fix.

Note: the test check is above the 5-minute budget in CI (347 s). The slow tests are fixture setup in the architectural-invariant tests. They are not part of this change.

@dan-petty
dan-petty merged commit 809d85b into main Oct 30, 2026
18 checks passed
@dan-petty
dan-petty deleted the fix/2755-budget-setting-render branch October 30, 2026 08:21
dan-petty pushed a commit that referenced this pull request Oct 30, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.22.1](v0.22.0...v0.22.1)
(2026-10-30)


### Bug Fixes

* **github:** ask no traffic endpoint as the App
([#2759](#2759))
([692c15f](692c15f)),
closes [#2752](#2752)
* **roadmap:** a stop of the Service is not a failed round
([#2756](#2756))
([0b7e190](0b7e190)),
closes [#2753](#2753)
* **roadmap:** say why an implement step stopped
([#2762](#2762))
([cd56ce4](cd56ce4)),
closes [#2758](#2758)
* **service:** render and alert on the hourly request budget
([#2760](#2760))
([809d85b](809d85b)),
closes [#2755](#2755)
* **service:** run the implement row on the status lane
([#2763](#2763))
([cd94f2c](cd94f2c)),
closes [#2757](#2757)


### Performance Improvements

* **ci:** cut test job time and guard its mean
([#2764](#2764))
([e76f656](e76f656)),
closes [#2699](#2699)

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(service): the ConfigMap carries github_requests_per_hour and the high-request alert follows the limit

1 participant