Copilot commented on code in PR #8592:
URL: https://github.com/apache/texera/pull/8592#discussion_r4044583465
##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -1526,6 +1526,17 @@ export class WorkflowFormComponent implements OnInit,
OnDestroy {
);
}
+ /** The embedded picker, asked for the warehouse requirement below: reading
its own predicate
+ * keeps this page and the canvas from drifting apart, as isConnecting does
for the socket. */
+ @ViewChild(ComputingUnitSelectionComponent) private unitSelection?:
ComputingUnitSelectionComponent;
+
+ /** Per-user warehouses are enabled and none is picked. The run would be
refused by
+ * ExecuteWorkflowService, so the button says so first, rather than
starting nothing and
+ * explaining afterwards in a toast (#8591). */
+ public get hasNoWarehouse(): boolean {
+ return this.unitSelection?.warehouseRequiredButMissing === true;
Review Comment:
On warehouse-enabled deployments,
`ComputingUnitSelectionComponent.warehouseEnabled` starts as `false` and
changes only after its asynchronous `getStatus()` response. This getter
therefore reports that no warehouse is required while that request is pending
(and before the `ViewChild` is available). If the workflow and computing unit
are already ready, the form briefly enables `Run`; a fast click is still
rejected by `ExecuteWorkflowService`, which reads the boot-time warehouse flag
synchronously and shows the toast this PR is meant to avoid. Initialize or
expose the picker’s requirement as fail-closed from the configured feature
state until status and selection are known, and add a regression test with a
delayed status response.
--
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]