Skip to content

feat(gui): add the per-user warehouse API client - #7820

Open
mengw15 wants to merge 2 commits into
apache:mainfrom
mengw15:feat/warehouse-api-client
Open

feat(gui): add the per-user warehouse API client#7820
mengw15 wants to merge 2 commits into
apache:mainfrom
mengw15:feat/warehouse-api-client

Conversation

@mengw15

@mengw15 mengw15 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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.

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?

  • Vitest specs for both services: the three endpoints and their URLs, the confirm dialog's shape, that nothing is deleted before confirmation, that the dialog stays busy until the request settles, and that a failure is reported without running the caller's refresh callback. 7 tests across 2 files.
    • Whole suite as CI runs it: yarn test:ci
    • Just this change: ng test --watch=false --include "src/app/common/service/warehouse/*.spec.ts"
  • Failure paths verified rather than assumed: each behaviour was broken on purpose and the suite confirmed to fail for the expected reason before being restored.
  • Exercised end to end against a local deployment with the flag on, backed by live Lakekeeper and MinIO: create, list, and delete, including a warehouse holding execution data.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-5, claude-fable-5)

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.
@github-actions github-actions Bot added feature frontend Changes related to the frontend GUI labels Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@mengw15
mengw15 requested a balanced review from Copilot August 21, 2026 20:51
@mengw15
mengw15 requested a review from kunwp1 August 21, 2026 20:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.50%. Comparing base (2edbdf9) to head (7feea1f).

Files with missing lines Patch % Lines
...mon/service/warehouse/warehouse-actions.service.ts 92.85% 1 Missing ⚠️
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     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 2b35d4e
agent-service 98.62% <ø> (ø) Carriedforward from 2b35d4e
amber 88.04% <ø> (ø) Carriedforward from 2b35d4e
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 2b35d4e
config-service 86.73% <ø> (ø) Carriedforward from 2b35d4e
file-service 75.74% <ø> (ø) Carriedforward from 2b35d4e
frontend 93.24% <95.65%> (-0.01%) ⬇️
notebook-migration-service 79.13% <ø> (ø) Carriedforward from 2b35d4e
pyamber 97.57% <ø> (ø) Carriedforward from 2b35d4e
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 2b35d4e

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants