Copilot commented on code in PR #8551:
URL: https://github.com/apache/texera/pull/8551#discussion_r4031079266


##########
frontend/src/app/workspace/service/execute-workflow/execute-workflow.service.ts:
##########
@@ -241,6 +245,21 @@ export class ExecuteWorkflowService {
     const selectedUnit = 
this.computingUnitStatusService.getSelectedComputingUnitValue();
     const computingUnitId = selectedUnit?.computingUnit.cuid;
 
+    // The warehouse this execution writes to (#7817); undefined serializes 
away,
+    // which the backend today reads as the shared default storage (#7751
+    // tightens that to a rejection while the feature is enabled).
+    const warehouseId = this.warehouseService.getSelectedWarehouseIdValue();
+
+    // Every execution path funnels through here — the menu's Run button offers
+    // the create dialog, but a run reached from anywhere else (the form view,
+    // run-up-to-operator, a replay) must not fall through to the shared
+    // storage while the deployment requires a warehouse (#7751 adds the
+    // backend-side rejection).
+    if (this.config.env.warehouseEnabled && warehouseId === undefined) {
+      this.notificationService.error("Create or select a warehouse before 
running.");
+      return;

Review Comment:
   Both public execution methods reset the current execution and operator 
status before reaching this guard. Consequently, a rejected 
form/run-up-to/replay attempt can erase the frontend's prior (or currently 
running) execution state even though no request is sent. Validate warehouse 
availability before those resets, while retaining a shared guard for direct 
callers.



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