feat(bigquery-storage): split GAPIC from the bigquery-storage handwritten package#8930
feat(bigquery-storage): split GAPIC from the bigquery-storage handwritten package#8930quirogas wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes locally generated client files, configurations, and tests for various API versions, migrating the handwritten wrapper to use the external @google-cloud/bigquery-storage-api package instead. Feedback on the changes points out that importing the entire package namespace as v1 is incorrect and suggests importing v1 as a named export alongside the other clients to avoid namespace nesting issues.
| import * as v1 from '@google-cloud/bigquery-storage-api'; | ||
| import {BigQueryReadClient, BigQueryWriteClient} from '@google-cloud/bigquery-storage-api'; |
There was a problem hiding this comment.
Importing the entire @google-cloud/bigquery-storage-api package as v1 via import * as v1 is incorrect because it binds the entire package namespace to v1. This results in the exported v1 containing a nested v1 property (i.e., v1.v1 would be the actual v1 namespace), and exports the entire API package under the name v1 instead of just the v1 namespace. Instead, import v1 as a named export from @google-cloud/bigquery-storage-api along with the clients in a single import statement.
| import * as v1 from '@google-cloud/bigquery-storage-api'; | |
| import {BigQueryReadClient, BigQueryWriteClient} from '@google-cloud/bigquery-storage-api'; | |
| import {v1, BigQueryReadClient, BigQueryWriteClient} from '@google-cloud/bigquery-storage-api'; |
Decouple the handwritten BigQuery Storage wrapper from the auto-generated GAPIC client layer by importing a standalone version of the GAPIC library. Standalone
-apipackages are now generated and maintained independently.src/v1/,src/v1beta2/) and OwlBot files (owlbot.py,.OwlBot.yaml).@google-cloud/bigquery-storage-api(^0.2.0).BigQueryReadClient,BigQueryWriteClient,adapt,reader, andprotosfrom@google-cloud/bigquery-storage-api.adaptandreadersub-modules.Internal: b/531788771