carloea2 commented on code in PR #8350:
URL: https://github.com/apache/texera/pull/8350#discussion_r3973978944
##########
frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts:
##########
@@ -1198,6 +1206,42 @@ export class OperatorPropertyEditFrameComponent
implements OnInit, OnChanges, On
};
}
+ // A field the schema marks unique holds a meaning the enclosing list
cannot repeat.
+ // uniqueItems cannot say this: two hyperparameter rows naming one
parameter differ in
+ // their other fields, so they are distinct items while still emitting
one keyword twice.
+ if (mapSource.uniqueAmongRows === true) {
+ mappedField.validators.uniqueAmongRows = {
+ expression: (control: AbstractControl, field: FormlyFieldConfig) => {
+ const rows = field.parent?.parent?.model;
+ const key = field.key;
+ if (!isDefined(control?.value) || !Array.isArray(rows) || typeof
key !== "string") {
+ return true;
+ }
+ return rows.filter(row => isDefined(row) && row[key] ===
control.value).length <= 1;
+ },
+ message: (error: any, field: FormlyFieldConfig) =>
+ `"${field.formControl?.value}" is already set by another row`,
+ };
+ // Whether a row repeats another is a property of the whole column,
but Angular reruns a
+ // validator only on the control that changed. A change is answered by
rechecking every
+ // row, so the row that resolves a duplicate clears the one it left
behind, and a row
+ // changed onto a parameter another row holds marks that row too.
+ mappedField.hooks = {
+ ...mappedField.hooks,
+ onInit: (field: FormlyFieldConfig) => {
+ field.formControl?.valueChanges
Review Comment:
Deleting a duplicate row does not revalidate the row left behind. In the
rendered form, two parameter rows containing C are invalid; deleting one leaves
the remaining C marked uniqueAmongRows even though it is now unique. I added a
click-based regression test and reproduced it. Please revalidate surviving rows
when the array changes too.
##########
bin/single-node/nginx.conf:
##########
@@ -33,6 +33,12 @@ http {
proxy_set_header X-Real-IP $remote_addr;
}
+ location /api/workflow-to-python {
Review Comment:
Please add the export route to the Kubernetes gateway too. Its static routes
send only the compile endpoint to workflow-compiling-service; the new export
endpoint falls through to webserver-svc. The new button therefore cannot reach
the export resource on a Helm deployment. This is confirmed from the gateway
configuration, not a running cluster.
--
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]