Skip to content

fix(serverless): log debug path from the HTTP request - #93

Merged
Ryank90 merged 1 commit into
fix/env-redact-stackfrom
fix/log-request-path
Aug 19, 2026
Merged

fix(serverless): log debug path from the HTTP request#93
Ryank90 merged 1 commit into
fix/env-redact-stackfrom
fix/log-request-path

Conversation

@Ryank90

@Ryank90 Ryank90 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • --debug path/status now come from the generated client's HTTPResponse (Request.URL.Path) instead of duplicated OpenAPI path literals in each wrapper.
  • Addresses the nit on feat(builds): implement builds list and show methods #86 without rebasing the builds PR or the rest of the stack.
  • Stacked on fix/env-redact-stack so logResponse already exists.

Test plan

  • go test -race ./internal/api/serverless/
  • make lint
  • Confirm --debug still prints the request path after a list/show call

Made with Cursor

@coderabbitai

coderabbitai Bot commented Aug 18, 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: 8b2dae64-23d5-4e9b-b263-f4c194bb7d96

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

This pull request updates serverless client debug logging so the request path and status are derived from the generated OpenAPI client’s HTTPResponse (specifically Request.URL.Path), removing duplicated hard-coded path literals across wrapper methods and keeping debug output aligned with future OpenAPI regenerations.

Changes:

  • Refactors logResponse to accept *http.Response and derive (path, status) via a helper.
  • Updates serverless wrapper methods to pass resp.HTTPResponse into logResponse.
  • Adds unit tests to validate path/status extraction behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/api/serverless/log.go Changes logResponse signature to take *http.Response and adds responsePathStatus helper.
internal/api/serverless/log_test.go Updates existing logging test and adds coverage for responsePathStatus.
internal/api/serverless/client.go Switches debug logging calls to use resp.HTTPResponse instead of hard-coded paths.
internal/api/serverless/env.go Switches debug logging calls to use resp.HTTPResponse instead of hard-coded paths.
internal/api/serverless/secrets.go Switches debug logging calls to use resp.HTTPResponse instead of hard-coded paths (still nil body).

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

Duplicated OpenAPI path literals in wrappers would drift on a deployments/apps rename. Take path and status from the generated client's HTTPResponse instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Ryank90
Ryank90 merged commit ba3853f into rc/serverless Aug 19, 2026
4 checks passed
@Ryank90
Ryank90 deleted the fix/log-request-path branch August 19, 2026 09:11
Ryank90 added a commit that referenced this pull request Aug 20, 2026
## Summary
- Implement `runware serverless apps stop|resume|delete` against
`stopDeployment`, `resumeDeployment`, and `deleteDeployment` (202
accepted, no wait/poll).
- Print the updated deployment (table/json/yaml). Delete prompts unless
`--yes`/`--force`; missing API key fails before the prompt.
- Stacked on #93 (`fix/log-request-path`). `feat/runserv-503` still sits
on the pre-force-push tip and should not be used.

## Test plan
- [ ] `go test -race ./internal/api/serverless/
./internal/cmd/serverless/`
- [ ] `make lint`
- [ ] Manual on a disposable app: `stop` → `show` until stopped →
`resume` → `show` until active → `delete --yes`
- [ ] Confirm 409 on stop when not active / resume when not stopped, 404
on unknown id, delete prompt on a TTY


Made with [Cursor](https://cursor.com)
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