feat(gui): add the per-user warehouse API client - #7820
Open
mengw15 wants to merge 2 commits into
Open
Conversation
The HTTP client for the warehouse endpoints (apache#6932) plus the actions service that will own create and delete for both the dashboard tab and the workspace picker, mirroring ComputingUnitActionsService: the delete confirmation and its wording live in one place, and the dialog stays busy until the request settles — deleting a warehouse that holds data waits out Lakekeeper's asynchronous purge (apache#7742). First of three parts of the warehouse dashboard tab (apache#6933); nothing renders it yet.
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the frontend client and shared action layer for per-user warehouse management.
Changes:
- Defines warehouse API wire types.
- Adds status, create, and delete HTTP operations.
- Adds confirmation, notifications, and tests for warehouse deletion.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
frontend/src/app/common/type/warehouse.ts |
Defines warehouse response types. |
frontend/src/app/common/service/warehouse/warehouse.service.ts |
Implements warehouse HTTP endpoints. |
frontend/src/app/common/service/warehouse/warehouse.service.spec.ts |
Tests HTTP methods, URLs, and payloads. |
frontend/src/app/common/service/warehouse/warehouse-actions.service.ts |
Centralizes create and confirmed deletion actions. |
frontend/src/app/common/service/warehouse/warehouse-actions.service.spec.ts |
Tests confirmation and deletion behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The error handler was chained after the success handler, so a throw from the caller's refresh callback landed in it: the user saw both "Warehouse deleted." and "Failed to delete warehouse" for a delete that succeeded. Two callbacks instead of a chain keep the failure branch to the request.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7820 +/- ##
============================================
- Coverage 91.50% 91.50% -0.01%
Complexity 4501 4501
============================================
Files 1177 1179 +2
Lines 47489 47512 +23
Branches 5324 5326 +2
============================================
+ Hits 43457 43478 +21
- Misses 2366 2367 +1
- Partials 1666 1667 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
The client half of the warehouse dashboard tab: the HTTP client for the warehouse endpoints and the actions service that owns create and delete on top of it. No UI renders any of this yet — it is the first of three parts of #6933, split so each lands as one reviewable change.
DashboardWarehouse/WarehouseStatus— the wire types, mirroring whatWarehouseResourcereturns: the display name, the id-derived Lakekeeper catalog name ([BYO-S3] Decouple the Lakekeeper warehouse name from the user-facing name #7753), flavor, creation time, and the owner fields ([BYO-S3] Expose the warehouse owner in DashboardWarehouse #7743), which are nullable because a user need not have set a name or an avatar.WarehouseService—GET /warehouse/status,POST /warehouse,DELETE /warehouse/{whid}. The status call answers both questions the UI has in one round trip: whether the deployment enables the feature, and which warehouses the caller owns.WarehouseActionsService— mirrorsComputingUnitActionsService: create and delete sit behind one service so the confirm dialog and its wording live in one place, shared by the dashboard tab and, later, the workspace picker ([BYO-S3] Frontend: on-canvas per-execution warehouse picker #7817). Its delete keeps the dialog busy until the request settles, because deleting a warehouse that holds data waits out Lakekeeper's asynchronous purge ([BYO-S3] Warehouse deletion should wait out Lakekeeper's asynchronous purge instead of failing with 409 #7742) — seconds, not milliseconds — and closing the dialog eagerly would read as a frozen row.With the per-user warehouse flag off, which is every deployment today, nothing calls any of this.
Any related issues, documentation, discussions?
Part of #6933 (first of three: API client, then the dialogs and row card, then the page that assembles them). Part of #6870, and consumes the merged backend: the endpoints (#6932), the owner fields (#7743), the id-derived catalog name (#7753) and the purge-aware delete (#7742).
How was this PR tested?
yarn test:cing test --watch=false --include "src/app/common/service/warehouse/*.spec.ts"Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (claude-opus-5, claude-fable-5)