Skip to content

feat(integrations): Google Cloud connectors (project, folder, organization) and setup script - #1321

Open
JeremyFunk wants to merge 31 commits into
mainfrom
feat/gcp-connector-api
Open

JeremyFunk wants to merge 31 commits into
mainfrom
feat/gcp-connector-api

Merge origin/main into feat/gcp-connector-api

666e58e
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 16, 2026 in 3m 46s

Confidence 8/10 · No issues found

🟢 Confidence 8/10 · likely safe to merge
Connector lifecycle, org-admin gates and the generated scripts are exercised end to end by bash-executed tests; the only defect I can stand behind is the vacuous secret assertion left open below.
quality 98/100 · 1 note · tests covered · risk medium · 5/5 new units observable · 1 file not read

Adds the Google Cloud connector backend: an org-scoped connector per project, folder or organization, its encrypted push secret, and the converging gcloud setup and cleanup scripts, behind admin-only v2 endpoints. The lifecycle, org scoping and the scripts are covered; safe to merge.

  • GcpConnectorService inserts one connector per org+scope and stores a maple_gcp_… secret encrypted and hash-indexed
  • renderGcpSetupScript / renderGcpCleanupScript build converging, paste-safe gcloud scripts
  • New /v2/integrations/gcp group: status for members, admin-only create/update/scripts/delete
  • gcp_connectors table, migration and OrgId-scoped table registration

Before merge

Still open from earlier reviews

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
packages/backend/src/services/integrations/GcpConnectorService.ts 192 GcpConnectorService.status 189/day, 0.0% err
GcpConnectorService.scripts 3/day, 0.0% err
packages/domain/src/http/v2/integrations-gcp.ts 189 GET /v2/integrations/gcp 189/day, 0.0% err
Telemetry this change adds and removes (3)
  • ➕ span name GcpConnectorService.create · packages/backend/src/services/integrations/GcpConnectorService.ts:192
  • ➕ span name GcpConnectorService.update · packages/backend/src/services/integrations/GcpConnectorService.ts:242
  • ➕ span name GcpConnectorService.delete · packages/backend/src/services/integrations/GcpConnectorService.ts:329
What was checked
  • A disabled API on the removal path stops the script instead of reading as "gone" (setup-scripts.ts:216, remains)
  • A connector with metrics on but no MAPLE_GCP_SERVICE_ACCOUNT_EMAIL asks for no metrics permissions, sets up and removes nothing (setup-scripts.ts:824-828, test setup-scripts.test.ts:1037)
  • Omitted PATCH flags keep the other capability on under a row lock (GcpConnectorService.ts:264); a duplicate scope returns 409 through onConflictDoNothing(...).returning() (`GcpConnectorService.ts:…
Observability coverage: 5 of 5 changes observable
Change Kind Observable Evidence
POST /v2/integrations/gcp/connectors (createConnector) inbound HTTP + DB write yes http.route/http.request.method spans live on maple-api; Effect.fn("GcpConnectorService.create"); effect-orm db.* attributes live
PATCH /v2/integrations/gcp/connectors/:id (updateConnector) inbound HTTP + DB write yes same HTTP instrumentation; Effect.fn("GcpConnectorService.update")
POST /v2/integrations/gcp/connectors/:id/setup_scripts (setupScripts) inbound HTTP + DB read yes kickoff production facts: GcpConnectorService.scripts spans on maple-api, ~3/day, p95 65 ms
DELETE /v2/integrations/gcp/connectors/:id (deleteConnector) inbound HTTP + DB delete yes same HTTP instrumentation; Effect.fn("GcpConnectorService.delete")
GET /v2/integrations/gcp (status) inbound HTTP + DB read yes kickoff production facts: GcpConnectorService.status spans, ~189/day, 0.0% errors
Files not reviewed (1)

The review ended before it read these diffs, so nothing above vouches for them.

  • packages/backend/src/services/integrations/gcp/setup-scripts.test.ts

666e58e · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.