feat(integrations): add the Render adapter for deploys, service events, and bandwidth

オープン
#425 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
18/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
nextjs, playwright, typescript
領域
api, backend

調査の方向性

Start with plan step 1: the issue is blocked until Render answers whether a DevMacro OAuth client with read-only access is possible, and Eddie decides the connection path — read the three comments before anything else. If unblocked, read docs/adapters.md ("Register the provider") and an existing adapter under src/lib/adapters/ next to types.ts and registry.ts, then build src/lib/adapters/render/ against sanitized fixtures. Done means deploys and bandwidth show on the dashboard, tokens refresh and revoke correctly, and e2e/render.spec.ts plus e2e/docs.spec.ts pass alongside npm run lint, typecheck, test.

索引モデルが issue の本文から書いたものです。

説明

area: integrations blocked enhancement impact: medium priority: P1 size: M

Context

Requested by a potential user: Render (https://render.com) as a hosting platform, alongside Vercel, Railway, and DigitalOcean. Eddie wants it in the MVP (2026-11-14).

Research from Render's documentation and live endpoints, checked 2026-11-14:

Question Finding Source
OAuth server Exists: authorization code flow with refresh tokens, PKCE (S256), public clients (token_endpoint_auth_methods_supported: ["none"]), a revocation endpoint, and an introspection endpoint https://api.render.com/.well-known/oauth-authorization-server
Can a third party register a client? Not documented. The metadata has no registration_endpoint and lists no scopes. An unknown client_id gets {"error":"invalid_client","error_description":"client is invalid or inactive"}; Render's own codex client gets "redirect_uri is not registered for this client". Clients are registered by Render, for its MCP plugins (Claude, Codex, Cursor) Authorize endpoint probed 2026-11-14, MCP server docs
Read-only access through OAuth Not documented. The MCP docs warn that authenticating "grants access to your workspaces and services", including changing environment variables and triggering deploys MCP server docs
Read-only access through API keys Scoped API keys (early access) can be read-only per resource, one workspace per key. The API docs say "All Render API requests require authentication via API key" Scoped API keys, Render API
Spend or invoices No endpoint. The OpenAPI spec has no billing, invoice, or cost path https://api-docs.render.com/openapi/render-public-api-1.json
Usage GET /metrics/bandwidth (bandwidth is billed above the plan's allowance), GET /metrics/instance-count Same spec
Events GET /services/{serviceId}/deploys, GET /services/{serviceId}/events, GET /events/{eventId} Same spec
Accounts GET /owners (workspaces), GET /services Same spec
Webhooks Workspace webhooks on the Pro plan or higher; Pro allows one destination URL, Scale and Enterprise up to 100. Signed with Standard Webhooks (webhook-id, webhook-timestamp, webhook-signature, HMAC SHA-256), deduplicate on webhook-id. Thin payload, details from GET /events/{eventId}. Created by a workspace admin in the dashboard, or with POST /webhooks, which needs write access to the workspace. Events include build_started, build_ended, deploy_started, deploy_ended, server_failed, autoscaling_ended Render webhooks
Blocker for an OAuth-only MVP

The MVP connects providers through OAuth only (decision on #40). Render's OAuth server works, but DevMacro cannot get a client without Render registering one, and nothing documented says an OAuth grant can be read-only. Someone has to ask Render (partnerships or support) for a DevMacro OAuth client with read-only access. That request is Eddie's, because it speaks for DevMacro to a vendor.

If Render says no, the only read-only path is a scoped API key, which needs the API key connection path planned in #49. Choosing that for the MVP reverses part of the decision on #40, so it goes to Eddie as an options table on this issue.

Plan

  1. Ask Render for an OAuth client with DevMacro's redirect URI, and ask whether a grant can be limited to read (services, deploys, monitoring). Record the answer on this issue. If the answer is no or read-only is not possible, post an options table (OAuth with full access, scoped API key through #49, or not in the MVP) and wait.
  2. Adapter in src/lib/adapters/render/: authorize with PKCE, exchange and refresh tokens, revoke through /v1/oauth/token/revoke. External account: the workspace (GET /owners).
  3. Sync: deploy events per service (deploy_succeeded and deploy_failed categories, so they count in the dashboard headline and the deployment streak in #304), service events such as server_failed and autoscaling, and bandwidth usage per service. No spend: Render exposes none, and the provider page says so.
  4. Webhooks, per #28 and the decision on #424: deploy and service events by webhook with polling as the backfill. Through the setup panel in #426 the user chooses: automatic setup, an opt-in that asks for workspace write access and creates the webhook with POST /webhooks, with the panel's warning that Render has no read-only access that can create a webhook; or setup by hand in Render's dashboard (Integrations > Webhooks, workspace admins), pasting Render's signing secret back into DevMacro. Webhooks need the Pro plan or higher, and on Pro the workspace's one webhook URL may already be in use, so automatic setup checks first and the copy says so. If the OAuth client Render issues in step 1 is not read-only, the connection already holds write access, and the panel must not claim that setup by hand keeps DevMacro read-only.
  5. Register the provider in every file listed in docs/adapters.md, "Register the provider".
  6. Provider page docs/providers/render.md from the template in docs/adapters.md.

Acceptance criteria

  • Render's answer on an OAuth client and read-only access recorded on this issue, and Eddie's choice if an options table was needed.
  • A Render connection is made through the connection path Eddie chose, with what the grant allows shown on the connect screen.
  • Deploys and service failures appear on the timeline, and successful deploys count in the dashboard headline.
  • Bandwidth usage per service appears on the dashboard with its unit, period, and retrieved-at time. No spend figure is shown.
  • Tokens refresh before expiry, disconnect revokes the token, and a revoked grant marks the connection as needing a reconnect.
  • Tested against recorded, sanitized fixtures. No live provider calls in CI.
  • Playwright e2e: e2e/render.spec.ts connects the simulated provider end to end, and e2e/docs.spec.ts covers the new provider page.

Files and areas

  • src/lib/adapters/render/ (new), src/lib/adapters/types.ts, src/lib/adapters/registry.ts, and the rest of the "Register the provider" table in docs/adapters.md.
  • docs/providers/render.md (new), docs/operations/oauth-apps.md, docs/operations/deploy.md.
  • Non-goals: logs, Postgres and Key Value data, workflows, and anything that writes to the user's Render workspace other than the webhook the user opts into in step 4.

Verification

  • npm run lint, npm run typecheck, npm test, npm run test:db
  • npx playwright test e2e/render.spec.ts e2e/docs.spec.ts

Depends on

  • Render issuing a DevMacro OAuth client (plan step 1)
  • #28 Ingest provider webhooks, and #426 the webhook setup panel (webhook half only)
  • #49 only if the API key path is chosen

Branch: <issue-number>-render-adapter
Closes with a Closes #<issue-number> footer on the commit or pull request.

Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown

主要言語
TypeScript
スター
1
フォーク
1
平均マージ
6時間 56分
マージ済み PR(30日)
136

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eddiejaoude/StackDash のほかの issue

eddiejaoude/StackDash の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。