[Gemini] Add compatibility classes between apitools client and modern bq client - #39998
[Gemini] Add compatibility classes between apitools client and modern bq client#39998jrmccluskey wants to merge 2 commits into
Conversation
|
Assigning reviewers: R: @tvalentyn for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
R: @damccorm This should be good to take a run at, had to track down a docs precommit problem. Going to put improving the readability of the output of that test suite on my to-do list. |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
damccorm
left a comment
There was a problem hiding this comment.
Left a couple of preliminary comments to make sure I'm understanding the approach broadly, thanks
| "TableReference"): | ||
| TableReference = apitools_bigquery.TableReference | ||
| DatasetReference = getattr( | ||
| apitools_bigquery, "DatasetReference", None) or _DatasetReferenceCompat |
There was a problem hiding this comment.
If apitools is imported, will we ever need this fallback? Same thing applies elsewhere
| self.f = f or [] | ||
|
|
||
|
|
||
| if apitools_bigquery is not None and hasattr(apitools_bigquery, |
There was a problem hiding this comment.
Who do we expect to need this fallback? IIUC, it would just be people who depend on the internal generated BQ client, but we don't expect "normal" users to use it. Is that right? If so, I think we should force users to opt in to the fallback somehow - this will both alert them that the deprecated module will eventually go away and that they're in a potentially unsafe mode.
Creates compatibility shims between generated BigQuery classes and the modern google-cloud-bigquery client to be used in migrating support over to the modern client.
Master PR - #39889
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.mdwith 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.