Skip to content

Keep 1253 activate deactivate workflow finishes#158

Merged
suisuss merged 7 commits intostagingfrom
KEEP-1253-Activate-deactivate-Workflow-finishes
Jan 21, 2026
Merged

Keep 1253 activate deactivate workflow finishes#158
suisuss merged 7 commits intostagingfrom
KEEP-1253-Activate-deactivate-Workflow-finishes

Conversation

@joelorzet
Copy link
Copy Markdown

@joelorzet joelorzet commented Jan 20, 2026

Summary

Overview

Added validation before enabling workflows with Schedule or Event trigger types to prevent enabling workflows with configuration issues.

Changes

  • Validation on enable: When toggling a workflow to enabled, validates nodes for:
    • Broken template references
    • Missing required fields
    • Missing integrations
  • Error handling: If validation fails, shows a modal listing issues with an "Enable Anyway" button to proceed
  • No validation on disable: Disabling a workflow bypasses validation
  • Refactoring: Extracted database update logic into updateWorkflowEnabled helper function to reduce code duplication

Impact

Prevents enabling workflows with configuration errors, reducing runtime failures for scheduled and event-triggered workflows. Allows users to continue drafting workflows while avoiding node errors.

Evidence

Screenshots
image

@joelorzet joelorzet requested review from a team, OleksandrUA, eskp, suisuss and taitsengstock and removed request for a team January 20, 2026 19:17
Copy link
Copy Markdown

@eskp eskp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please include a loom of what this looks like

eskp
eskp previously approved these changes Jan 21, 2026
joelorzet and others added 6 commits January 21, 2026 12:37
- Updated the database schema to include workflows in the dispatcher.
- Modified the query to fetch enabled schedules for both enabled workflows and schedules.
- Added a new `handleValidate` function to check for broken references, missing fields, and integrations before executing workflows.
- Integrated the `WorkflowIssuesOverlay` to display validation issues with customizable action labels.
- Updated the workflow toolbar to conditionally show an enable/disable switch based on the trigger type.
- Add workflow.enabled check in schedule-executor.ts to prevent execution
  of disabled workflows after they've been dispatched to SQS
- Add workflow.enabled check in job-spawner.ts to prevent spawning k8s
  jobs for disabled workflows
- Update deploy/local/hybrid/deploy.sh to use POSTGRES_DB from .env for
  worktree database name consistency
- Fix api-key-auth.test.ts with proper Vitest skip mechanism and lint
  compliance
- Fix web3-steps.test.ts by adding explorerConfigs mock to db mock
…andling

Unit tests (schedule-executor.test.ts):
- validates workflow is enabled before execution
- allows execution when workflow is enabled
- skips execution when workflow disabled after dispatch (race condition)

E2E tests (full-pipeline.test.ts):
- should skip execution for disabled workflow (job-spawner check)
- should handle race condition: workflow disabled after dispatch but before execution
- should allow execution for enabled workflow
@suisuss suisuss force-pushed the KEEP-1253-Activate-deactivate-Workflow-finishes branch from 10c7a2a to a7a2612 Compare January 21, 2026 01:40
@joelorzet joelorzet requested a review from eskp January 21, 2026 01:47
- Add defense-in-depth check in workflow-runner.ts for disabled workflows
- Update E2E test to verify runner cancels disabled workflow execution
- Remove trivial unit tests that only tested boolean logic
- Add enabled: true to test workflow inserts (schema defaults to false)
- Fix unused variable and formatting in workflow-toolbar.tsx
@suisuss suisuss merged commit 6b54204 into staging Jan 21, 2026
1 check passed
@suisuss suisuss deleted the KEEP-1253-Activate-deactivate-Workflow-finishes branch January 21, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants