mengw15 commented on code in PR #8586:
URL: https://github.com/apache/texera/pull/8586#discussion_r4044230176
##########
frontend/src/app/workspace/service/agent/agent.service.ts:
##########
@@ -666,6 +668,12 @@ export class AgentService {
if (selectedUnit) {
body.computingUnitId = selectedUnit.computingUnit.cuid;
}
+ // Same for the warehouse the user picked: agent runs write into it
rather than
+ // shared storage, which the backend requires while the feature is on
(#7751).
+ const selectedWarehouseId =
this.warehouseService.getSelectedWarehouseIdValue();
+ if (selectedWarehouseId !== undefined) {
+ body.warehouseId = selectedWarehouseId;
Review Comment:
Good catch — fixed the whole chain: `CreateAgentRequest` and
`AgentDelegateConfig` carry the field, the handler destructures it, the Elysia
body schema accepts it (it rejects unknown properties, so the field never
survived validation before), and `setDelegateConfig` forwards it. One more gap
surfaced while testing: `getAgentInfo`'s delegate projection omitted it too.
Covered by a test that drives a `warehouseId` through the HTTP endpoint and
asserts it reaches the delegate config.
##########
agent-service/src/agent/texera-agent.ts:
##########
@@ -185,6 +186,7 @@ export class TexeraAgent {
userToken: this.delegateConfig.userToken,
workflowId: this.delegateConfig.workflowId,
computingUnitId: this.delegateConfig.computingUnitId,
+ warehouseId: this.delegateConfig.warehouseId,
Review Comment:
Fixed with the same change as the thread above: the create path now carries
`warehouseId` end to end (request type, body schema, handler, delegate config,
and the API projection), so `buildExecutionConfig` receives the user's pick.
The end-to-end assertion you asked for drives it through `POST /agents` and
checks the resulting delegate config; the projection test now pins
`warehouseId` too.
--
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]