Repository navigation
Conversation
Contributor
Author
|
Closing to reopen from an upstream apache/beam branch with a verification workflow run. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41034 +/- ##
============================================
- Coverage 58.40% 58.29% -0.11%
Complexity 2276 2276
============================================
Files 1136 1136
Lines 169395 169395
Branches 1482 1482
============================================
- Hits 98937 98754 -183
- Misses 67909 68092 +183
Partials 2549 2549
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes flaky/startup failures in
PostCommit XVR JavaUsingPython Dataflow(e.g. run 42212921122) where the first wave ofValidateRunnerXlangTesttest cases fail withUNAVAILABLE: io exception / Connection refused: localhost/127.0.0.1:<port>while the remaining 15 tests succeed once the Python expansion service finishes importingapache_beamand binds its port.Root Cause
sdks/python/scripts/run_expansion_services.shstarts the Java and Python expansion services in the background (&) and exits immediately without waiting for them to bind to$JAVA_PORTand$PYTHON_PORT(and also leaks theflockfile descriptor200to the child processes).BaseExternalTest.waitForReady()built itsManagedChannelwithout.usePlaintext()(unlikeExternal.java) and without callingchannel.resetConnectBackoff()onTRANSIENT_FAILURE, and only polled for 15 seconds (30 * 500ms). Under CPU contention (8 parallel Gradle test workers starting simultaneously on Python 3.14), the Python expansion service can take ~35-40 seconds to finish importingapache_beamand bind the port, causing the first 5 test classes to fail right at the 15s mark.Changes
sdks/python/scripts/run_expansion_services.sh, close FD200in backgrounded child processes and wait up to 60s for both expansion service ports to accept connections (or dump logs and fail fast if the process exits prematurely).BaseExternalTest.waitForReady(), use.usePlaintext(), callchannel.resetConnectBackoff()onTRANSIENT_FAILURE, and increase the readiness timeout from 15s to 60s.