Ahmet Altay created BEAM-9318:
---------------------------------

             Summary: Py 2 Precommit Flake: PortableRunnerTestWithLocalDocker 
test flaky
                 Key: BEAM-9318
                 URL: https://issues.apache.org/jira/browse/BEAM-9318
             Project: Beam
          Issue Type: Bug
          Components: sdk-py-core, testing
            Reporter: Ahmet Altay
            Assignee: Robert Bradshaw


Log: [https://builds.apache.org/job/beam_PreCommit_Python_Commit/11178/]

Precommit PR: (This looks like an unrelated change): 
https://github.com/apache/beam/pull/10856

Maybe result object is not available yet?

Error:
08:29:55 self = 
<apache_beam.runners.portability.portable_runner_test.PortableRunnerTestWithLocalDocker
 testMethod=test_metrics>
08:29:55 check_gauge = True
08:29:55 
08:29:55 def test_metrics(self, check_gauge=True):
08:29:55 p = self.create_pipeline()
08:29:55 
08:29:55 counter = beam.metrics.Metrics.counter('ns', 'counter')
08:29:55 distribution = beam.metrics.Metrics.distribution('ns', 'distribution')
08:29:55 gauge = beam.metrics.Metrics.gauge('ns', 'gauge')
08:29:55 
08:29:55 pcoll = p | beam.Create(['a', 'zzz'])
08:29:55 # pylint: disable=expression-not-assigned
08:29:55 pcoll | 'count1' >> beam.FlatMap(lambda x: counter.inc())
08:29:55 pcoll | 'count2' >> beam.FlatMap(lambda x: counter.inc(len(x)))
08:29:55 pcoll | 'dist' >> beam.FlatMap(lambda x: distribution.update(len(x)))
08:29:55 pcoll | 'gauge' >> beam.FlatMap(lambda x: gauge.set(3))
08:29:55 
08:29:55 res = p.run()
08:29:55 res.wait_until_finish()
08:29:55 > c1, = 
res.metrics().query(beam.metrics.MetricsFilter().with_step('count1'))[
08:29:55 'counters']
08:29:55 
08:29:55 apache_beam/runners/portability/fn_api_runner_test.py:699: 
08:29:55 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ 
08:29:55 apache_beam/runners/portability/portable_runner.py:415: in metrics
08:29:55 beam_job_api_pb2.GetJobMetricsRequest(job_id=self._job_id))
08:29:55 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ 
08:29:55 
08:29:55 self = 
<apache_beam.runners.portability.local_job_service.LocalJobServicer object at 
0x7f5ada471590>
08:29:55 request = job_id: "job-be9e2a01-154f-4707-b04a-3d7ffbc39afb"
08:29:55 , context = None
08:29:55 
08:29:55 def GetJobMetrics(self, request, context=None):
08:29:55 if request.job_id not in self._jobs:
08:29:55 raise LookupError("Job {} does not exist".format(request.job_id))
08:29:55 
08:29:55 result = self._jobs[request.job_id].result
08:29:55 monitoring_info_list = []
08:29:55 > for mi in result._monitoring_infos_by_stage.values():
08:29:55 E AttributeError: 'NoneType' object has no attribute 
'_monitoring_infos_by_stage'
08:29:55 
08:29:55 apache_beam/runners/portability/local_job_service.py:157: 
AttributeError




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

Reply via email to