mengw15 opened a new pull request, #7745:
URL: https://github.com/apache/texera/pull/7745

   ### What changes were proposed in this PR?
   
   `GET /warehouse/status` returns `DashboardWarehouse(whid, name, 
warehouseName, flavor, createdAtMillis)` with no owner information, so the 
warehouse dashboard tab and picker (#6933) can only render the owner avatar 
from the currently signed-in user. That is correct only while warehouses are 
strictly per-user, and would show the wrong person as soon as warehouses can be 
shared. Computing units already model this properly: 
`DashboardWorkflowComputingUnit` carries `ownerName` / `ownerAvatar` resolved 
per entry.
   
   - Add `ownerName` and `ownerAvatar` to `DashboardWarehouse`, mirroring the 
computing-unit semantics: resolved from the user table per entry, **null** when 
the user has no name or avatar set.
   - Resolution is batched over the distinct owner uids of a listing (one query 
per request) — today every entry belongs to the caller, but the shape is ready 
for shared warehouses, which is the point of the change.
   - Both mapping paths are wired: the `status()` listing and the `create()` 
response.
   - Frontend is deliberately untouched: the tab/picker PR (#7536) is still 
open and can bind to the new fields directly.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7743. Part of #6870, follow-up to #6932; mirrors 
`DashboardWorkflowComputingUnit`'s owner fields.
   
   ### How was this PR tested?
   
   - `WarehouseResourceSpec` (embedded Postgres + stubbed `LakekeeperClient`, 
no external infra) asserts the fields on both mapping paths: `create` returns 
the caller's `ownerName` with a **null** `ownerAvatar` for the avatar-less 
fixture user, and `status` resolves another user's name and avatar per entry.
   - **Teeth verified**: temporarily breaking the owner resolution turns 
exactly the two owner assertions red (both mapping paths), confirming the tests 
catch a regression rather than passing vacuously.
   - Full spec run locally: 11/11 passed; 
`WorkflowExecutionService/scalafmtCheck` (main + Test) passes.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-opus-4-8)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to