Skip to content

Add gcp-project-quota-health CodeBundle - #764

Open
rw-codebundle-agent[bot] wants to merge 1 commit into
mainfrom
codebundle/gcp-project-quota-health
Open

Add gcp-project-quota-health CodeBundle#764
rw-codebundle-agent[bot] wants to merge 1 commit into
mainfrom
codebundle/gcp-project-quota-health

Conversation

@rw-codebundle-agent

Copy link
Copy Markdown
Contributor

Closes #184

Summary

Adds the gcp-project-quota-health CodeBundle to rw-cli-codecollection. It is a project-wide, service-agnostic GCP quota monitor covering:

  • Check Allocation Quota Usage vs Limit — enumerates consumer allocation quota metrics per enabled service via the Service Usage API and flags quotas at/near their limit.
  • Check Rate Quota Consumption and Throttling Events — pulls serviceruntime rate quota time-series (net_ingress, net_egress, per-method) from Cloud Monitoring and detects throttling where requests were blocked by rate limits.
  • Identify Quotas Above Threshold — cross-references all quota metrics against QUOTA_WARNING_THRESHOLD (default 80%) and flags every quota at/above it.
  • Analyze Quota Rejection Events — queries Cloud Logging for HTTP 429 RESOURCE_EXHAUSTED / quota-exceeded events and aggregates by service/metric.

Includes an in-repo sli.robot producing a 0-1 aggregate health score, generation rules (resourceTypes: project), SLX/taskset/SLI templates, and .test infrastructure.

Deviations from Design Spec

  • Added an in-repo sli.robot (per SLI authoring guidance for health bundles) in addition to the bundled SLI template.
  • identify_quotas_above_threshold.sh prefers the authoritative Cloud Quotas API (cloudquotas.googleapis.com) limit when available and falls back to Service Usage consumerQuotaMetrics, matching the spec's note.

Scoring

python -m scorer.score codebundles/gcp-project-quota-health → 104/104 (no critical failures).

Implements a project-wide, service-agnostic GCP quota health monitor covering
allocation quota usage vs limits, rate quota consumption and throttling events,
quotas above a configurable warning threshold, and quota rejection events from
Cloud Logging. Includes an in-repo SLI, generation rules, templates, and test
infrastructure. Addresses issue #184.
@rw-codebundle-agent
rw-codebundle-agent Bot requested a review from a team as a code owner August 14, 2026 11:03
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.

0 participants