durgaprasadml commented on code in PR #38753:
URL: https://github.com/apache/beam/pull/38753#discussion_r3329170495


##########
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy:
##########
@@ -1218,6 +1218,17 @@ class BeamModulePlugin implements Plugin<Project> {
         useJUnit {}
         // default maxHeapSize on gradle 5 is 512m, lets increase to handle 
more demanding tests
         maxHeapSize = '2g'
+
+        // Develocity Gradle plugin (applied in settings.gradle.kts) provides 
test retry
+        // natively. Configure it in CI to retry flaky integration tests.
+        def isCI = System.getenv("GITHUB_ACTIONS") != null || 
System.getenv("JENKINS_HOME") != null
+        if (isCI) {
+          develocity.testRetry {

Review Comment:
   Thanks for the feedback. I agree that retry-based stabilization is not the 
right approach here, so I removed the retry-plugin configuration entirely.
   
   I investigated the underlying flakiness in:
   
   * testBundleFinalizationOccursOnBoundedSplittableDoFn
   * testBundleFinalizationOccursOnUnboundedSplittableDoFn
   
   The root cause turned out to be a timing race combined with self-induced 
commit flooding under CI load.
   
   BundleFinalizer callbacks execute asynchronously, while the test DoFn was 
checkpointing aggressively every 100ms. Under heavy GHA load this generated 
thousands of commits over the timeout window, which delayed finalizer execution 
and amplified the race.
   
   To address this, I replaced the fixed sleep/checkpoint loop with a bounded 
timed-polling wait strategy:
   
   * first attempt resumes immediately to trigger fast initial commit
   * subsequent resumes wait deterministically for finalization callbacks
   * yielding is preserved to avoid deadlocks on single-threaded executors
   * commit pressure is drastically reduced under load



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to