Skip to content

Add gcp-cloudrun-utilization-health CodeBundle - #720

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

Add gcp-cloudrun-utilization-health CodeBundle#720
rw-codebundle-agent[bot] wants to merge 1 commit into
mainfrom
codebundle/gcp-cloudrun-utilization-health

Conversation

@rw-codebundle-agent

Copy link
Copy Markdown
Contributor

Closes #155

Summary

Adds the gcp-cloudrun-utilization-health CodeBundle to rw-cli-codecollection. It monitors resource utilization and scaling configuration of GCP Cloud Run services per project, flagging over-provisioned (under-utilized), over-utilized, and improperly scaled services, and captures a utilization/scaling report for LLM-based cost and sizing review.

Tasks

  • Check Cloud Run Service CPU Utilizationcheck_cpu_utilization.sh, flags services at/above CPU threshold (sev 3), data:metrics
  • Check Cloud Run Service Memory Utilizationcheck_memory_utilization.sh, flags OOM risk (sev 3), data:metrics
  • Check Request Concurrency and Instance Scalingcheck_concurrency_scaling.sh, flags unbounded max instances (sev 3), low concurrency and idle-warming min-instances (sev 2), data:config
  • Identify Under-Utilized Servicesfind_underutilized_services.sh, flags idle/over-provisioned services (sev 2), data:metrics
  • Report Utilization and Scaling Configurationcapture_utilization_report.sh, captures metrics+config for LLM review (no issues)

SLI

In-repo sli.robot produces a binary 0-1 health score across CPU, memory, and scaling dimensions (pushed as sub-metrics with raw issue counts) with the aggregate pushed as the primary metric. Generation rules include - type: sli and a *-sli.yaml template is provided.

Verification

  • Scorer: 104/104 (PASS), no critical failures
  • Bash scripts validated (bash -n) and logic unit-tested against mocked gcloud/Cloud Monitoring responses
  • Test infra (.test/): Taskfile + Terraform fixtures

Deviations from the design spec

  • Resource type: spec lists gcp_cloud_run_service; used gcp_run_services (the CloudQuery table name used by the collection indexer) so discovery matches.
  • CPU task scope: over-utilization is handled by the CPU task and under-utilization by the dedicated under-utilized task to avoid duplicate issue generation, matching the spec's expected test-scenario issue counts.

Monitors GCP Cloud Run utilization and scaling health per project:
over-utilized CPU/memory, unbounded max instances, low concurrency,
idle-warming min-instances, and under-utilized services, plus a
utilization report for LLM cost/sizing review.

Addresses issue #155 (design-spec: gcp-cloudrun-utilization-health).
@rw-codebundle-agent
rw-codebundle-agent Bot requested a review from a team as a code owner August 7, 2026 06:04
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.

[Codebundle] Run AWS Lambda

0 participants