Commit a072602
fix: enforce workflow validation before deploy and run
The deploy endpoint only validated schedule data but never checked
workflow state (block types, edges, tool references). The Run button
had validation hardcoded to `false`. Redeployments (Update) skipped
all pre-deploy checks entirely.
Changes:
- Backend: call validateWorkflowState() before deploying to reject
workflows with unknown block types, dangling edges, or invalid
tool references (returns 400 with details)
- Frontend panel: replace hardcoded `hasValidationErrors = false`
with a check that blocks are connected via edges
- Frontend deploy hook: run pre-deploy checks for redeployments too,
not just first deploys
Fixes #3444
This PR was authored by Claude Opus 4.6 (AI), operated by @MaxwellCalkin
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 8c0a2e0 commit a072602
File tree
3 files changed
+28
-7
lines changed- apps/sim/app
- api/workflows/[id]/deploy
- workspace/[workspaceId]/w/[workflowId]/components/panel
- components/deploy/hooks
3 files changed
+28
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
137 | 153 | | |
138 | 154 | | |
139 | 155 | | |
| |||
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 37 | + | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
| |||
0 commit comments