-
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
Remove obsolete and deprecated bigquery native write. #23557 #23558
Conversation
Assigning reviewers. If you would like to opt out of this review, comment R: @ryanthompson591 for label python. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
1c68cf2
to
ff29677
Compare
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
Run Python PostCommit |
nice! LGTM |
Run Python 3.8 PostCommit |
@@ -1410,7 +1410,7 @@ def __next__(self): | |||
|
|||
|
|||
@deprecated(since='2.11.0', current="WriteToBigQuery") | |||
class BigQuerySink(*args, **kwargs): | |||
def BigQuerySink(*args, **kwargs): |
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.
Why change this from class to def?
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 way one can still do io.Write(BigQuerySink(...))
even though the old class is gone.
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 is great if it works the way it looks like it does.
I didn't dig deep into making sure that having the deprecated class fall back to the new class works seamlessly. Ideally, if you can write some tests to make sure that is the case, this should be fine.
sink=self, | ||
test_bigquery_client=test_bigquery_client, | ||
buffer_size=buffer_size) | ||
def BigQuerySink(*args, **kwargs): |
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.
If it makes sense, add a test to make sure this fallback works.
Since any code calling the fallback will expect the same interface as the deprecated BigQuerySink right? Is the interface exactly the same, or could users get runtime errors in unexpected places?
If there are unexpected runtime errors consider fully sunsetting instead.
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.
Yes, this is intended to be a drop-in replacement, with the old variant deprecated over two years ago.
CHANGES.md
Outdated
@@ -62,6 +62,7 @@ | |||
* Decreased TextSource CPU utilization by 2.3x (Java) ([#23193](https://github.com/apache/beam/issues/23193)). | |||
* Fixed bug when using SpannerIO with RuntimeValueProvider options (Java) ([#22146](https://github.com/apache/beam/issues/22146)). | |||
* Fixed issue for unicode rendering on WriteToBigQuery ([#10785](https://github.com/apache/beam/issues/10785)) | |||
* Remove obsolete variant of BigQuery Write ([#23564](https://github.com/apache/beam/issues/23564)). |
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.
Maybe comment that old code using this variant will redirect to the new variant with a warning. This isn't a breaking change right?
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.
The same line added in #23557 introduces a conflict. Could just change this line to
Remove obsolete variant of BigQuery Read and Write ([#23559](https://github.com/apache/beam/issues/23559)).
during rebase.
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.
Yeah, I merged these lines in the changelog.
Codecov Report
@@ Coverage Diff @@
## master #23558 +/- ##
==========================================
- Coverage 73.40% 73.32% -0.08%
==========================================
Files 719 719
Lines 95940 95791 -149
==========================================
- Hits 70424 70239 -185
- Misses 24205 24241 +36
Partials 1311 1311
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Unrelated timeout in apache_beam.transforms.userstate_test.StatefulDoFnOnDirectRunnerTest.test_dynamic_timer_clear_then_set_timer |
This is follow-up from apache#23558.
This is follow-up from apache#23558.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).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.