kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
12.97k stars 1.13k forks source link

Topology view modification overwrites the flow without Saving it #5137

Closed smunteankestra closed 1 month ago

smunteankestra commented 1 month ago

Describe the issue

Flow should be saved to apply changes https://github.com/user-attachments/assets/b8fe575e-5395-4fa4-aac6-b063591e5aa3

Environment

Harsh4902 commented 1 month ago

@MilosPaunovic Can I work on this issue?

MilosPaunovic commented 1 month ago

Absolutely @Harsh4902, go for it!

MilosPaunovic commented 1 month ago

Hi @Harsh4902, any progress here?

Harsh4902 commented 1 month ago

@MilosPaunovic I am on it.

Harsh4902 commented 1 month ago

@MilosPaunovic I have noticed that code overwrite without saving is happening with TopologyView as well as SourcecodeView.

MilosPaunovic commented 1 month ago

Okay, than that needs fixing also.

Harsh4902 commented 1 month ago

@MilosPaunovic I want little help. I found that while we are changing the without saving flow, it's actually going in the Dirty state. It's not getting saved, so I am not able to understand how to get it back from the Dirty state.

MilosPaunovic commented 1 month ago

@Harsh4902 You can set the dirty flag to false by commiting editor/changeOpenedTabs mutation. See https://github.com/kestra-io/kestra/blob/39c2698756e500228d692f2e1caf2f92842060fb/ui/src/components/inputs/EditorView.vue#L730 and https://github.com/kestra-io/kestra/blob/39c2698756e500228d692f2e1caf2f92842060fb/ui/src/components/inputs/EditorView.vue#L745 for more details.

Harsh4902 commented 1 month ago

@Harsh4902 You can set the dirty flag to false by commiting editor/changeOpenedTabs mutation. See https://github.com/kestra-io/kestra/blob/39c2698756e500228d692f2e1caf2f92842060fb/ui/src/components/inputs/EditorView.vue#L730 and https://github.com/kestra-io/kestra/blob/39c2698756e500228d692f2e1caf2f92842060fb/ui/src/components/inputs/EditorView.vue#L745 for more details.

Aha, got it.

MilosPaunovic commented 1 month ago

The PR from @Harsh4902 is now merged to develop branch, he did a great job on it, but I'll move this issue to In Review state until @smunteankestra gets a change to re-test it and confirm that it is now solved.

smunteankestra commented 1 month ago

fixed