dill21yu opened a new issue, #18025:
URL: https://github.com/apache/dolphinscheduler/issues/18025

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   The `graphHasCycle()` method in the API layer only detects cycles within a 
single workflow, but fails to detect cross-workflow circular dependencies.
   
   <img width="1194" height="690" alt="Image" 
src="https://github.com/user-attachments/assets/9a532e75-27f1-4a0d-96e3-2f2b73a72a54";
 />
   
   ### What you expected to happen
   
   When creating or updating a workflow, the system should:
   1. Query the `workflow_task_lineage` table to get all cross-workflow 
dependencies
   2. Build a complete DAG graph including both internal and external 
dependencies
   3. Detect circular dependencies using DFS before saving
   4. Return a clear error message to the user indicating which workflows/tasks 
form the cycle
   
   
   ### How to reproduce
   
   Query the `workflow_task_lineage` table and use DFS recursive detection to 
identify cross-workflow circular dependencies.
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   dev
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to