Skip to content

Incomplete/broken workflows can be deployed due to hardcoded validation bypass #3444

@Siddhartha-singh01

Description

@Siddhartha-singh01

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions