Skip to content

feat(sdk): create a service built from a repository, with the Dockerfile that builds it - #12

Merged
dada-sudo merged 1 commit into
mainfrom
feat/repository-service-with-dockerfile
Nov 12, 2026
Merged

dada-sudo merged 1 commit into
mainfrom
feat/repository-service-with-dockerfile

Conversation

@dada-sudo

Copy link
Copy Markdown
Contributor

Why

createService took an upload source only. A second service of a project, such as the dashboard of a DMS next to its API, could not be created from the repository the project already builds; it had to be uploaded by hand.

The server accepts a repository source at creation, and AntelopeJS/cloud#647 adds the Dockerfile a repository service builds with (dockerfilePath). This brings both to the public contract.

What

  • createService takes NewService: an upload source as before, or { type: "repository", repository, branch?, dockerfilePath? }. NewUploadService stays exported, and NewRepositoryService is added.
  • setServiceDockerfile(serviceId, path | null): PUT /api/cloud/services/{serviceId}/source-dockerfile. Null goes back to the root Dockerfile or a recipe.
  • readServiceSettings returns source (type, repository, dockerfilePath).
  • The new schemas and the operation live in sdk/openapi/services.yaml; the root spec gets smaller.

Order

The setter and dockerfilePath need AntelopeJS/cloud#647 on the API they are called against. Merging this publishes nothing; the release that carries it should follow the release of #647. Until then the setter answers 404 and a dockerfilePath at creation is ignored by the server.

Tests

sdk/test/services.test.ts: a repository service is created with its repository and Dockerfile and answers its id; an upload service is created as before; the Dockerfile is put at the encoded service path, null included, and an empty answer is accepted; the two refusals come back as CloudApiError with their code. 50 tests pass; the CLI type-checks against the new body.

…ile that builds it

createService took an upload source only, so a second service of a project
(a dashboard next to its API) could not be created from the repository the
project builds. It now takes a repository source too, with an optional
dockerfilePath, and setServiceDockerfile names or clears that Dockerfile on
an existing service. The service settings read returns the source with its
dockerfilePath.

NewUploadService stays exported; NewService is the body createService takes.

Co-Authored-By: Claude <noreply@anthropic.com>
@dada-sudo
dada-sudo merged commit 7efb4ea into main Nov 12, 2026
8 checks passed
@dada-sudo
dada-sudo deleted the feat/repository-service-with-dockerfile branch November 12, 2026 11:52
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