-
Notifications
You must be signed in to change notification settings - Fork 808
Description
/ai Diff viewer and Deployement UI Currently, Windmill has the capability of forking workspaces. This is basically cloning a workspace scripts, flows apps, resources and variables so that a developer can iterate on it without affecting the main workspace. Once changes are ready, they can be merged outside of Windmill by opening a PR on github or some equivalent. Changes are synced back to windmill thanks to the git sync feature, but we would like to have the option to do this entirely through Windmill's UI. In order to accomplish this we need to build the following: An endpoint that will compare two workspaces, returning the items that have differences. Line to line differences can be computed on the go by the frontend later, so just having a list of the items that have changed and specifically which parts changed (lockfile, content, schema, ...). Every item should also have the information of how many versions it is ahead and how many versions it is behind of the other workspace equivalent item. In the UI, when a workspace is detected as being a fork (thanks to the wm-fork- prefix on its id), call this endpoint and if there are changes to be merged, show a brief message that sums up the unmerged changes and a button that offers to deploy the changes. Once the button is clicked, a thorough view of the differences is shown, items like scripts can be expanded to show line by line differences, and the UI shows clearly when a change comes from the lockfile, contents or schema. There is also a toggle that decides the direction of the deployment: either from fork to parent workspace (we then call it deploy) or from parent workspace to fork (we will call it update fork). Depending on the option selected, only items which are ahead can be selected, or otherwise only items which are behind. Items which are both ahead and behind should show this explicitly so that the user knows they will be overwriting changes if they confirm. The changes to be deployed are selected by the user (just like in the deployement UI) and then they are deployed once the user presses a final button. Once it is deployed, if there are no more changes, a button is shown to delete the forked workspace.. Request made by @wendrul