feat(builds): implement builds list and show methods - #86
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Pull request overview
Adds support in the Runware CLI for inspecting serverless application builds by wiring new apps builds commands to newly exposed Serverless API endpoints, plus display helpers and docs.
Changes:
- Introduces
runware serverless apps builds listandrunware serverless apps builds show, including table/JSON/YAML rendering and optional log-tail printing. - Extends the serverless API client with
ListBuildsandGetBuild, with corresponding unit tests. - Updates generated command reference docs to include the new builds command group.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/cmd/serverless/display.go | Adds build/builds table renderers and optional int formatting for exit codes. |
| internal/cmd/serverless/display_test.go | Adds tests ensuring build tables omit log columns and render nil optional fields as empty. |
| internal/cmd/serverless/apps.go | Registers the new apps builds command group under serverless apps. |
| internal/cmd/serverless/apps_builds.go | Implements CLI commands for listing/showing builds and printing log tail for table output. |
| internal/api/serverless/client.go | Adds ListBuilds/GetBuild wrappers around generated OpenAPI client calls. |
| internal/api/serverless/client_test.go | Adds unit tests for the new builds endpoints (success, not-found, no-api-key). |
| docs/runware_serverless_apps.md | Links the new builds command group in the apps command docs. |
| docs/runware_serverless_apps_builds.md | Adds docs page for apps builds group. |
| docs/runware_serverless_apps_builds_list.md | Adds docs page for apps builds list. |
| docs/runware_serverless_apps_builds_show.md | Adds docs page for apps builds show. |
Suppressed comments (1)
internal/cmd/serverless/apps_builds.go:122
- To keep table output and the appended log tail on the same stream, write to
os.Stdout(which is whatoutput.Printuses) rather thancmd.OutOrStdout().
_, err := fmt.Fprintf(cmd.OutOrStdout(), "\nLog tail:\n%s\n", *b.LogTail)
return err
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| if c.logger != nil && c.logger.Enabled(ctx, slog.LevelDebug) { | ||
| c.logger.Debug("serverless response", //nolint:errcheck,gosec | ||
| "path", "/v1/deployments/"+deploymentID+"/builds", |
There was a problem hiding this comment.
nitpick: a path literal here will be brittle to upstream changes (e.g. like the big deployments/app rename)
There was a problem hiding this comment.
Leaving this PR as-is so we don't rebase the stack.
Follow-up at the tip: #93 — logResponse now takes the generated client's HTTPResponse and logs Request.URL.Path, so a deployments/apps rename tracks OpenAPI regen instead of duplicated literals.
e45778d to
4420369
Compare
Implements the serverless builds list and show endpoints