langgenius / langgenius/dify

Add strict reference validation before deleting workflows

Open
#39,140 2 comments 1 reaction 0 assignees View on GitHub
💪 enhancement project#dify
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

### Self Checks

- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] Please do not modify this template :) and fill in all the required fields.

### 1. Is this request related to a challenge you're experiencing? Tell me about your story.

Currently, when deleting a workflow, we do not have full visibility into how many workflows reference the workflow being deleted. the UI already shows a confirmation dialog and requires the user to enter the workflow name before deletion is allowed, but that is still not enough.

Deleting a workflow can severely impact other workflows that reference it. If a foundational workflow is referenced by many other workflows, recovery can be extremely painful.

Therefore, when deleting a workflow, the system should at minimum verify that no **published** workflow still references it. **If any published workflow does reference it, deletion should be blocked.**

### 2. Additional context or comments

_No response_

### 3. Can you help us with this feature?

- [ ] I am interested in contributing to this feature.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the workflow deletion entry point and the existing confirmation flow; the issue names no file or test. Check how published workflows reference the workflow being deleted, and verify that deletion is blocked when any such reference exists while remaining possible when none do.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.