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

   ### What changes were proposed in this PR?
   
   The workspace-side half of per-user warehouses (#6870): a warehouse picker 
on the canvas, beside the computing-unit selector it mirrors, choosing which 
warehouse the next execution writes to.
   
   - **The picker** (inside `ComputingUnitSelectionComponent`, like the 
computing-unit dropdown it sits beside) — shown only while the deployment 
enables the feature; each entry carries the owner avatar and a per-row delete, 
plus a create entry opening the shared create dialog. The list refreshes on 
every dropdown open, and preselection picks the latest execution's warehouse, 
falling back to the user's first one — so a run needs no explicit pick. A 
status failure clears the pick rather than letting a stale id ride the next 
request.
   - **Run gating** — with the feature enabled, every execution must have a 
warehouse: while none is selected the Run button becomes "Create Warehouse" and 
leads to the create dialog, the same shape as the Connect flow. (The 
backend-side requirement follows separately — #7751 stays the tracker.)
   - **The request** — the picked `warehouseId` rides the execute request 
(`ExecuteWorkflowService` reads the pick from `WarehouseService`, where it 
lives); executions expose `whId` so the preselect can read the latest run's 
warehouse.
   
   Flag off (the default): the picker never renders, the Run button is 
untouched, and requests carry no warehouseId — no user-visible change.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7817. Part of #6870, on top of the dashboard tab (#8005); the 
backend enforcement (#7751) follows.
   
   ### How was this PR tested?
   
   - 20 new Vitest tests: 15 on the picker (preselect from the latest 
execution, first-warehouse fallback, disabled/failed states clearing the pick, 
manual pick surviving refreshes, create/delete flows, dropdown rendering), 3 on 
the Run gating, 1 pinning `warehouseId` on the execute request, 1 on the 
selection state. One pre-existing assertion modernized: the remembered-unit 
test asserted the latest-execution lookup's absence, which the warehouse 
preselect now legitimately performs — it asserts the unit choice directly 
instead.
   - The affected suites pass in full: 5083 tests across the workspace and 
dashboard trees.
   - Failure paths verified rather than assumed: the preselect, the Run gating, 
and the request field were each broken on purpose and the suite confirmed to 
fail for the expected reason before being restored.
   - Screenshots/video from a local flag-on deployment follow in the comments.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-opus-5, claude-fable-5)
   


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