Skip to content

Fix workflow cleanup to remove executions-backed run summaries#176

Closed
santoshkumarradha wants to merge 2 commits intomainfrom
fix/ui-workflow-delete-cleanup-route-404
Closed

Fix workflow cleanup to remove executions-backed run summaries#176
santoshkumarradha wants to merge 2 commits intomainfrom
fix/ui-workflow-delete-cleanup-route-404

Conversation

@santoshkumarradha
Copy link
Member

Summary

  • extend workflow cleanup target resolution to include run IDs from executions and workflow_executions
  • delete execution-backed run summary data during cleanup (executions, execution_webhooks, execution_webhook_events)
  • delete workflow_runs as part of cleanup to keep legacy metadata consistent
  • include these tables in cleanup result counters for visibility
  • add regression tests, including a non-FTS in-memory test that validates execution-table cleanup

Root cause

/api/ui/v2/workflow-runs is built from executions (QueryRunSummaries).
Cleanup previously deleted workflow-scoped tables but left executions rows intact, so runs still appeared in the UI even after DELETE .../cleanup returned 200.

Validation

  • go test ./internal/storage -run "TestLocalStorageCleanupWorkflowDeletesExecutionRecordsWithoutFTS|TestLocalStorageCleanupWorkflowByRunID" -v
  • go test ./internal/storage
  • go test ./internal/server -run TestSetupRoutesRegistersWorkflowCleanupUIRoute

Issue

Closes #175

@santoshkumarradha
Copy link
Member Author

Superseded by #177 (clean branch from origin/main with only the new cleanup fix).

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.

Workflow delete returns 200 but runs remain visible (cleanup misses executions table)

1 participant

Comments