[ 
https://issues.apache.org/jira/browse/BEAM-14112?focusedWorklogId=753764&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753764
 ]

ASF GitHub Bot logged work on BEAM-14112:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Apr/22 23:05
            Start Date: 06/Apr/22 23:05
    Worklog Time Spent: 10m 
      Work Description: codecov[bot] commented on PR #17306:
URL: https://github.com/apache/beam/pull/17306#issuecomment-1090900275

   # 
[Codecov](https://codecov.io/gh/apache/beam/pull/17306?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#17306](https://codecov.io/gh/apache/beam/pull/17306?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (34e3dc2) into 
[master](https://codecov.io/gh/apache/beam/commit/880b10e71b963de6ec20efe614dd866e9a809da4?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (880b10e) will **decrease** coverage by `0.01%`.
   > The diff coverage is `63.63%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17306      +/-   ##
   ==========================================
   - Coverage   74.15%   74.14%   -0.02%     
   ==========================================
     Files         676      676              
     Lines       89008    89020      +12     
   ==========================================
     Hits        66002    66002              
   - Misses      21859    21871      +12     
     Partials     1147     1147              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | python | `83.67% <63.63%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/beam/pull/17306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[sdks/python/apache\_beam/io/gcp/bigquery.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vZ2NwL2JpZ3F1ZXJ5LnB5)
 | `63.76% <63.63%> (+0.13%)` | :arrow_up: |
   | 
[.../python/apache\_beam/testing/test\_stream\_service.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdGVzdGluZy90ZXN0X3N0cmVhbV9zZXJ2aWNlLnB5)
 | `88.37% <0.00%> (-4.66%)` | :arrow_down: |
   | 
[sdks/python/apache\_beam/coders/typecoders.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vY29kZXJzL3R5cGVjb2RlcnMucHk=)
 | `92.40% <0.00%> (-2.27%)` | :arrow_down: |
   | 
[...che\_beam/runners/interactive/interactive\_runner.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS9pbnRlcmFjdGl2ZV9ydW5uZXIucHk=)
 | `90.84% <0.00%> (-2.12%)` | :arrow_down: |
   | 
[...eam/runners/portability/fn\_api\_runner/execution.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9wb3J0YWJpbGl0eS9mbl9hcGlfcnVubmVyL2V4ZWN1dGlvbi5weQ==)
 | `92.25% <0.00%> (-0.81%)` | :arrow_down: |
   | 
[sdks/python/apache\_beam/runners/direct/executor.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kaXJlY3QvZXhlY3V0b3IucHk=)
 | `96.46% <0.00%> (-0.55%)` | :arrow_down: |
   | 
[...hon/apache\_beam/runners/worker/bundle\_processor.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy93b3JrZXIvYnVuZGxlX3Byb2Nlc3Nvci5weQ==)
 | `93.51% <0.00%> (-0.13%)` | :arrow_down: |
   | 
[sdks/python/apache\_beam/io/parquetio.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vcGFycXVldGlvLnB5)
 | `96.13% <0.00%> (+0.04%)` | :arrow_up: |
   | 
[...runners/interactive/display/pcoll\_visualization.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS9kaXNwbGF5L3Bjb2xsX3Zpc3VhbGl6YXRpb24ucHk=)
 | `86.36% <0.00%> (+0.50%)` | :arrow_up: |
   | 
[...pache\_beam/runners/interactive/interactive\_beam.py](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS9pbnRlcmFjdGl2ZV9iZWFtLnB5)
 | `81.81% <0.00%> (+0.72%)` | :arrow_up: |
   | ... and [1 
more](https://codecov.io/gh/apache/beam/pull/17306/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | |
   
   ------
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/beam/pull/17306?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/beam/pull/17306?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
 Last update 
[880b10e...34e3dc2](https://codecov.io/gh/apache/beam/pull/17306?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
 Read the [comment 
docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 753764)
    Time Spent: 10h  (was: 9h 50m)

> ReadFromBigQuery cannot be used with the interactive runner
> -----------------------------------------------------------
>
>                 Key: BEAM-14112
>                 URL: https://issues.apache.org/jira/browse/BEAM-14112
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-py-gcp, runner-py-interactive
>    Affects Versions: 2.35.0, 2.36.0, 2.37.0
>            Reporter: Chun Yang
>            Assignee: Ning
>            Priority: P2
>          Time Spent: 10h
>  Remaining Estimate: 0h
>
> A change in Apache Beam 2.35.0 caused ReadFromBigQuery to no longer work with 
> the Python interactive runner.
> The error can be reproduced with the following code:
> {code:python}#!/usr/bin/env python
> """Reproduce pickle issue when using RFBQ in interactive runner."""
> import apache_beam as beam                                                    
>     
> from apache_beam.runners.interactive.interactive_runner import 
> InteractiveRunner  
> import apache_beam.runners.interactive.interactive_beam as ib                 
>     
>                                                                               
>     
>                                                                               
>     
> options = beam.options.pipeline_options.PipelineOptions(                      
>     
>     project="...",                                                
>     temp_location="...",                              
> )                                                                             
>     
>                                                                               
>     
> pipeline = beam.Pipeline(InteractiveRunner(), options=options)                
>     
> pcoll = pipeline | beam.io.ReadFromBigQuery(query="SELECT 1")                 
>     
> print(ib.collect(pcoll)){code}
> {code:none}Traceback (most recent call last):
>   File "apache_beam/runners/common.py", line 1198, in 
> apache_beam.runners.common.DoFnRunner.process
>   File "apache_beam/runners/common.py", line 536, in 
> apache_beam.runners.common.SimpleInvoker.invoke_process
>   File "apache_beam/runners/common.py", line 1361, in 
> apache_beam.runners.common._OutputProcessor.process_outputs
>   File "apache_beam/runners/worker/operations.py", line 214, in 
> apache_beam.runners.worker.operations.SingletonConsumerSet.receive
>   File "apache_beam/runners/worker/operations.py", line 178, in 
> apache_beam.runners.worker.operations.ConsumerSet.update_counters_start
>   File "apache_beam/runners/worker/opcounters.py", line 211, in 
> apache_beam.runners.worker.opcounters.OperationCounters.update_from
>   File "apache_beam/runners/worker/opcounters.py", line 250, in 
> apache_beam.runners.worker.opcounters.OperationCounters.do_sample
>   File "apache_beam/coders/coder_impl.py", line 1425, in 
> apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 1436, in 
> apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 987, in 
> apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 987, in 
> apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 207, in 
> apache_beam.coders.coder_impl.CoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 1514, in 
> apache_beam.coders.coder_impl.LengthPrefixCoderImpl.estimate_size
>   File "apache_beam/coders/coder_impl.py", line 246, in 
> apache_beam.coders.coder_impl.StreamCoderImpl.estimate_size
>   File "apache_beam/coders/coder_impl.py", line 441, in 
> apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream
>   File "apache_beam/coders/coder_impl.py", line 268, in 
> apache_beam.coders.coder_impl.CallbackCoderImpl.encode_to_stream
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/coders/coders.py",
>  line 802, in <lambda>
>     lambda x: dumps(x, protocol), pickle.loads)
> TypeError: can't pickle generator objects
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "repro.py", line 16, in <module>
>     print(ib.collect(pcoll))
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/interactive/utils.py",
>  line 270, in run_within_progress_indicator
>     return func(*args, **kwargs)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/interactive/interactive_beam.py",
>  line 664, in collect
>     recording = recording_manager.record([pcoll], max_n=n, 
> max_duration=duration)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/interactive/recording_manager.py",
>  line 458, in record
>     self.user_pipeline.options).run()
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/interactive/pipeline_fragment.py",
>  line 113, in run
>     return self.deduce_fragment().run()
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/pipeline.py",
>  line 573, in run
>     return self.runner.run_pipeline(self, self._options)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/interactive/interactive_runner.py",
>  line 195, in run_pipeline
>     pipeline_to_execute.run(), pipeline_instrument)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/pipeline.py",
>  line 573, in run
>     return self.runner.run_pipeline(self, self._options)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/direct/direct_runner.py",
>  line 131, in run_pipeline
>     return runner.run_pipeline(pipeline, options)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py",
>  line 200, in run_pipeline
>     pipeline.to_runner_api(default_environment=self._default_environment))
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py",
>  line 210, in run_via_runner_api
>     return self.run_stages(stage_context, stages)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py",
>  line 396, in run_stages
>     runner_execution_context, bundle_context_manager)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py",
>  line 667, in _run_stage
>     bundle_manager))
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py",
>  line 784, in _run_bundle
>     data_input, data_output, input_timers, expected_timer_output)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py",
>  line 1094, in process_bundle
>     result_future = self._worker_handler.control_conn.push(process_bundle_req)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/portability/fn_api_runner/worker_handlers.py",
>  line 378, in push
>     response = self.worker.do_instruction(request)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/worker/sdk_worker.py",
>  line 581, in do_instruction
>     getattr(request, request_type), request.instruction_id)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/worker/sdk_worker.py",
>  line 618, in process_bundle
>     bundle_processor.process_bundle(instruction_id))
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/worker/bundle_processor.py",
>  line 996, in process_bundle
>     element.data)
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/runners/worker/bundle_processor.py",
>  line 221, in process_encoded
>     self.output(decoded_value)
>   File "apache_beam/runners/worker/operations.py", line 346, in 
> apache_beam.runners.worker.operations.Operation.output
>   File "apache_beam/runners/worker/operations.py", line 348, in 
> apache_beam.runners.worker.operations.Operation.output
>   File "apache_beam/runners/worker/operations.py", line 215, in 
> apache_beam.runners.worker.operations.SingletonConsumerSet.receive
>   File "apache_beam/runners/worker/operations.py", line 707, in 
> apache_beam.runners.worker.operations.DoOperation.process
>   File "apache_beam/runners/worker/operations.py", line 708, in 
> apache_beam.runners.worker.operations.DoOperation.process
>   File "apache_beam/runners/common.py", line 1200, in 
> apache_beam.runners.common.DoFnRunner.process
>   File "apache_beam/runners/common.py", line 1265, in 
> apache_beam.runners.common.DoFnRunner._reraise_augmented
>   File "apache_beam/runners/common.py", line 1198, in 
> apache_beam.runners.common.DoFnRunner.process
>   File "apache_beam/runners/common.py", line 536, in 
> apache_beam.runners.common.SimpleInvoker.invoke_process
>   File "apache_beam/runners/common.py", line 1361, in 
> apache_beam.runners.common._OutputProcessor.process_outputs
>   File "apache_beam/runners/worker/operations.py", line 215, in 
> apache_beam.runners.worker.operations.SingletonConsumerSet.receive
>   File "apache_beam/runners/worker/operations.py", line 707, in 
> apache_beam.runners.worker.operations.DoOperation.process
>   File "apache_beam/runners/worker/operations.py", line 708, in 
> apache_beam.runners.worker.operations.DoOperation.process
>   File "apache_beam/runners/common.py", line 1200, in 
> apache_beam.runners.common.DoFnRunner.process
>   File "apache_beam/runners/common.py", line 1265, in 
> apache_beam.runners.common.DoFnRunner._reraise_augmented
>   File "apache_beam/runners/common.py", line 1198, in 
> apache_beam.runners.common.DoFnRunner.process
>   File "apache_beam/runners/common.py", line 536, in 
> apache_beam.runners.common.SimpleInvoker.invoke_process
>   File "apache_beam/runners/common.py", line 1361, in 
> apache_beam.runners.common._OutputProcessor.process_outputs
>   File "apache_beam/runners/worker/operations.py", line 215, in 
> apache_beam.runners.worker.operations.SingletonConsumerSet.receive
>   File "apache_beam/runners/worker/operations.py", line 707, in 
> apache_beam.runners.worker.operations.DoOperation.process
>   File "apache_beam/runners/worker/operations.py", line 708, in 
> apache_beam.runners.worker.operations.DoOperation.process
>   File "apache_beam/runners/common.py", line 1200, in 
> apache_beam.runners.common.DoFnRunner.process
>   File "apache_beam/runners/common.py", line 1281, in 
> apache_beam.runners.common.DoFnRunner._reraise_augmented
>   File "apache_beam/runners/common.py", line 1198, in 
> apache_beam.runners.common.DoFnRunner.process
>   File "apache_beam/runners/common.py", line 536, in 
> apache_beam.runners.common.SimpleInvoker.invoke_process
>   File "apache_beam/runners/common.py", line 1361, in 
> apache_beam.runners.common._OutputProcessor.process_outputs
>   File "apache_beam/runners/worker/operations.py", line 214, in 
> apache_beam.runners.worker.operations.SingletonConsumerSet.receive
>   File "apache_beam/runners/worker/operations.py", line 178, in 
> apache_beam.runners.worker.operations.ConsumerSet.update_counters_start
>   File "apache_beam/runners/worker/opcounters.py", line 211, in 
> apache_beam.runners.worker.opcounters.OperationCounters.update_from
>   File "apache_beam/runners/worker/opcounters.py", line 250, in 
> apache_beam.runners.worker.opcounters.OperationCounters.do_sample
>   File "apache_beam/coders/coder_impl.py", line 1425, in 
> apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 1436, in 
> apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 987, in 
> apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 987, in 
> apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 207, in 
> apache_beam.coders.coder_impl.CoderImpl.get_estimated_size_and_observables
>   File "apache_beam/coders/coder_impl.py", line 1514, in 
> apache_beam.coders.coder_impl.LengthPrefixCoderImpl.estimate_size
>   File "apache_beam/coders/coder_impl.py", line 246, in 
> apache_beam.coders.coder_impl.StreamCoderImpl.estimate_size
>   File "apache_beam/coders/coder_impl.py", line 441, in 
> apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream
>   File "apache_beam/coders/coder_impl.py", line 268, in 
> apache_beam.coders.coder_impl.CallbackCoderImpl.encode_to_stream
>   File 
> "/home/chuck.yang/src/venv/py3-general/lib/python3.7/site-packages/apache_beam/coders/coders.py",
>  line 802, in <lambda>
>     lambda x: dumps(x, protocol), pickle.loads)
> TypeError: can't pickle generator objects [while running 
> 'ReadFromBigQuery/Read/SDFBoundedSourceReader/ParDo(SDFBoundedSourceDoFn)/SplitAndSizeRestriction']{code}
> I suspect the error is caused by this change that was first released in 
> 2.35.0: https://github.com/apache/beam/pull/15610



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to