From dae7c49f21eda2249217641b3503eb6bd6b3ebdc Mon Sep 17 00:00:00 2001 From: hugocasa Date: Tue, 21 Jul 2026 19:04:39 +0200 Subject: [PATCH] test(git-sync): cover fork-of-dev-workspace branch naming and routing (#10231) * test(git-sync): cover fork-of-dev-workspace branch naming and routing A throwaway fork of a dev workspace pushes to `wm-fork//` (the tracked branch, not the dev's label), and the root's `sync_forks` poller enumerates `wm-fork//*` and routes commits on that branch into the nested fork through the root. This was twice assumed to instead live on `wm-fork//` and therefore never be collected/reconciled; these tests pin the real behavior. - CLI unit: `computeGitSyncDeployBranch` for a fork whose parent is a dev workspace resolves to `wm-fork/main/`, explicitly not `wm-fork/dev/`. - git-sync E2E: fork a dev workspace, assert the created branch is `wm-fork/main/` (not `wm-fork/dev/*`), then assert a commit on it deploys into the fork via the root's sync_forks poller while the root is untouched. Co-Authored-By: Claude Opus 4.8 (1M context) * test(git-sync): reconcile single-dev-per-root in fork-of-dev e2e The root workspace allows only one dev workspace, and a sibling test leaves one attached, so attach_dev_workspace failed with "already has a dev workspace". Detach any pre-existing dev before attaching, and detach ours via addCleanup so the test doesn't leak its own. Co-Authored-By: Claude Opus 4.8 (1M context) * chore: update ee-repo-ref to aaa6cb89b05b76139252c64f057e53b94d12ac60 This commit updates the EE repository reference after PR #680 was merged in windmill-ee-private. Previous ee-repo-ref: 4c08634af953db5c1125b1fb03f5af211fe21db3 New ee-repo-ref: aaa6cb89b05b76139252c64f057e53b94d12ac60 Automated by sync-ee-ref workflow. --------- Co-authored-by: Claude Opus 4.8 (1M context) Co-authored-by: windmill-internal-app[bot] --- cli/test/git_unit.test.ts | 20 +++++ integration_tests/test/git_sync_test.py | 111 ++++++++++++++++++++++++ 2 files changed, 131 insertions(+) diff --git a/cli/test/git_unit.test.ts b/cli/test/git_unit.test.ts index 140da33866..2db2834bd2 100644 --- a/cli/test/git_unit.test.ts +++ b/cli/test/git_unit.test.ts @@ -199,6 +199,26 @@ describe("computeGitSyncDeployBranch", () => { }) ).toBe("wm-fork/main/mydev"); }); + + // A throwaway fork OF a dev workspace is named after the tracked (cloned) + // branch, NOT the parent dev's label: the child is not itself a dev + // workspace, so it carries no devWorkspaceLabel. The dev label reaches this + // deploy only as the checkout base + PR target (handled in sync.ts), never as + // the branch name — otherwise the branch would be `wm-fork/