You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Valentyn Tymofieiev (Jira)" <ji...@apache.org> on 2020/11/05 17:01:00 UTC

[jira] [Commented] (BEAM-10921) Python unit tests on windows flaky

    [ https://issues.apache.org/jira/browse/BEAM-10921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226835#comment-17226835 ] 

Valentyn Tymofieiev commented on BEAM-10921:
--------------------------------------------

This  is still happening:

{noformat}
2020-11-05T11:47:51.1631037Z ================================== FAILURES ===================================
2020-11-05T11:47:51.1749033Z __________________ ElementStreamTest.test_done_if_terminated __________________
2020-11-05T11:47:51.1750168Z [gw1] win32 -- Python 3.7.9 d:\a\beam\beam\sdks\python\target\.tox\py37-win\scripts\python.exe
2020-11-05T11:47:51.1750723Z 
2020-11-05T11:47:51.1751840Z self = <apache_beam.runners.interactive.recording_manager_test.ElementStreamTest testMethod=test_done_if_terminated>
2020-11-05T11:47:51.1752763Z 
2020-11-05T11:47:51.1753189Z     def setUp(self):
2020-11-05T11:47:51.1753609Z >     ie.new_env()
2020-11-05T11:47:51.1753885Z 
2020-11-05T11:47:51.1754533Z apache_beam\runners\interactive\recording_manager_test.py:75: 
2020-11-05T11:47:51.1755113Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1755836Z apache_beam\runners\interactive\interactive_environment.py:118: in new_env
2020-11-05T11:47:51.1756568Z     _interactive_beam_env.cleanup()
2020-11-05T11:47:51.1757293Z apache_beam\runners\interactive\interactive_environment.py:272: in cleanup
2020-11-05T11:47:51.1758004Z     cache_manager.cleanup()
2020-11-05T11:47:51.1758679Z apache_beam\runners\interactive\caching\streaming_cache.py:391: in cleanup
2020-11-05T11:47:51.1759484Z     shutil.rmtree(self._cache_dir)
2020-11-05T11:47:51.1760246Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:516: in rmtree
2020-11-05T11:47:51.1760866Z     return _rmtree_unsafe(path, onerror)
2020-11-05T11:47:51.1761508Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:395: in _rmtree_unsafe
2020-11-05T11:47:51.1762150Z     _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1762789Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:400: in _rmtree_unsafe
2020-11-05T11:47:51.1763417Z     onerror(os.unlink, fullname, sys.exc_info())
2020-11-05T11:47:51.1763895Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1764196Z 
2020-11-05T11:47:51.1764716Z path = 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full'
2020-11-05T11:47:51.1765437Z onerror = <function rmtree.<locals>.onerror at 0x00000230F3721438>
2020-11-05T11:47:51.1765824Z 
2020-11-05T11:47:51.1766232Z     def _rmtree_unsafe(path, onerror):
2020-11-05T11:47:51.1766646Z         try:
2020-11-05T11:47:51.1767304Z             with os.scandir(path) as scandir_it:
2020-11-05T11:47:51.1767801Z                 entries = list(scandir_it)
2020-11-05T11:47:51.1768260Z         except OSError:
2020-11-05T11:47:51.1768704Z             onerror(os.scandir, path, sys.exc_info())
2020-11-05T11:47:51.1769169Z             entries = []
2020-11-05T11:47:51.1769624Z         for entry in entries:
2020-11-05T11:47:51.1770071Z             fullname = entry.path
2020-11-05T11:47:51.1770476Z             try:
2020-11-05T11:47:51.1771157Z                 is_dir = entry.is_dir(follow_symlinks=False)
2020-11-05T11:47:51.1771664Z             except OSError:
2020-11-05T11:47:51.1772024Z                 is_dir = False
2020-11-05T11:47:51.1772394Z             if is_dir:
2020-11-05T11:47:51.1772862Z                 try:
2020-11-05T11:47:51.1773268Z                     if entry.is_symlink():
2020-11-05T11:47:51.1773779Z                         # This can only happen if someone replaces
2020-11-05T11:47:51.1774340Z                         # a directory with a symlink after the call to
2020-11-05T11:47:51.1774889Z                         # os.scandir or entry.is_dir above.
2020-11-05T11:47:51.1775524Z                         raise OSError("Cannot call rmtree on a symbolic link")
2020-11-05T11:47:51.1776047Z                 except OSError:
2020-11-05T11:47:51.1776591Z                     onerror(os.path.islink, fullname, sys.exc_info())
2020-11-05T11:47:51.1777115Z                     continue
2020-11-05T11:47:51.1777583Z                 _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1778015Z             else:
2020-11-05T11:47:51.1778318Z                 try:
2020-11-05T11:47:51.1778711Z >                   os.unlink(fullname)
2020-11-05T11:47:51.1779695Z E                   PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full\\8170481a1c-2409262631816-2409262744904-2409300810632'
2020-11-05T11:47:51.1780527Z 
2020-11-05T11:47:51.1781103Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:398: PermissionError
2020-11-05T11:47:51.1782296Z _________________________ ElementStreamTest.test_read _________________________
2020-11-05T11:47:51.1783009Z [gw1] win32 -- Python 3.7.9 d:\a\beam\beam\sdks\python\target\.tox\py37-win\scripts\python.exe
2020-11-05T11:47:51.1783454Z 
2020-11-05T11:47:51.1784358Z self = <apache_beam.runners.interactive.recording_manager_test.ElementStreamTest testMethod=test_read>
2020-11-05T11:47:51.1785202Z 
2020-11-05T11:47:51.1785635Z     def setUp(self):
2020-11-05T11:47:51.1786015Z >     ie.new_env()
2020-11-05T11:47:51.1786273Z 
2020-11-05T11:47:51.1786784Z apache_beam\runners\interactive\recording_manager_test.py:75: 
2020-11-05T11:47:51.1787324Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1787908Z apache_beam\runners\interactive\interactive_environment.py:118: in new_env
2020-11-05T11:47:51.1788574Z     _interactive_beam_env.cleanup()
2020-11-05T11:47:51.1789430Z apache_beam\runners\interactive\interactive_environment.py:272: in cleanup
2020-11-05T11:47:51.1790133Z     cache_manager.cleanup()
2020-11-05T11:47:51.1790850Z apache_beam\runners\interactive\caching\streaming_cache.py:391: in cleanup
2020-11-05T11:47:51.1791526Z     shutil.rmtree(self._cache_dir)
2020-11-05T11:47:51.1792197Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:516: in rmtree
2020-11-05T11:47:51.1792870Z     return _rmtree_unsafe(path, onerror)
2020-11-05T11:47:51.1793605Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:395: in _rmtree_unsafe
2020-11-05T11:47:51.1794299Z     _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1794942Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:400: in _rmtree_unsafe
2020-11-05T11:47:51.1795737Z     onerror(os.unlink, fullname, sys.exc_info())
2020-11-05T11:47:51.1796239Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1796559Z 
2020-11-05T11:47:51.1797114Z path = 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full'
2020-11-05T11:47:51.1797839Z onerror = <function rmtree.<locals>.onerror at 0x00000230F60C85E8>
2020-11-05T11:47:51.1798250Z 
2020-11-05T11:47:51.1798690Z     def _rmtree_unsafe(path, onerror):
2020-11-05T11:47:51.1799135Z         try:
2020-11-05T11:47:51.1799602Z             with os.scandir(path) as scandir_it:
2020-11-05T11:47:51.1800223Z                 entries = list(scandir_it)
2020-11-05T11:47:51.1800701Z         except OSError:
2020-11-05T11:47:51.1801230Z             onerror(os.scandir, path, sys.exc_info())
2020-11-05T11:47:51.1801814Z             entries = []
2020-11-05T11:47:51.1802246Z         for entry in entries:
2020-11-05T11:47:51.1802678Z             fullname = entry.path
2020-11-05T11:47:51.1803125Z             try:
2020-11-05T11:47:51.1803662Z                 is_dir = entry.is_dir(follow_symlinks=False)
2020-11-05T11:47:51.1804189Z             except OSError:
2020-11-05T11:47:51.1804626Z                 is_dir = False
2020-11-05T11:47:51.1805020Z             if is_dir:
2020-11-05T11:47:51.1805415Z                 try:
2020-11-05T11:47:51.1805969Z                     if entry.is_symlink():
2020-11-05T11:47:51.1806506Z                         # This can only happen if someone replaces
2020-11-05T11:47:51.1807106Z                         # a directory with a symlink after the call to
2020-11-05T11:47:51.1807710Z                         # os.scandir or entry.is_dir above.
2020-11-05T11:47:51.1808273Z                         raise OSError("Cannot call rmtree on a symbolic link")
2020-11-05T11:47:51.1808730Z                 except OSError:
2020-11-05T11:47:51.1809226Z                     onerror(os.path.islink, fullname, sys.exc_info())
2020-11-05T11:47:51.1809862Z                     continue
2020-11-05T11:47:51.1810403Z                 _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1810906Z             else:
2020-11-05T11:47:51.1811308Z                 try:
2020-11-05T11:47:51.1811753Z >                   os.unlink(fullname)
2020-11-05T11:47:51.1812829Z E                   PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full\\8170481a1c-2409262631816-2409262744904-2409300810632'
2020-11-05T11:47:51.1813697Z 
2020-11-05T11:47:51.1814349Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:398: PermissionError
2020-11-05T11:47:51.1815203Z ____________________ ElementStreamTest.test_read_duration _____________________
2020-11-05T11:47:51.1816097Z [gw1] win32 -- Python 3.7.9 d:\a\beam\beam\sdks\python\target\.tox\py37-win\scripts\python.exe
2020-11-05T11:47:51.1816681Z 
2020-11-05T11:47:51.1817686Z self = <apache_beam.runners.interactive.recording_manager_test.ElementStreamTest testMethod=test_read_duration>
2020-11-05T11:47:51.1818565Z 
2020-11-05T11:47:51.1818958Z     def setUp(self):
2020-11-05T11:47:51.1819372Z >     ie.new_env()
2020-11-05T11:47:51.1819653Z 
2020-11-05T11:47:51.1820207Z apache_beam\runners\interactive\recording_manager_test.py:75: 
2020-11-05T11:47:51.1820785Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1821426Z apache_beam\runners\interactive\interactive_environment.py:118: in new_env
2020-11-05T11:47:51.1822169Z     _interactive_beam_env.cleanup()
2020-11-05T11:47:51.1822902Z apache_beam\runners\interactive\interactive_environment.py:272: in cleanup
2020-11-05T11:47:51.1824135Z     cache_manager.cleanup()
2020-11-05T11:47:51.1824825Z apache_beam\runners\interactive\caching\streaming_cache.py:391: in cleanup
2020-11-05T11:47:51.1825530Z     shutil.rmtree(self._cache_dir)
2020-11-05T11:47:51.1826214Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:516: in rmtree
2020-11-05T11:47:51.1826894Z     return _rmtree_unsafe(path, onerror)
2020-11-05T11:47:51.1827596Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:395: in _rmtree_unsafe
2020-11-05T11:47:51.1828294Z     _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1828996Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:400: in _rmtree_unsafe
2020-11-05T11:47:51.1829732Z     onerror(os.unlink, fullname, sys.exc_info())
2020-11-05T11:47:51.1830274Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1830549Z 
2020-11-05T11:47:51.1831866Z path = 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full'
2020-11-05T11:47:51.1832653Z onerror = <function rmtree.<locals>.onerror at 0x00000230F61C7318>
2020-11-05T11:47:51.1833218Z 
2020-11-05T11:47:51.1833659Z     def _rmtree_unsafe(path, onerror):
2020-11-05T11:47:51.1834127Z         try:
2020-11-05T11:47:51.1834597Z             with os.scandir(path) as scandir_it:
2020-11-05T11:47:51.1835078Z                 entries = list(scandir_it)
2020-11-05T11:47:51.1835534Z         except OSError:
2020-11-05T11:47:51.1835962Z             onerror(os.scandir, path, sys.exc_info())
2020-11-05T11:47:51.1836368Z             entries = []
2020-11-05T11:47:51.1836699Z         for entry in entries:
2020-11-05T11:47:51.1837066Z             fullname = entry.path
2020-11-05T11:47:51.1837389Z             try:
2020-11-05T11:47:51.1837770Z                 is_dir = entry.is_dir(follow_symlinks=False)
2020-11-05T11:47:51.1838191Z             except OSError:
2020-11-05T11:47:51.1838468Z                 is_dir = False
2020-11-05T11:47:51.1838759Z             if is_dir:
2020-11-05T11:47:51.1839031Z                 try:
2020-11-05T11:47:51.1839356Z                     if entry.is_symlink():
2020-11-05T11:47:51.1839791Z                         # This can only happen if someone replaces
2020-11-05T11:47:51.1840288Z                         # a directory with a symlink after the call to
2020-11-05T11:47:51.1840796Z                         # os.scandir or entry.is_dir above.
2020-11-05T11:47:51.1841309Z                         raise OSError("Cannot call rmtree on a symbolic link")
2020-11-05T11:47:51.1841759Z                 except OSError:
2020-11-05T11:47:51.1842192Z                     onerror(os.path.islink, fullname, sys.exc_info())
2020-11-05T11:47:51.1842652Z                     continue
2020-11-05T11:47:51.1843040Z                 _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1843401Z             else:
2020-11-05T11:47:51.1843669Z                 try:
2020-11-05T11:47:51.1843983Z >                   os.unlink(fullname)
2020-11-05T11:47:51.1844932Z E                   PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full\\8170481a1c-2409262631816-2409262744904-2409300810632'
2020-11-05T11:47:51.1845743Z 
2020-11-05T11:47:51.1846269Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:398: PermissionError
2020-11-05T11:47:51.1846984Z ________________________ ElementStreamTest.test_read_n ________________________
2020-11-05T11:47:51.1847658Z [gw1] win32 -- Python 3.7.9 d:\a\beam\beam\sdks\python\target\.tox\py37-win\scripts\python.exe
2020-11-05T11:47:51.1848031Z 
2020-11-05T11:47:51.1848916Z self = <apache_beam.runners.interactive.recording_manager_test.ElementStreamTest testMethod=test_read_n>
2020-11-05T11:47:51.1849721Z 
2020-11-05T11:47:51.1849998Z     def setUp(self):
2020-11-05T11:47:51.1850303Z >     ie.new_env()
2020-11-05T11:47:51.1850473Z 
2020-11-05T11:47:51.1850909Z apache_beam\runners\interactive\recording_manager_test.py:75: 
2020-11-05T11:47:51.1851376Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1851907Z apache_beam\runners\interactive\interactive_environment.py:118: in new_env
2020-11-05T11:47:51.1852514Z     _interactive_beam_env.cleanup()
2020-11-05T11:47:51.1853073Z apache_beam\runners\interactive\interactive_environment.py:272: in cleanup
2020-11-05T11:47:51.1853675Z     cache_manager.cleanup()
2020-11-05T11:47:51.1854581Z apache_beam\runners\interactive\caching\streaming_cache.py:391: in cleanup
2020-11-05T11:47:51.1855316Z     shutil.rmtree(self._cache_dir)
2020-11-05T11:47:51.1856079Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:516: in rmtree
2020-11-05T11:47:51.1856716Z     return _rmtree_unsafe(path, onerror)
2020-11-05T11:47:51.1857541Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:395: in _rmtree_unsafe
2020-11-05T11:47:51.1858257Z     _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1858963Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:400: in _rmtree_unsafe
2020-11-05T11:47:51.1859788Z     onerror(os.unlink, fullname, sys.exc_info())
2020-11-05T11:47:51.1860317Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1860654Z 
2020-11-05T11:47:51.1861232Z path = 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full'
2020-11-05T11:47:51.1861980Z onerror = <function rmtree.<locals>.onerror at 0x00000230F61C7AF8>
2020-11-05T11:47:51.1862420Z 
2020-11-05T11:47:51.1862876Z     def _rmtree_unsafe(path, onerror):
2020-11-05T11:47:51.1863389Z         try:
2020-11-05T11:47:51.1863875Z             with os.scandir(path) as scandir_it:
2020-11-05T11:47:51.1864525Z                 entries = list(scandir_it)
2020-11-05T11:47:51.1865155Z         except OSError:
2020-11-05T11:47:51.1865773Z             onerror(os.scandir, path, sys.exc_info())
2020-11-05T11:47:51.1866299Z             entries = []
2020-11-05T11:47:51.1866703Z         for entry in entries:
2020-11-05T11:47:51.1867212Z             fullname = entry.path
2020-11-05T11:47:51.1867658Z             try:
2020-11-05T11:47:51.1868168Z                 is_dir = entry.is_dir(follow_symlinks=False)
2020-11-05T11:47:51.1868712Z             except OSError:
2020-11-05T11:47:51.1869163Z                 is_dir = False
2020-11-05T11:47:51.1869574Z             if is_dir:
2020-11-05T11:47:51.1869966Z                 try:
2020-11-05T11:47:51.1870417Z                     if entry.is_symlink():
2020-11-05T11:47:51.1870984Z                         # This can only happen if someone replaces
2020-11-05T11:47:51.1871617Z                         # a directory with a symlink after the call to
2020-11-05T11:47:51.1872169Z                         # os.scandir or entry.is_dir above.
2020-11-05T11:47:51.1872788Z                         raise OSError("Cannot call rmtree on a symbolic link")
2020-11-05T11:47:51.1873345Z                 except OSError:
2020-11-05T11:47:51.1873940Z                     onerror(os.path.islink, fullname, sys.exc_info())
2020-11-05T11:47:51.1874502Z                     continue
2020-11-05T11:47:51.1875002Z                 _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1875528Z             else:
2020-11-05T11:47:51.1875904Z                 try:
2020-11-05T11:47:51.1876434Z >                   os.unlink(fullname)
2020-11-05T11:47:51.1877646Z E                   PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full\\8170481a1c-2409262631816-2409262744904-2409300810632'
2020-11-05T11:47:51.1878497Z 
2020-11-05T11:47:51.1879118Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:398: PermissionError
2020-11-05T11:47:51.1879906Z _________________________ RecordingTest.test_computed _________________________
2020-11-05T11:47:51.1880643Z [gw1] win32 -- Python 3.7.9 d:\a\beam\beam\sdks\python\target\.tox\py37-win\scripts\python.exe
2020-11-05T11:47:51.1881173Z 
2020-11-05T11:47:51.1882090Z self = <apache_beam.runners.interactive.recording_manager_test.RecordingTest testMethod=test_computed>
2020-11-05T11:47:51.1882929Z 
2020-11-05T11:47:51.1883308Z     def setUp(self):
2020-11-05T11:47:51.1883716Z >     ie.new_env()
2020-11-05T11:47:51.1883994Z 
2020-11-05T11:47:51.1884531Z apache_beam\runners\interactive\recording_manager_test.py:197: 
2020-11-05T11:47:51.1885102Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1885870Z apache_beam\runners\interactive\interactive_environment.py:118: in new_env
2020-11-05T11:47:51.1886524Z     _interactive_beam_env.cleanup()
2020-11-05T11:47:51.1887132Z apache_beam\runners\interactive\interactive_environment.py:272: in cleanup
2020-11-05T11:47:51.1887824Z     cache_manager.cleanup()
2020-11-05T11:47:51.1888396Z apache_beam\runners\interactive\caching\streaming_cache.py:391: in cleanup
2020-11-05T11:47:51.1888964Z     shutil.rmtree(self._cache_dir)
2020-11-05T11:47:51.1889592Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:516: in rmtree
2020-11-05T11:47:51.1890108Z     return _rmtree_unsafe(path, onerror)
2020-11-05T11:47:51.1890693Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:395: in _rmtree_unsafe
2020-11-05T11:47:51.1891276Z     _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1891855Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:400: in _rmtree_unsafe
2020-11-05T11:47:51.1892466Z     onerror(os.unlink, fullname, sys.exc_info())
2020-11-05T11:47:51.1892860Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2020-11-05T11:47:51.1893028Z 
2020-11-05T11:47:51.1893473Z path = 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full'
2020-11-05T11:47:51.1894087Z onerror = <function rmtree.<locals>.onerror at 0x00000230F61C75E8>
2020-11-05T11:47:51.1894436Z 
2020-11-05T11:47:51.1894763Z     def _rmtree_unsafe(path, onerror):
2020-11-05T11:47:51.1895061Z         try:
2020-11-05T11:47:51.1895474Z             with os.scandir(path) as scandir_it:
2020-11-05T11:47:51.1895896Z                 entries = list(scandir_it)
2020-11-05T11:47:51.1896256Z         except OSError:
2020-11-05T11:47:51.1896675Z             onerror(os.scandir, path, sys.exc_info())
2020-11-05T11:47:51.1897072Z             entries = []
2020-11-05T11:47:51.1897395Z         for entry in entries:
2020-11-05T11:47:51.1897717Z             fullname = entry.path
2020-11-05T11:47:51.1898038Z             try:
2020-11-05T11:47:51.1898425Z                 is_dir = entry.is_dir(follow_symlinks=False)
2020-11-05T11:47:51.1898840Z             except OSError:
2020-11-05T11:47:51.1899164Z                 is_dir = False
2020-11-05T11:47:51.1899704Z             if is_dir:
2020-11-05T11:47:51.1900114Z                 try:
2020-11-05T11:47:51.1900557Z                     if entry.is_symlink():
2020-11-05T11:47:51.1901112Z                         # This can only happen if someone replaces
2020-11-05T11:47:51.1901736Z                         # a directory with a symlink after the call to
2020-11-05T11:47:51.1902339Z                         # os.scandir or entry.is_dir above.
2020-11-05T11:47:51.1902919Z                         raise OSError("Cannot call rmtree on a symbolic link")
2020-11-05T11:47:51.1903489Z                 except OSError:
2020-11-05T11:47:51.1904078Z                     onerror(os.path.islink, fullname, sys.exc_info())
2020-11-05T11:47:51.1904653Z                     continue
2020-11-05T11:47:51.1905158Z                 _rmtree_unsafe(fullname, onerror)
2020-11-05T11:47:51.1905693Z             else:
2020-11-05T11:47:51.1906071Z                 try:
2020-11-05T11:47:51.1906504Z >                   os.unlink(fullname)
2020-11-05T11:47:51.1907632Z E                   PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py37-win\\tmp\\it-4g2l8t_s2409300810632\\full\\8170481a1c-2409262631816-2409262744904-2409300810632'
2020-11-05T11:47:51.1908537Z 
2020-11-05T11:47:51.1909119Z c:\hostedtoolcache\windows\python\3.7.9\x64\lib\shutil.py:398: PermissionError
2020-11-05T11:47:51.1909826Z ============================== warnings summary ===============================
{noformat}

> Python unit tests on windows flaky
> ----------------------------------
>
>                 Key: BEAM-10921
>                 URL: https://issues.apache.org/jira/browse/BEAM-10921
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Brian Hulette
>            Assignee: Ning Kang
>            Priority: P1
>              Labels: currently-failing, flake
>             Fix For: Not applicable
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Over the past few days python unit tests have been failing frequently. The errors always seem to occur when cleaning up the interactive environment:
> {code}
> ...........                                                              [100%]
> ================================== FAILURES ===================================
> _ PipelineInstrumentTest.test_able_to_cache_intermediate_unbounded_source_pcollection _
> [gw2] win32 -- Python 3.5.4 d:\a\beam\beam\sdks\python\target\.tox\py35-win\scripts\python.exe
> self = <apache_beam.runners.interactive.pipeline_instrument_test.PipelineInstrumentTest testMethod=test_able_to_cache_intermediate_unbounded_source_pcollection>
>     def setUp(self):
> >     ie.new_env()
> apache_beam\runners\interactive\pipeline_instrument_test.py:46: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> apache_beam\runners\interactive\interactive_environment.py:117: in new_env
>     _interactive_beam_env.cleanup()
> apache_beam\runners\interactive\interactive_environment.py:273: in cleanup
>     cache_manager.cleanup()
> apache_beam\runners\interactive\caching\streaming_cache.py:391: in cleanup
>     shutil.rmtree(self._cache_dir)
> c:\hostedtoolcache\windows\python\3.5.4\x64\lib\shutil.py:494: in rmtree
>     return _rmtree_unsafe(path, onerror)
> c:\hostedtoolcache\windows\python\3.5.4\x64\lib\shutil.py:384: in _rmtree_unsafe
>     _rmtree_unsafe(fullname, onerror)
> c:\hostedtoolcache\windows\python\3.5.4\x64\lib\shutil.py:389: in _rmtree_unsafe
>     onerror(os.unlink, fullname, sys.exc_info())
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> path = 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py35-win\\tmp\\it-8vh2z7pi2021914046928\\full'
> onerror = <function rmtree.<locals>.onerror at 0x000001D6C3E5C7B8>
>     def _rmtree_unsafe(path, onerror):
>         try:
>             if os.path.islink(path):
>                 # symlinks to directories are forbidden, see bug #1669
>                 raise OSError("Cannot call rmtree on a symbolic link")
>         except OSError:
>             onerror(os.path.islink, path, sys.exc_info())
>             # can't continue even if onerror hook returns
>             return
>         names = []
>         try:
>             names = os.listdir(path)
>         except OSError:
>             onerror(os.listdir, path, sys.exc_info())
>         for name in names:
>             fullname = os.path.join(path, name)
>             try:
>                 mode = os.lstat(fullname).st_mode
>             except OSError:
>                 mode = 0
>             if stat.S_ISDIR(mode):
>                 _rmtree_unsafe(fullname, onerror)
>             else:
>                 try:
> >                   os.unlink(fullname)
> E                   PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\a\\beam\\beam\\sdks\\python\\target\\.tox\\py35-win\\tmp\\it-8vh2z7pi2021914046928\\full\\ac8879590f-2021876280456-2021876278608-2021914046928'
> c:\hostedtoolcache\windows\python\3.5.4\x64\lib\shutil.py:387: PermissionError
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)