Skip to content

refactor(cli): move to apps implementation instead of deployments - #95

Merged
Ryank90 merged 2 commits into
feat/runserv-503-v2from
feat/runserv-563
Aug 20, 2026
Merged

refactor(cli): move to apps implementation instead of deployments#95
Ryank90 merged 2 commits into
feat/runserv-503-v2from
feat/runserv-563

Conversation

@Ryank90

@Ryank90 Ryank90 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include coderabbit-review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0157eaf3-97a4-4801-8d34-5ab5f3b27685

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the serverless CLI and internal API client to use the new “apps” resources/endpoints (replacing “deployments”), aligning CLI output, tests, and OpenAPI spec with the updated Serverless API surface.

Changes:

  • Migrates CLI commands and output payloads from deployment-based naming/endpoints to app-based (ListApps, GetApp, CreateApp, lifecycle, env vars, secrets).
  • Updates internal serverless API client methods/types and corresponding unit tests to use /v1/apps/....
  • Bumps and revises the Serverless OpenAPI spec to v0.4.0 (apps terminology, compute/gpu semantics, and related schema updates).

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/cmd/serverless/secrets.go Switches secret list/attach/detach calls from deployment APIs to app APIs.
internal/cmd/serverless/pack.go Updates comment terminology to “createApp”.
internal/cmd/serverless/open.go Renames output fields from deploymentId to appId.
internal/cmd/serverless/display.go Renames display wrappers and output structs to app-based fields (AppId, AppName, etc.).
internal/cmd/serverless/display_test.go Updates table/output tests to app-based types/fields.
internal/cmd/serverless/deploy.go Uses CreateApp/AppCreate/NewCodeAppSource; updates example and requires --gpu-type.
internal/cmd/serverless/apps.go Switches listing/showing to ListApps/GetApp and updates sort/status parsing types.
internal/cmd/serverless/apps_scale.go Switches scaling updates to UpdateApp/AppUpdate.
internal/cmd/serverless/apps_scale_test.go Updates scale patch wrapper type to AppUpdate.
internal/cmd/serverless/apps_lifecycle.go Switches stop/resume/delete lifecycle actions to app-based methods and return types.
internal/cmd/serverless/apps_env.go Switches env var list/update/delete calls to app-based endpoints and output payloads.
internal/api/serverless/secrets.go Renames secret attachment APIs to app-based (ListAppSecrets, AttachAppSecret, DetachAppSecret).
internal/api/serverless/secrets_test.go Updates secrets client tests for /v1/apps/.../secrets routes and messaging.
internal/api/serverless/log_test.go Updates redaction test JSON to use appId field.
internal/api/serverless/env.go Renames env var APIs to app-based (ListAppEnvironmentVariables, etc.).
internal/api/serverless/env_test.go Updates env var client tests for /v1/apps/.../environment-variables routes and payloads.
internal/api/serverless/client.go Renames core client types/methods from deployments to apps; updates create timeout naming; updates code-source helper.
internal/api/serverless/client_test.go Updates core client tests for apps routes/types and adds GPU type constant for create tests.
docs/runware_serverless_deploy.md Updates deploy command examples/flag description to include required --gpu-type.
api/serverless/openapi.yaml Updates API spec to v0.4.0: apps terminology, route changes, and schema/description updates.
Suppressed comments (3)

internal/api/serverless/client_test.go:396

  • This test uses dep as the variable name for a value returned by GetApp, which makes the assertions harder to read now that deployments have been renamed to apps.
	dep, err := c.GetApp(context.Background(), testAppID)

internal/api/serverless/client_test.go:473

  • The returned value from UpdateApp is stored in dep, which is leftover deployment naming. Renaming to app will better reflect the API/resource under test.
	dep, err := c.UpdateApp(context.Background(), testAppID, AppUpdate{

internal/api/serverless/client_test.go:583

  • Within the lifecycle table test, the variable name dep is a leftover from the deployments terminology; using app keeps the test consistent with the new API naming.
			dep, err := op.call(c, context.Background(), testAppID)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/api/serverless/client_test.go Outdated
@Ryank90
Ryank90 marked this pull request as ready for review August 19, 2026 16:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 21 changed files in this pull request and generated no new comments.

Suppressed comments (1)

internal/api/serverless/client_test.go:137

  • The CreateApp tests don’t currently assert that the request body includes the now-required configuration.gpuType. This makes it easy for a future refactor to accidentally omit the field without test failures (the server handler always returns 201 regardless of request body). Consider decoding the request JSON in the handler and asserting configuration.gpuType == testGPUType (and optionally appId).
func TestCreateApp(t *testing.T) {
	srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		if r.Method != http.MethodPost || r.URL.Path != "/v1/apps" {
			t.Errorf("unexpected %s %s", r.Method, r.URL.Path)
		}
		w.Header().Set("Content-Type", "application/json")
		w.WriteHeader(http.StatusCreated)

@Ryank90
Ryank90 merged commit 124c06c into rc/serverless Aug 20, 2026
5 checks passed
@Ryank90
Ryank90 deleted the feat/runserv-563 branch August 20, 2026 17:31
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.

3 participants