You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Brian Hulette (Jira)" <ji...@apache.org> on 2021/04/09 22:16:00 UTC

[jira] [Commented] (BEAM-11666) apache_beam.runners.interactive.recording_manager_test.RecordingManagerTest.test_basic_execution is flaky

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

Brian Hulette commented on BEAM-11666:
--------------------------------------

Saw a flake in RecordingManagerTest.test_clear here: https://github.com/apache/beam/pull/14308/checks?check_run_id=2308066548

{code}
=================================== FAILURES ===================================
_______________________ RecordingManagerTest.test_clear ________________________
[gw1] darwin -- Python 3.7.10 /Users/runner/work/beam/beam/sdks/python/target/.tox/py37/bin/python

self = <apache_beam.runners.interactive.recording_manager_test.RecordingManagerTest testMethod=test_clear>

    def test_clear(self):
      """Tests that clear can empty the cache for a specific pipeline."""
    
      # Create two pipelines so we can check that clearing the cache won't clear
      # all defined pipelines.
      p1 = beam.Pipeline(InteractiveRunner())
      elems_1 = p1 | 'elems 1' >> beam.Create([0, 1, 2])
    
      p2 = beam.Pipeline(InteractiveRunner())
      elems_2 = p2 | 'elems 2' >> beam.Create([0, 1, 2])
    
      # Watch the pipeline and PCollections. This is normally done in a notebook
      # environment automatically, but we have to do it manually here.
      ib.watch(locals())
      ie.current_env().track_user_pipelines()
    
      # Create the recording objects. By calling `record` a new PipelineFragment
      # is started to compute the given PCollections and cache to disk.
      rm_1 = RecordingManager(p1)
      recording = rm_1.record([elems_1], max_n=3, max_duration=500)
      recording.wait_until_finish()
    
      rm_2 = RecordingManager(p2)
      recording = rm_2.record([elems_2], max_n=3, max_duration=500)
      recording.wait_until_finish()
    
      # Assert that clearing only one recording clears that recording.
>     self.assertGreater(rm_1.describe()['size'], 0)
E     AssertionError: 0 not greater than 0
{code}

> apache_beam.runners.interactive.recording_manager_test.RecordingManagerTest.test_basic_execution is flaky
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-11666
>                 URL: https://issues.apache.org/jira/browse/BEAM-11666
>             Project: Beam
>          Issue Type: Bug
>          Components: test-failures
>            Reporter: Valentyn Tymofieiev
>            Assignee: Sam Rohde
>            Priority: P1
>              Labels: flake
>
> Happened in: https://ci-beam.apache.org/job/beam_PreCommit_Python_Commit/16819
> {noformat}
> self = <apache_beam.runners.interactive.recording_manager_test.RecordingManagerTest testMethod=test_basic_execution>
>     @unittest.skipIf(
>         sys.version_info < (3, 6, 0),
>         'This test requires at least Python 3.6 to work.')
>     def test_basic_execution(self):
>       """A basic pipeline to be used as a smoke test."""
>     
>       # Create the pipeline that will emit 0, 1, 2.
>       p = beam.Pipeline(InteractiveRunner())
>       numbers = p | 'numbers' >> beam.Create([0, 1, 2])
>       letters = p | 'letters' >> beam.Create(['a', 'b', 'c'])
>     
>       # Watch the pipeline and PCollections. This is normally done in a notebook
>       # environment automatically, but we have to do it manually here.
>       ib.watch(locals())
>       ie.current_env().track_user_pipelines()
>     
>       # Create the recording objects. By calling `record` a new PipelineFragment
>       # is started to compute the given PCollections and cache to disk.
>       rm = RecordingManager(p)
> >     numbers_recording = rm.record([numbers], max_n=3, max_duration=500)
> apache_beam/runners/interactive/recording_manager_test.py:331: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> apache_beam/runners/interactive/recording_manager.py:435: in record
>     self._clear(pipeline_instrument)
> apache_beam/runners/interactive/recording_manager.py:319: in _clear
>     self._clear_pcolls(cache_manager, set(to_clear))
> apache_beam/runners/interactive/recording_manager.py:323: in _clear_pcolls
>     cache_manager.clear('full', pc)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> self = <apache_beam.runners.interactive.testing.test_cache_manager.InMemoryCache object at 0x7fa3903ac208>
> labels = ('full', 'ee5c35ce3d-140340882711664-140340882712560-140340476166608')
>     def clear(self, *labels):
>       # type (*str) -> Boolean
>     
>       """Clears the cache entry of the given labels and returns True on success.
>     
>       Args:
>         value: An encodable (with corresponding PCoder) value
>         *labels: List of labels for PCollection instance
>       """
> >     raise NotImplementedError
> E     NotImplementedError
> {noformat}



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