-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
There is a hardcoded validation bypass in the workflow feature which allows users to deploy completely incomplete or broken workflows.
In panel.tsx the hasValidationErrors flag is hardcoded to false and the isWorkflowBlocked never accurately prevents the user from clicking the run/deploy buttons. On the backend, /api/workflows/[id]/deploy/route.ts only validates schedule data. It never calls validateWorkflowState to ensure blocks are legally chained and properties are set.
To Reproduce Steps to reproduce the behavior:
Go to any Workspace and create a new workflow.
Add a few random action blocks to the canvas without actually configuring their required fields (leaving them in a broken/invalid state).
Do not connect them together.
Click on 'Deploy'.
See that the deployment succeeds instead of showing a validation error warning on the UI.
Expected behavior The 'Deploy' and 'Run' buttons should be blocked when validation errors are present on the canvas (e.g., missing configurations, disconnected blocks).
When clicked, the backend should reject the Deploy POST request entirely with a 400 error detailing the validation issues.