Allow users to update workflow
Opened this issue · 1 comments
vinicvaz commented
We should think the best way for editing workflows.
At the first moment I see 2 options:
1. Recreating the workflow (like a PUT operation)
Pros:
- It is easier to implement, we should only override / recreate all the dag file content and keep the reference to it on our database.
Cons: - Despite it be a update, the user can't "undo" and go back to the "creation" state. The update would "create" a new workflow with the new data.
- Users would need to wait for dag sync until can run the workflow. I can be annoying with slow git sync sometimes.
2. Updating workflow input arguments using dag config to inject new data into the template.
Pros:
- Users can run an already created workflow with custom inputs without the need of creating a new one, would be a "edit and run" experience. It would make the experience of creating / editing / testing workflows much more fast, intuitive and productive.
- The first state of the saved workflow are keep in database so if the user edit it and don't like the results it is not saved, the new inputs are running only in the specific manual triggered run.
- We can still have the first option, but only when user decide to save the edited workflow with the new configuration parameters.
Cons: - It is harder to implement since we will need to update how we are injecting arguments into the dag template.
Necessary changes:
- Add button to workflows list table that redirect user to the editor page with the workflow data.
- Create
patch
endpoint for updating workflows.
Possible/Probably changes:
- Update workflow Jinja template to accept inputs as variables
- Update how we inject data into each workflow
vinicvaz commented