test: git sync E2E tests + auto-manage git sync script version#8253
test: git sync E2E tests + auto-manage git sync script version#8253rubenfiszel merged 28 commits intomainfrom
Conversation
Add 7 end-to-end tests that verify the full git sync pipeline: deploy objects in Windmill → DeploymentCallback job runs hub sync script → correct files appear in a Gitea git repository. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
5d019b8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6333f8d0.windmill.pages.dev |
| Branch Preview URL: | https://git-sync-tests.windmill.pages.dev |
- Add LATEST_GIT_SYNC_SCRIPT_PATH constant as single source of truth - Backend auto-fills empty script_path with latest on save - New repos use empty script_path (auto-managed by backend) - Existing repos with pinned versions show warning with opt-in button - cache_hub_scripts always caches the latest constant - Rename hubPaths.json gitSync entries to deprecated_ prefix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Empty script_path is now resolved to latest at job dispatch time in EE, not on save. Users opt in via the UI button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
None means auto-managed (uses LATEST_GIT_SYNC_SCRIPT_PATH), Some(path) means pinned to a specific script. Resolution happens at job dispatch time via effective_script_path(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove git_sync_test from default integration test suite - Move gitea service to dedicated docker-compose.git-sync.yml - Add run_git_sync.sh script - New workflow triggers on changes to git sync crate, hub paths, ee-repo-ref, or the test files themselves Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Build from source and run Windmill directly, start Gitea as a standalone container. Tests run against localhost — no pre-built Docker image needed, works on PRs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only run the expensive build+test when actually relevant: - Direct git sync file changes: always run - ee-repo-ref.txt changed: check if EE diff touches windmill-git-sync/ - Unrelated changes to workspaces.rs or other files: skip Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove workspaces.rs and wmill_integration_test_utils.py from path triggers - they change too often for unrelated reasons. Keep only git-sync-specific paths + ee-repo-ref.txt (filtered by check-relevance). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…y E2E) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @hugocasa's task in 4m 9s —— View job PR #8253 Review: Git Sync E2E Tests + Auto-Manage Script Version
Overall AssessmentThis is a solid PR that introduces comprehensive E2E git sync tests (11 tests) and an auto-managed script version mechanism. The test infrastructure is well-designed with proper setup/teardown, dynamic Gitea URLs, and job drain between tests to prevent race conditions. Positive Highlights
Issues and Suggestions1. Test timing fragility —
|
The test connection button was disabled and runTestJob() bailed out when script_path was unset. The test job uses a separate hub script (gitSyncTest), not the sync script, so the guard was wrong. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Initialize current_count before loop in wait_for_sync_jobs - Clean up temp directories in clone helpers with addCleanup - Fail CI startup steps if Gitea/Windmill never become ready - Assert exact job count in exclude_path test - Remove docs/git-sync-tests-plan.md (stale planning doc) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
No longer referenced after Rust integration tests were removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @hugocasa's task in 2m 25s —— View job PR #8253 Review: Git Sync E2E Tests + Auto-Manage Script Version
Overall AssessmentThis is a well-structured PR that adds comprehensive E2E test coverage for git sync (11 tests) and introduces auto-managed script versioning. The architecture is sound — making Issues Found1.
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit updates the EE repository reference after PR #442 was merged in windmill-ee-private. Previous ee-repo-ref: a05004a7c82f3d1ee5f6863bb9f5a33827d30032 New ee-repo-ref: 612d96a66f9d0cfdae335ef3eb4881f3444ce7cd Automated by sync-ee-ref workflow.
|
🤖 Updated |
Summary
script_pathis now optional in git sync config — when omitted, the backend usesLATEST_GIT_SYNC_SCRIPT_PATHconstant (hub/28160/...). Existing pinned configs continue to work unchangedscript_pathwas unset)get_github_app_token_internalnow resolves nullscript_pathto the default constant instead of rejecting the job as "not a git sync job"docker-compose.git-sync.yml,run_git_sync.sh).github/workflows/git-sync-test.yml) with relevance check for EE ref changesE2E Test Coverage
test_script_deploy_syncs_to_gittest_multi_repo_routingtest_script_update_creates_new_committest_deploy_multiple_object_typestest_commit_message_formattest_rename_removes_old_filetest_promotion_modeuse_individual_branch=True→ per-object branchestest_promotion_group_by_foldertest_force_branch_with_wmill_yamlforce_branchwithwmill.yamlconfigtest_exclude_path_filteringtest_workspace_forkKey Changes
Backend
windmill-common/src/workspaces.rs:LATEST_GIT_SYNC_SCRIPT_PATHconstant,script_path: Option<String>witheffective_script_path()fallbackbackend/src/main.rs: force-cache latest git sync script regardless ofhubPaths.jsonwindmill-common/src/stats_oss.rs: sync OSS stub signatures with EE telemetry changes (minimal: boolparam)windmill-api/openapi.yaml:script_pathno longer required inEditGitSyncSettingsFrontend
GitSyncRepositoryCard.svelte: pinned version warning with "Switch to auto-managed" button; test connection enabled for auto-managed reposGitSyncContext.svelte.ts:runTestJobno longer requiresscript_pathEE (windmill-ee-private PR #442)
git_sync_ee.rs:get_github_app_token_internalresolves nullscript_pathtoLATEST_GIT_SYNC_SCRIPT_PATHCI
.github/workflows/git-sync-test.yml: builds withenterprise,private,license,zipfeatures; relevance check for EE ref changes; startup health checks with failure exitsTest plan
check_ee,check_oss,check_ee_full,check_oss_fullpassgit_sync_e2ejob passes🤖 Generated with Claude Code