Skip to content

feat: uninstall app v3 endpoint - #4759

Merged
borosr merged 2 commits into
mainfrom
feat/v3-app-uninstall
Jul 21, 2026
Merged

borosr merged 2 commits into
mainfrom
feat/v3-app-uninstall

Conversation

@borosr

@borosr borosr commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Notes for reviewer

Summary by CodeRabbit

  • New Features
    • Added app uninstallation by ID via DELETE /openmeter/apps/{appId} across the server and API clients.
    • Successful uninstalls return 204 No Content; subsequent reads show the app as deleted.
    • Uninstall is blocked if the app is referenced by billing profiles (404 Not Found for missing apps).
  • Documentation
    • Updated API/client Apps operation references to include the new uninstall endpoint.
  • Tests
    • Added end-to-end coverage for uninstall, status codes, and post-uninstall soft-delete behavior.
  • Breaking Change
    • The JavaScript SDK no longer exposes a public apps surface; uninstall is available through the internal client.

Greptile Summary

This PR adds app uninstall support to the v3 API. The main changes are:

  • A new DELETE /openmeter/apps/{appId} operation.
  • Server routing, handler logic, and error mapping for uninstall requests.
  • Generated Go and JavaScript SDK support.
  • End-to-end tests for soft deletion, missing apps, and billing-profile references.

Confidence Score: 5/5

This looks safe to merge.

  • No additional blocking issue was found in the updated code.
  • The remaining URL path concern is already covered by the existing review finding.

Important Files Changed

Filename Overview
api/spec/packages/aip/src/apps/operations.tsp Defines the internal app uninstall operation and its API responses.
api/v3/client/apps.go Adds the generated Go SDK uninstall request.
api/v3/handlers/apps/uninstall_app.go Implements the server-side uninstall handler.
e2e/apps_v3_test.go Covers successful uninstall, soft deletion, missing apps, and referenced apps.

Reviews (4): Last reviewed commit: "fix: add missing extensions" | Re-trigger Greptile

Context used (3)

  • Context used - CLAUDE.md (source)
  • Context used - AGENTS.md (source)
  • Context used - api/spec/AGENTS.md (source)

@borosr
borosr requested a review from a team as a code owner July 21, 2026 09:45
@borosr
borosr requested review from rolosp and tothandras July 21, 2026 09:45
@borosr borosr self-assigned this Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request adds app uninstallation through the API specification, generated bindings, v3 server handlers, JavaScript and Go clients, documentation, and end-to-end coverage for soft-delete behavior.

Changes

App uninstall

Layer / File(s) Summary
API contract and generated bindings
api/spec/packages/aip/src/apps/operations.tsp, api/spec/packages/aip-client-javascript/src/models/*, api/v3/api.gen.go
Defines DELETE /openmeter/apps/{appId}, adds request and path validation types, marks app operations internal/private, and generates server interfaces, routing, middleware, and Swagger updates.
Uninstall handler flow
api/v3/handlers/apps/*, api/v3/server/routes.go
Maps appId, checks billing-profile usage, invokes app uninstallation, encodes not-found errors, and returns 204 No Content on success.
Client SDK support
api/spec/packages/aip-client-javascript/src/{funcs,sdk,models}/*, api/v3/client/apps.go, api/v3/client/README.md
Adds uninstall methods to the JavaScript internal SDK and Go client, with endpoint documentation.
JavaScript SDK surface adjustment
api/spec/packages/aip-client-javascript/src/{index.ts,sdk/sdk.ts,sdk/internal.ts}, api/spec/packages/aip-client-javascript/README.md
Removes the customer-facing Apps surface and exposes app operations under client.internal.apps.
End-to-end uninstall validation
e2e/apps_v3_test.go
Verifies successful uninstall and subsequent retrieval of the soft-deleted app.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant V3Server
  participant AppsHandler
  participant BillingService
  participant AppService
  Client->>V3Server: DELETE /openmeter/apps/{appId}
  V3Server->>AppsHandler: Dispatch uninstall request
  AppsHandler->>BillingService: Check whether app is used
  BillingService-->>AppsHandler: Usage result
  AppsHandler->>AppService: Uninstall app
  AppService-->>AppsHandler: Completion or error
  AppsHandler-->>V3Server: 204 or encoded error
  V3Server-->>Client: HTTP response
Loading

Suggested labels: kind/feature, area/product-catalog

Suggested reviewers: rolosp, chrisgacsal, tothandras

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding an app uninstall v3 endpoint.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/v3-app-uninstall

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.

Comment thread api/v3/client/apps.go Resolved
@borosr
borosr force-pushed the feat/v3-app-uninstall branch from d4a20fe to 2cd9cac Compare July 21, 2026 09:51
@borosr borosr added the release-note/feature Release note: Exciting New Features label Jul 21, 2026
@borosr
borosr force-pushed the feat/v3-app-uninstall branch from 2cd9cac to e551b93 Compare July 21, 2026 10:49
@borosr
borosr enabled auto-merge (squash) July 21, 2026 10:49
tothandras
tothandras previously approved these changes Jul 21, 2026
@tothandras
tothandras disabled auto-merge July 21, 2026 10:54
@borosr
borosr enabled auto-merge (squash) July 21, 2026 11:00
@borosr
borosr requested a review from tothandras July 21, 2026 11:04
@borosr
borosr merged commit 59287dd into main Jul 21, 2026
29 of 30 checks passed
@borosr
borosr deleted the feat/v3-app-uninstall branch July 21, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api release-note/feature Release note: Exciting New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants