Copilot commented on code in PR #7536:
URL: https://github.com/apache/texera/pull/7536#discussion_r3755432770
##########
frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts:
##########
@@ -226,6 +239,29 @@ export class ComputingUnitSelectionComponent implements
OnInit {
this.allComputingUnits = units;
});
+ // Warehouse picker state (#6933). The pick itself lives in
WarehouseService,
+ // where ExecuteWorkflowService reads it at execution time.
+ this.warehouseService
+ .getStatus()
+ .pipe(untilDestroyed(this))
+ .subscribe({
+ next: status => {
+ this.warehouseEnabled = status.enabled;
+ this.warehouses = [...status.warehouses];
+ this.applyWarehousePreselect();
+ },
+ error: (err: unknown) => {
+ console.error("Failed to fetch warehouse status", err);
+ },
Review Comment:
A failed status request also leaves any ID retained by the root-scoped
service, even though this component keeps the picker hidden. Executing then
sends an unverified stale warehouse ID. Clear the selection on this failure
path as well.
This issue also appears in the following locations of the same file:
- line 314
- line 322
- line 345
- line 349
##########
frontend/src/app/dashboard/type/workflow-executions-entry.ts:
##########
@@ -22,6 +22,7 @@ export interface WorkflowExecutionsEntry {
eId: number;
vId: number;
cuId: number;
+ whId: number;
Review Comment:
`whid` is nullable in the backend (`WORKFLOW_EXECUTIONS.WHID` is set to null
for shared-storage runs and on warehouse deletion), but this API type promises
a number. The cast in the new picker test already works around that mismatch.
Model the wire value as nullable so consumers must handle it correctly.
##########
frontend/src/app/dashboard/component/user/user-warehouse/user-warehouse.component.html:
##########
@@ -0,0 +1,116 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<div class="section-container subsection-grid-container">
+ <nz-card class="section-title">
+ <h2 class="page-title">Warehouses</h2>
+ <div class="button-group">
+ <button
+ nz-button
+ class="create-btn"
+ (click)="showCreateModal()"
+ [disabled]="!warehouseEnabled"
+ title="Create Warehouse">
+ <i
+ nz-icon
+ nzType="file-add"
+ nzTheme="outline"></i>
+ <span>Create Warehouse</span>
+ </button>
+ </div>
+ </nz-card>
+
+ <nz-card
+ class="section-list-container"
+ [nzBodyStyle]="{ height: '100%' }">
+ <div class="warehouse-page">
+ <div
+ *ngIf="!warehouseEnabled"
+ class="warehouse-page-empty">
+ Per-user warehouses are disabled in this deployment.
+ </div>
+
+ <div
+ *ngIf="warehouseEnabled && warehouses.length === 0"
+ class="warehouse-page-empty">
+ No warehouses yet. Click <strong>Create Warehouse</strong> to create
one.
+ </div>
+
+ <ul
+ *ngIf="warehouseEnabled && warehouses.length > 0"
+ class="warehouse-page-list">
+ <li
+ *ngFor="let warehouse of warehouses; trackBy: trackByWhid"
+ class="warehouse-page-item">
+ <span
+ class="warehouse-name"
+ nz-tooltip
+ [nzTooltipTitle]="warehouse.warehouseName">
+ {{ warehouse.name }}
+ </span>
+ <span class="warehouse-meta"> {{ warehouse.flavor }} ยท created {{
warehouse.createdAtMillis | date }} </span>
+ <i
+ nz-icon
+ nzType="delete"
+ class="warehouse-delete-icon"
+ nz-tooltip
+ nzTooltipTitle="Delete warehouse and all data stored in it"
+ (click)="confirmDelete(warehouse)"
+ role="button"
+ aria-label="Delete warehouse">
+ </i>
Review Comment:
This clickable icon is not focusable and has no keyboard handler, so
keyboard-only users cannot delete a warehouse. Make it a real button, or add
focusability plus Enter/Space activation.
--
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]