Copilot commented on code in PR #3696:
URL: https://github.com/apache/texera/pull/3696#discussion_r2299199161
##########
core/gui/src/app/workspace/service/validation/validation-workflow.service.ts:
##########
@@ -135,13 +135,13 @@ export class ValidationWorkflowService {
}
private updateValidationState(operatorID: string, validation: Validation) {
- this.operatorValidationStream.next({ validation, operatorID });
if (!validation.isValid) {
this.workflowErrors[operatorID] = validation;
} else {
delete this.workflowErrors[operatorID];
- this.workflowValidationErrorStream.next({ errors: this.workflowErrors,
workflowEmpty: this.workflowEmpty });
}
+ this.operatorValidationStream.next({ validation, operatorID });
+ this.workflowValidationErrorStream.next({ errors: this.workflowErrors,
workflowEmpty: this.workflowEmpty });
Review Comment:
The `workflowValidationErrorStream.next()` call now executes for both valid
and invalid validations. Previously, it only executed when validation was valid
(line 141). This change may cause unnecessary stream emissions when validation
fails, potentially triggering unwanted side effects or performance issues.
```suggestion
this.workflowValidationErrorStream.next({ errors: this.workflowErrors,
workflowEmpty: this.workflowEmpty });
}
this.operatorValidationStream.next({ validation, operatorID });
```
--
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]