windmill-labs / windmill

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.
https://windmill.dev
Other
10.91k stars 531 forks source link

feat(frontend): Catch flow errors in the UI #4429

Closed fatonramadani closed 1 month ago

fatonramadani commented 1 month ago

https://github.com/user-attachments/assets/c7fd66f9-2fa1-4933-a28d-477a81d34ff4


[!IMPORTANT] Adds error handling for flow parsing in the frontend, detecting cycles and duplicates, with UI alerts and YAML editor access for corrections.

  • Error Handling:
    • Adds cycle detection in graphBuilder.ts using detectCycle().
    • Handles duplicate nodes in addNode() in graphBuilder.ts.
    • Updates graphBuilder.ts to return an error message if exceptions occur during graph building.
  • UI Enhancements:
    • Displays error alerts in FlowGraphV2.svelte if graph parsing fails.
    • Adds Alert and Button components in FlowGraphV2.svelte to notify users of errors and provide a way to open the YAML editor.
    • Modifies FlowConstants.svelte to handle flow steps with indices to prevent key collisions.

This description was created by Ellipsis for 3e0d9837b78c6a74f4803389ba4a156a3f35841a. It will automatically update as commits are pushed.

cloudflare-workers-and-pages[bot] commented 1 month ago

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3e0d983
Status: ✅  Deploy successful!
Preview URL: https://7e6d6e75.windmill.pages.dev
Branch Preview URL: https://fr-flow-parsing-errors.windmill.pages.dev

View logs