beam icon indicating copy to clipboard operation
beam copied to clipboard

Log a warning, if the process method of DoFn returns None

Open timgrein opened this issue 1 year ago • 11 comments

Addresses #28061

This PR adds a warning log, if the process method of DoFn returns None by checking the following cases (doesn't check inner functions):

  • process contains return None (explicit return None)
  • process contains only return (implicit return None)
  • process doesn't contain yield neither does it contain return (implicit return None)

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

  • [x] 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.
  • [x] 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 or the workflows README to see a list of phrases to trigger workflows.

timgrein avatar Aug 25 '23 14:08 timgrein

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6bfb469) 72.31% compared to head (447a7f3) 72.30%. Report is 1493 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #28159      +/-   ##
==========================================
- Coverage   72.31%   72.30%   -0.02%     
==========================================
  Files         678      678              
  Lines       99802    99815      +13     
==========================================
- Hits        72171    72170       -1     
- Misses      26069    26083      +14     
  Partials     1562     1562              
Flag Coverage Δ
python 82.85% <100.00%> (-0.02%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 25 '23 14:08 codecov[bot]

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

github-actions[bot] avatar Aug 25 '23 15:08 github-actions[bot]

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

R: @AnandInguva 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 25 '23 23:08 github-actions[bot]

The pydocs are getting this error 04:42:45 WARNING:apache_beam.transforms.core:('No iterator is returned by the process method in %s.', <class 'apache_beam.transforms.core.WindowInto.WindowIntoFn'>) for this DoFn. https://github.com/apache/beam/blob/e26735d69f0935c6f7ac14dd0fb0e58ff390392a/sdks/python/apache_beam/transforms/core.py#L3519

Can you check it why since the DoFn is returning yield?

AnandInguva avatar Aug 28 '23 08:08 AnandInguva

Reminder, please take a look at this pr: @AnandInguva

github-actions[bot] avatar Sep 04 '23 12:09 github-actions[bot]

The pydocs are getting this error 04:42:45 WARNING:apache_beam.transforms.core:('No iterator is returned by the process method in %s.', <class 'apache_beam.transforms.core.WindowInto.WindowIntoFn'>) for this DoFn.

https://github.com/apache/beam/blob/e26735d69f0935c6f7ac14dd0fb0e58ff390392a/sdks/python/apache_beam/transforms/core.py#L3519

Can you check it why since the DoFn is returning yield?

Taking a look today or tomorrow 👍

timgrein avatar Sep 05 '23 09:09 timgrein

Reminder, please take a look at this pr: @AnandInguva

github-actions[bot] avatar Sep 12 '23 12:09 github-actions[bot]

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @damccorm 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)

github-actions[bot] avatar Sep 15 '23 12:09 github-actions[bot]

Hey @timgrein any update on this one?

damccorm avatar Oct 27 '23 14:10 damccorm

@timgrein any updates here?

damccorm avatar Dec 12 '23 13:12 damccorm

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Feb 11 '24 12:02 github-actions[bot]

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Apr 13 '24 12:04 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.30%. Comparing base (6bfb469) to head (447a7f3). Report is 1959 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #28159      +/-   ##
==========================================
- Coverage   72.31%   72.30%   -0.02%     
==========================================
  Files         678      678              
  Lines       99802    99815      +13     
==========================================
- Hits        72171    72170       -1     
- Misses      26069    26083      +14     
  Partials     1562     1562              
Flag Coverage Δ
python 82.85% <100.00%> (-0.02%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 13 '24 12:04 codecov-commenter