Skip to content

feat: add build service override state endpoint#203

Draft
vigneshrajsb wants to merge 1 commit intomainfrom
vb/add-build-service-overrides-get
Draft

feat: add build service override state endpoint#203
vigneshrajsb wants to merge 1 commit intomainfrom
vb/add-build-service-overrides-get

Conversation

@vigneshrajsb
Copy link
Copy Markdown
Contributor

@vigneshrajsb vigneshrajsb commented May 8, 2026

Summary

  • add GET /api/v2/builds/{uuid}/services for PR-comment-aligned service edit state
  • align the v2 PATCH request shape to use name instead of serviceName
  • return refreshed service edit state from PATCH, including whether redeploy was queued
  • add display-only branch/url guards for whole-form submits and update OpenAPI docs

API examples

GET current service edit state

GET /api/v2/builds/curly-meadow-171613/services
{
  "request_id": "req-123",
  "data": {
    "serviceOverrides": [
      {
        "name": "api",
        "active": true,
        "branchOrExternalUrl": "feature/api",
        "status": "deployed",
        "statusMessage": null,
        "updatedAt": "2026-05-08T12:00:00.000Z",
        "group": "default",
        "editable": true
      },
      {
        "name": "worker",
        "active": false,
        "branchOrExternalUrl": "repo/worker@latest",
        "status": "built",
        "statusMessage": "Ready",
        "updatedAt": "2026-05-08T12:05:00.000Z",
        "group": "optional",
        "editable": false
      }
    ]
  },
  "error": null
}

PATCH updated service edit state

PATCH /api/v2/builds/curly-meadow-171613/services
Content-Type: application/json
{
  "serviceOverrides": [
    {
      "name": "api",
      "active": true,
      "branchOrExternalUrl": "feature/api-v2"
    },
    {
      "name": "worker",
      "active": true,
      "branchOrExternalUrl": "repo/worker@latest"
    }
  ]
}
{
  "request_id": "req-123",
  "data": {
    "serviceOverrides": [
      {
        "name": "api",
        "active": true,
        "branchOrExternalUrl": "feature/api-v2",
        "status": "deployed",
        "statusMessage": null,
        "updatedAt": "2026-05-08T12:10:00.000Z",
        "group": "default",
        "editable": true
      },
      {
        "name": "worker",
        "active": true,
        "branchOrExternalUrl": "repo/worker@latest",
        "status": "built",
        "statusMessage": "Ready",
        "updatedAt": "2026-05-08T12:10:00.000Z",
        "group": "optional",
        "editable": false
      }
    ],
    "queued": true
  },
  "error": null
}

Validation

  • pnpm test -- src/server/services/__tests__/override.test.ts src/shared/openApiSpec.test.ts
  • pnpm run lint
  • git diff --check

Notes

  • Full pnpm test was attempted but this workspace is missing DATABASE_URL/DB config required by unrelated suites.
  • Full pnpm run ts-check was attempted; repo-wide pre-existing TypeScript errors remain, while touched-file filtered output was clean.

@vigneshrajsb vigneshrajsb changed the title [codex] Add build service override state endpoint feat: add build service override state endpoint May 8, 2026
@vigneshrajsb vigneshrajsb force-pushed the vb/add-build-service-overrides-get branch from c95da2b to bc96484 Compare May 8, 2026 19:08
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