KevinGG commented on pull request #13881:
URL: https://github.com/apache/beam/pull/13881#issuecomment-772717403


   > I'm a little wary about this fix, since you said you weren't able to 
replicate the flakiness locally and we're not clear exactly how it's failing. 
This seems like a reasonable change anyway so we could go ahead and merge it 
(except for maybe the test I commented on), but I'd want to keep the jira open 
while we monitor for more flakes.
   > 
   > Is there any logging we could add that would help diagnose if this does 
happen again? Maybe logging the call site/calling object?
   > 
   > FYI I took a look at the [precommit history for 
InteractiveEnvironmentTest](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/testReport/junit/apache_beam.runners.interactive.interactive_environment_test/InteractiveEnvironmentTest/history/)
 to see if I could get some more signal.
   > 
   > The only interesting thing I found is that this also happened with 
[mocked_atexit](https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/3760/testReport/junit/apache_beam.runners.interactive.interactive_environment_test/InteractiveEnvironmentTest/test_cleanup_registered_when_creating_new_env_5/).
   
   Let's keep the Jira open and see if new flakiness occurs. I'll make change 
to the recommended test and the atexit register test to also move the patch 
inside the test function.
   I think the issues are:
   
   1. The global singleton instance `_interactive_beam_env ` (a module 
property) is not thread safe in the testing environment on Jenkins.
   2. The patch should be limited to the statement that the test cares about to 
be resilient to race conditions.


----------------------------------------------------------------
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.

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


Reply via email to