beam icon indicating copy to clipboard operation
beam copied to clipboard

Remove subprocess.PIPE usage by using a temp file

Open chamikaramj opened this issue 2 years ago • 1 comments

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Choose reviewer(s) and mention them in a comment (R: @username).
  • [ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with noteworthy changes.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI.

chamikaramj avatar Aug 10 '22 08:08 chamikaramj

Codecov Report

Merging #22654 (5901176) into master (4799828) will decrease coverage by 0.01%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #22654      +/-   ##
==========================================
- Coverage   74.20%   74.18%   -0.02%     
==========================================
  Files         708      708              
  Lines       93465    93473       +8     
==========================================
- Hits        69352    69347       -5     
- Misses      22838    22851      +13     
  Partials     1275     1275              
Flag Coverage Δ
python 83.59% <0.00%> (-0.02%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdks/python/apache_beam/utils/subprocess_server.py 56.54% <0.00%> (-2.20%) :arrow_down:
.../python/apache_beam/testing/test_stream_service.py 88.09% <0.00%> (-4.77%) :arrow_down:
...che_beam/runners/interactive/interactive_runner.py 90.06% <0.00%> (-1.33%) :arrow_down:
sdks/python/apache_beam/internal/metrics/metric.py 93.00% <0.00%> (-1.00%) :arrow_down:
...hon/apache_beam/runners/direct/test_stream_impl.py 93.28% <0.00%> (-0.75%) :arrow_down:
sdks/python/apache_beam/transforms/combiners.py 93.05% <0.00%> (-0.39%) :arrow_down:
...ks/python/apache_beam/runners/worker/sdk_worker.py 88.94% <0.00%> (-0.16%) :arrow_down:
...on/apache_beam/runners/dataflow/dataflow_runner.py 82.87% <0.00%> (-0.14%) :arrow_down:
...hon/apache_beam/runners/worker/bundle_processor.py 93.42% <0.00%> (-0.13%) :arrow_down:
sdks/python/apache_beam/runners/direct/executor.py 97.01% <0.00%> (+0.54%) :arrow_up:
... and 1 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 10 '22 08:08 codecov[bot]

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @TheNeuralBit for label python.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

github-actions[bot] avatar Aug 10 '22 11:08 github-actions[bot]

Run XVR_PythonUsingJava_Dataflow PostCommit

chamikaramj avatar Aug 10 '22 18:08 chamikaramj

Run XVR_Direct PostCommit

chamikaramj avatar Aug 10 '22 18:08 chamikaramj

@robertwb I think you had concerns about this change.

Do you think this should be reverted ?

chamikaramj avatar Aug 24 '22 21:08 chamikaramj

@robertwb I think you had concerns about this change.

Do you think this should be reverted ?

I'm curious what the concerns were. My understanding was that this was a net positive, orthogonal to the grpc issue.

TheNeuralBit avatar Sep 07 '22 14:09 TheNeuralBit

@TheNeuralBit I reverted it before the new release cut since new grpcio has been released and we haven't run into issues. I think @robertwb believed that PIPE is the correct construct to use here (instead of temp files) and we should not run into deadlocks due to the way we use PIPE. We can get it in again in the future if needed.

chamikaramj avatar Sep 08 '22 17:09 chamikaramj