-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log a warning, if the process method of DoFn returns None #28159
Log a warning, if the process method of DoFn returns None #28159
Conversation
…cit and implicit cases).
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
Assigning reviewers. If you would like to opt out of this review, comment R: @AnandInguva for label python. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
return_none_warning = "No iterator is returned by " \ | ||
"the process method in DoFn." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return_none_warning = "No iterator is returned by " \ | |
"the process method in DoFn." | |
return_none_warning = ("No iterator is returned by " | |
"the process method in DoFn.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning could be meaningful if it can mention the faulty DoFn. Can we add the name of the DoFn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the class name using fn.__self__.__class__
👍
The pydocs are getting this error beam/sdks/python/apache_beam/transforms/core.py Line 3519 in e26735d
Can you check it why since the DoFn is returning yield? |
Reminder, please take a look at this pr: @AnandInguva |
Taking a look today or tomorrow 👍 |
Reminder, please take a look at this pr: @AnandInguva |
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @damccorm for label python. Available commands:
|
Hey @timgrein any update on this one? |
@timgrein any updates here? |
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. |
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Addresses #28061
This PR adds a warning log, if the
process
method ofDoFn
returnsNone
by checking the following cases (doesn't check inner functions):process
containsreturn None
(explicitreturn None
)process
contains onlyreturn
(implicitreturn None
)process
doesn't containyield
neither does it containreturn
(implicitreturn None
)Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.