kz930 opened a new issue, #7981: URL: https://github.com/apache/texera/issues/7981
### What happened? An operator that fails to compile is marked with a red cross on the canvas and its error is shown in the result panel, but the Run button stays enabled. Pressing it starts an execution that reports the same compilation error in the console. The button's enabled state comes from `ValidationWorkflowService` alone. `menu.component.ts:232` sets `isWorkflowValid` from that service's error stream, and `getRunButtonBehavior` replaces the button with a disabled "Invalid Workflow" only when that map is non-empty. The service checks two things per operator: the operator's properties against its JSON schema with ajv (`validation-workflow.service.ts:271`), and whether every input port is connected (`validation-workflow.service.ts:300`). Neither reads the compiling service. Compilation state does reach the frontend, but nothing gates on it. `CompilationState.Failed` has exactly one consumer outside the compiling service itself, `result-panel.component.ts:276`, which decides whether the error panel is shown. Both halves are visible in one form. On Gaussian Naive Bayes, turning Count Vectorizer on with Text Attribute empty leaves the button disabled and reading "Invalid Workflow", because the schema's conditional required fails ajv. Filling Text Attribute in satisfies ajv, so the button turns into Run, even though the operator now fails to compile with "Gaussian Naive Bayes cannot be trained on the sparse matrix Count Vectorizer produces. Turn Count Vectorizer off, or use Multinomial, Bernoulli or Complement Naive Bayes." <img width="1304" height="1007" alt="Image" src="https://github.com/user-attachments/assets/06018e15-6a83-44d9-a74b-9938ec0d88ae" /> Expected: a workflow that cannot compile is not offered for execution, the same way one with an unfilled required property is not. #3068 asked for this for the context menu's "Execute to this Operator" and was closed in 2024; that entry does not check compilation state today either (`operator-menu.service.ts:255`). ### How to reproduce? Upload a CSV with two numeric columns and a label: ``` petal_length,petal_width,species 3.9,1.3,1 1.3,0.2,0 ``` Build `CSV File Scan` to `Gaussian Naive Bayes`, connect the scan to both the training and the testing port, set Target Attribute to `species`, and turn Count Vectorizer on. The Run button reads "Invalid Workflow". Now pick any column in Text Attribute. The button becomes Run, and clicking it starts an execution that ends with the compilation error in the console. ### Version/Branch 1.3.0-incubating-SNAPSHOT (main) ### Commit Hash (Optional) 319859571 -- 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]
