diff --git a/changelog/2025-12-16-workspace-forks/index.md b/changelog/2025-12-16-workspace-forks/index.md new file mode 100644 index 000000000..b7c0e406e --- /dev/null +++ b/changelog/2025-12-16-workspace-forks/index.md @@ -0,0 +1,17 @@ +--- +slug: workspace-forks +version: v1.593.0 +title: Workspace forks +tags: ['Workspaces', 'Git sync', 'Collaboration'] +description: Create independent copies of workspaces for parallel development workflows, similar to git branches. Merge changes back to parent workspaces directly from the UI or through git sync. +features: + [ + 'Fork workspaces to create independent development environments', + 'Automatically create git branches when used with git sync', + 'Merge forked workspaces back to parent workspaces from the UI', + 'Multiple developers can work on separate forks simultaneously', + 'Deploy individual items to parent workspace using deployment UI' + ] +docs: /docs/advanced/workspace_forks +video: /videos/merge-ui-demo.mp4 +--- diff --git a/docs/advanced/11_git_sync/index.mdx b/docs/advanced/11_git_sync/index.mdx index cc00fa85e..c388f0153 100644 --- a/docs/advanced/11_git_sync/index.mdx +++ b/docs/advanced/11_git_sync/index.mdx @@ -1,18 +1,10 @@ import DocCard from '@site/src/components/DocCard'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; # Git sync -From the workspace settings, you can set a [git_repository](../../integrations/git_repository.mdx) resource on which the workspace will automatically commit and push scripts, flows and apps to the repository on each [deploy](../../core_concepts/0_draft_and_deploy/index.mdx). - -You can use this feature to [Deploy to prod using a git workflow](#git-sync---promotion-mode-deploy-to-prod-using-a-git-workflow). - -
- -
+Git sync lets Windmill workspaces be tracked by git. Each time an item is deployed, Widnmill will create and push a commit to the specified repository. It is also possible, and recommended, to setup CI/CD actions that will deploy items on windmill when a new commit is detected, enabling bi-directional synchronization. :::tip Version control @@ -20,7 +12,13 @@ For all details on Version control in Windmill, see [Version control](../../adva ::: -This video shows how to set up a Git repository for a workspace (Git sync - sync mode). +This feature is [Cloud & Enterprise Self-Hosted](/pricing) only. + +![Git sync diagram](/images/basic_git_sync.png 'Git sync diagram') + +## Setup - Git sync from Windmill + +This video shows how to set up a Git repository for a workspace. - -
- -More details at: +Learn how to setup Git Promotion:
- -
diff --git a/docs/advanced/12_deploy_to_prod/index.mdx b/docs/advanced/12_deploy_to_prod/index.mdx index 2b88e9926..db41b7038 100644 --- a/docs/advanced/12_deploy_to_prod/index.mdx +++ b/docs/advanced/12_deploy_to_prod/index.mdx @@ -2,37 +2,34 @@ import DocCard from '@site/src/components/DocCard'; # Deploy to prod -To deploy to prod, 3 options are possible. - -[Draft and deploy](#option-1-draft-and-deploy---single-workspace) is the simplest method. It is meant to be used in a single workspace. - -[Git integration](#option-2-deploy-to-prod-using-a-git-workflow---multi-workspace-recommended) is clearly the superior, most powerful method but it is more complex. Usually, to deploy to prod you would want absolutely to have the normal CI flow that goes through one review which is something that is built-in with GitHub/GitLab. Also you may want to put some CI checks there. - -However, in a setting where you have dev/staging/prod, you could use the [UI to deploy to staging from dev](#option-3-deploy-to-prod-using-the-ui-only---multi-workspace), and then use git between staging and prod to tighten down prod. +When working on Windmill, you will quickly be looking for ways to iterate on and test your scripts, flows, and apps all the while having a working version running. The following section explains the different methods available in Windmill to have a production environement and deploy to it. ## Option 1. Draft and deploy - Single workspace A simple setup in which deploying to prod means deploying items that have been iterated on in the UI as Drafts. Deployments in Windmill are commonly done from the same workspace using the [Draft and deploy](../../core_concepts/0_draft_and_deploy/index.mdx) buttons. -## Option 2. Deploy to prod using a git workflow - Multi workspace (recommended) +## Option 2. Workspace forks - Multi workspace (recommended) + +[Windmill workspaces](../20_workspace_forks/index.mdx) can be forked, creating a new copy of the workspace at that point in time. The forked workspace can be iterated on, tested, and once changes are ready, merged back to the original workspace, thus deploying the new versions of the scripts, flows, or apps. The workflow will be familiar to anyone who has used branches in version control tools such as git. The analogy can be further reinforced if [Git Sync](../11_git_sync/index.mdx) is setup: Windmill will autmatically create branches for each of the forks, and merging can be controlled direclty through git. + +## Option 3. Git Promotion workflow: deploying through git - Multi workspace (possible cross-instance) -The integration can be used to push from git, and receive changes done from the UI in a bi-directional way. -You can also use a separate dev and staging branch and repo and have Windmill create automatically branches and Pull Request upon any changes deployed to staging/dev. +This is a more complex but very reliable setup that leverages [Git Sync](../11_git_sync/index.mdx) to deploy from one workspace to another through git. When changes are done to the Staging workspace, they are pushed to a branch in the Prod repo. Once merge to the main branch of the Prod repo, the Prod workspace is updated with the changes. -This process can be used in particular for [local development](../4_local_development/index.mdx) with a solid setup: +This workflow lets you review all the changes on a PR before merging and deploying. It also has the advantage, unlike the other options here, to work across separate windmill instances. -![Local development Setup](../4_local_development/local_development.png 'Local development Setup') +![Git Promotion](/images/git_promotion.png 'Git Promotion')
-## Option 3. Deploy to prod using the UI only - Multi workspace +## Option 4. Deploy to prod using the UI only - Multi workspace From a workspace in Windmill, you can deploy a script/flow/resource/variable and all its dependencies to another workspace. diff --git a/docs/advanced/13_version_control/index.mdx b/docs/advanced/13_version_control/index.mdx index 795a9d30f..ece013b8d 100644 --- a/docs/advanced/13_version_control/index.mdx +++ b/docs/advanced/13_version_control/index.mdx @@ -8,7 +8,7 @@ Manage changes to scripts workflows, apps and resources using commits & push on From the workspace settings, you can set a [git_repository](../../integrations/git_repository.mdx) resource on which the workspace will automatically commit and push scripts, flows and apps to the repository on each [deploy](../../core_concepts/0_draft_and_deploy/index.mdx). -This video shows how to set up a Git repository for a workspace (Git sync - sync mode). +This video shows how to set up a Git repository for a workspace (Git Sync). -
Git sync is [Cloud plans and Self-Hosted Enterprise Edition](/pricing) only. diff --git a/docs/advanced/20_workspace_forks/index.mdx b/docs/advanced/20_workspace_forks/index.mdx index e2bd95c2b..69087bcf0 100644 --- a/docs/advanced/20_workspace_forks/index.mdx +++ b/docs/advanced/20_workspace_forks/index.mdx @@ -20,7 +20,7 @@ Key features: - **Git integration**: Automatically creates corresponding git branches using the git sync workflow - **Team collaboration**: Multiple developers can work on separate forks simultaneously - +![Workspace Forks and Git Sync](/images/workspace_forks.png) ## Example feature development workflow @@ -35,8 +35,8 @@ Key features: ### Prerequisites - Being on a self-hosted EE instance -- [Git sync](../11_git_sync/index.mdx) configured (recommended for full functionality) -- [CI/CD actions ](../9_deploy_gh_gl/index.mdx#github-actions-setup) to merge back from the git remote to Windmill +- [Git sync](../11_git_sync/index.mdx) configured (optional, required only for git-based workflows) +- [CI/CD actions ](../9_deploy_gh_gl/index.mdx#github-actions-setup) to merge back from the git remote to Windmill (only required for git sync workflows) ### Fork creation @@ -80,7 +80,7 @@ When workspace forks are used with [git sync](../11_git_sync/index.mdx), Windmil the parent workspace, and keep track of changes there. External changes to the branch are then synced back to the forked workspace if the appropriate CI/CD actions are setup. Once the changes are ready, a PR can be opened to sync back changes to the original workspace. -Workspace forks are designed to be used with git sync, so make sure to have it properly setup and in particular the [CI/CD actions](../9_deploy_gh_gl/index.mdx#github-actions-setup) specific to forks should be set. Make sure to not forget the `push-on-merge-to-forks.yaml` action. +Workspace forks can be used with git sync for full version control integration. If using git sync, make sure to have it properly setup and in particular the [CI/CD actions](../9_deploy_gh_gl/index.mdx#github-actions-setup) specific to forks should be set. Make sure to not forget the `push-on-merge-to-forks.yaml` action. ### Fork and branch naming @@ -101,7 +101,28 @@ This naming convention is what enables Windmill to match branches to workspaces Once a fork is created, it is automatically setup to deploy to its parent branch. You can deploy any item to the parent branch directly from the UI by clicking it and selecting `Deploy to staging/prod`. Learn more about the [Deployment UI](../../core_concepts/12_staging_prod/index.md). -There is currently no way to update the parent workspace changes back to the fork through the UI, but some features are planned to remediate to this. +### Merge workspaces from the UI + +You can merge changes from a forked workspace back to its parent workspace directly from the UI without requiring git sync. This provides a simpler workflow for teams that don't need full git integration. + +To merge a fork: + +1. Navigate to the forked workspace +2. On the home page, a banner will show you the diff with its parent workspace. Click `Review & Deploy Changes` +3. Review the changes and confirm the merge + +