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

   ### What changes were proposed in this PR?
   
   With per-user warehouses enabled, an execution carrying no `warehouseId` 
silently wrote into the shared default warehouse: 
`resolveLakekeeperWarehouseName` mapped `None` to `None` whenever the flag was 
on. That made "a run writes into the user's own warehouse" a UI convention 
rather than a system property — the frontend preselects a warehouse and gates 
Run on one (#7817), but nothing enforced it below that, and one path already 
violated it: agent-driven runs hardcoded `warehouseId = None`, bypassing the 
picker entirely.
   
   - **`WorkflowService.resolveLakekeeperWarehouseName`** — refuses an 
execution that names no warehouse while the feature is enabled, the same way an 
execution needs a computing unit. This is not a privilege change: an explicit 
`whid` was, and still is, checked against the caller's `uid`.
   - **The agent path** — `SyncExecutionRequest` accepts a `warehouseId`, 
`SyncExecutionResource` forwards it instead of hardcoding `None`, the agent 
service passes through what the workspace picked, and the frontend's agent 
service attaches it exactly as it attaches `computingUnitId`.
   
   With the feature off (the default) nothing changes: no pick still means the 
shared default warehouse, and an explicit pick is still refused loudly (#6930).
   
   ### Any related issues, documentation, discussions?
   
   Closes #7751. Part of #6870; the last of its Phase 0 items, on top of the 
dashboard tab (#8005) and the on-canvas picker (#8551).
   
   ### How was this PR tested?
   
   - `WorkflowServiceWarehouseSpec` covers the new requirement alongside the 
existing ownership and flag-off cases: 5 tests pass (`sbt 
'WorkflowExecutionService/testOnly *WorkflowServiceWarehouseSpec'`).
   - The frontend agent service pins the forwarded pick (87 tests in 
`agent.service.spec.ts`), and `agent-service`'s own suite passes in full (307 
tests, `bun test`).
   - Failure paths verified rather than assumed: the requirement and the 
agent-side forwarding were each removed on purpose and the suites confirmed to 
fail for the expected reason before being restored.
   - `scalafmtCheck` clean for both source sets; `prettier --check` clean for 
`agent-service`; eslint clean for the frontend files.
   
   ### 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