Skip to content

feat(sdk): regen — graph /metrics + /usage rename, instance resources#147

Merged
jfrench9 merged 1 commit into
mainfrom
feature/sdk-regen-metrics-usage
Jul 26, 2026
Merged

feat(sdk): regen — graph /metrics + /usage rename, instance resources#147
jfrench9 merged 1 commit into
mainfrom
feature/sdk-regen-metrics-usage

Conversation

@jfrench9

Copy link
Copy Markdown
Member

Summary

Regenerates the SDK against the backend refactor/analytics-to-usage branch, picking up the graph endpoint rename and the new instance-resource fields on the health response.

Important

Merge after the backend PR. These routes do not exist on main yet — merging this first would ship a client pointing at 404s.

Changes

Endpoint rename (backend P0)

Before After
/v1/graphs/{graph_id}/analytics /v1/graphs/{graph_id}/metrics
/v1/graphs/{graph_id}/analytics/usage /v1/graphs/{graph_id}/usage
  • get_graph_metrics keeps its name — only its URL moved, so callers are unaffected.
  • get_graph_usage_analyticsget_graph_usage (git records it as a 98% rename). It had no consumers.

Instance resources on DatabaseHealthResponse

  • New: cpu_usage_percent, memory_usage_percent, resource_status (idle / busy / constrained).
  • memory_usage_mb is now actually populated — it had been declared and hardcoded None server-side.
  • All four are returned only for dedicated single-tenant instances and are null on shared repositories, so treat them as optional at every call site.

Upstream catch-up (already merged server-side, not part of this initiative)

  • Line growth: LineGrowthLite, LineGrowthLiteValuesByPeriod, LineGrowthRequest, LineGrowthRequestValuesByPeriodType0
  • ForecastMechanics, CreateForecastRequest, UpdateForecastRequest, BackfillPlanHistoryOperation

Testing

just test-all — ruff check, ruff format, basedpyright 0 errors, 439 passed / 17 skipped: all green.

Pure regen output — no hand edits. Version bump / release handled separately by the publish flow.

Picks up the graph endpoint rename (robosystems #P0):

  /v1/graphs/{graph_id}/analytics       -> /v1/graphs/{graph_id}/metrics
  /v1/graphs/{graph_id}/analytics/usage -> /v1/graphs/{graph_id}/usage

get_graph_metrics keeps its name — only its URL moved — so callers are
unaffected. get_graph_usage_analytics is renamed get_graph_usage; it had
no consumers.

DatabaseHealthResponse gains cpu_usage_percent, memory_usage_percent and
resource_status, and memory_usage_mb is now actually populated. All four
are only returned for dedicated single-tenant instances and are null on
shared repositories, so treat them as optional at every call site.

Also catches up on API surface already merged upstream: line growth
request/response models, forecast mechanics, and plan-history backfill.
@jfrench9
jfrench9 merged commit 5b9f14d into main Jul 26, 2026
1 check passed
@jfrench9
jfrench9 deleted the feature/sdk-regen-metrics-usage branch July 26, 2026 06:40
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.

1 participant