-
Notifications
You must be signed in to change notification settings - Fork 127
Enable Windows integration test in workflow through WSL #5070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-2.2
Are you sure you want to change the base?
Conversation
- Add WSL setup in GitHub workflow for Windows runners - Enable integration tests on Windows (remove -x :integTest:test) - Add WSL command wrapper for all cluster_manager.py calls - Disable ValkeyCluster.close() server shutdown - Add comprehensive cleanup after all tests complete - Use pkill to find and stop all running servers in WSL This enables Java integration tests to run on Windows using WSL without Docker networking issues or premature server shutdown. Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
- Restore missing plugins block - Fix variable scope in gradle.buildFinished block - Use local isWindowsRuntime variable instead of project-level isWindows Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
Signed-off-by: James Duong <[email protected]>
- Configure cluster to use zero replicas on Windows to avoid sync issues - Increase request timeout from 10s to 60s for cluster client operations - Increase ErrorHandlingTests timeout from 10s to 15s for Windows CI - Remove class-level timeout annotation from SharedClientTests - Update wait command test expectations to account for zero replicas on Windows - Add --keep-folder flag to cluster cleanup to preserve state between runs - Adjust AZ cluster test to use conditional replica counts based on platform Signed-off-by: affonsov <[email protected]>
Signed-off-by: affonsov <[email protected]>
ec3176d to
ee58ae3
Compare
Signed-off-by: affonsov <[email protected]>
- updateding java-cd - reducing the size clientAndDataSize to not stress wsl on github runner - reverting changs on cluster_manager.py Signed-off-by: affonsov <[email protected]>
1d7e7b5 to
381e4a5
Compare
Signed-off-by: affonsov <[email protected]>
| target: ${{ inputs.target }} | ||
| github-token: ${{ inputs.github-token }} | ||
|
|
||
| - name: Install engine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change this name to more clearly show that it only applies to Linux and Mac.
| exec { | ||
| workingDir "${project.rootDir}/../utils" | ||
| commandLine 'python3', 'cluster_manager.py', '--tls', 'start', '-r', '0' | ||
| commandLine getClusterCommand(['python3', 'cluster_manager.py', '--tls', 'start', '-r', '0']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to get Windows WSL to run if replicas by changing what we wait for when syncing for topologies, but I don't remember now. I also had to run WSL with the networking mode set to mirrored, though that may not be available with Github Actions. Maybe we raise a separate issue for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is not an issue in local WSL, this problem only happen in the Github actions.
In Github actions or the replicas hang, or they take too much time to sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We need to resolve CI error.
Summary
This PR enables Java integration tests to run on Windows using WSL (Windows Subsystem for Linux), removing the previous Windows exclusion from CI workflows. It adds WSL support for cluster management, test execution, and process cleanup.
Due to the limited resources available on GitHub Windows runners and the additional overhead of running through WSL, several optimizations were implemented:
1 << 16(64KB) to1 << 15(32KB) to prevent memory pressure on Windows runnersChanges Made
CI/CD Workflow Updates
.github/workflows/install-shared-dependencies/action.yml: Added WSL setup with Ubuntu 22.04 and direct Valkey installation in WSL for Windows runners.github/workflows/install-engine/action.yml: Addedx86_64-pc-windows-msvctarget support.github/workflows/java-cd.yml: Removed Windows exclusion from integration tests (previously skipped with-x :integTest:test).github/workflows/java.yml: Enabled integration tests on Windows and excluded only Redis 6.2 on WindowsJava Integration Test Infrastructure
java/integTest/build.gradle:getClusterCommand()helper to wrap commands withwslprefix on Windowsgradle.buildFinishedto kill orphaned Valkey/Redis processesjava/integTest/src/test/java/glide/cluster/ValkeyCluster.java:getScriptPath()method to convert Windows paths to WSL format (C:\path→/mnt/c/path)wslprefix on WindowsTest Adjustments for Windows
java/integTest/src/test/java/glide/TestUtilities.java: Added validation for empty host strings and improved error messages for invalid host formatsjava/integTest/src/test/java/glide/ConnectionTests.java: Adjusted AZ affinity test to expect 0 replicas on Windows WSL CIjava/integTest/src/test/java/glide/SharedCommandTests.java: UpdatedwaitTestandwait_timeout_checkto handle 0 replicas on Windows WSL CIjava/integTest/src/test/java/glide/SharedClientTests.java:1 << 16to1 << 15for Windows WSL CI compatibilityjava/integTest/src/test/java/glide/ErrorHandlingTests.java: Increased timeout from 10s to 15sjava/integTest/src/test/java/glide/standalone/BatchTests.java: Increased timeout from 10s to 20sIssue link
This Pull Request is linked to issue (URL): [REPLACE ME]
Checklist
Before submitting the PR make sure the following are checked: