chore: migrate google-cloud-bigquery-connection to librarian#8544
chore: migrate google-cloud-bigquery-connection to librarian#8544quirogas wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Google Cloud BigQuery Connection library configuration and samples. Key changes include enabling code generation by removing skip_generate: true in librarian.yaml, updating repository metadata, correcting the required package name from 'connection' to '@google-cloud/bigquery-connection' across multiple generated sample files, and updating the logging namespace and GAPIC metadata to match. There are no review comments, so I have no feedback to provide.
5acb535 to
737af28
Compare
|
This definitely needs more investigation - it's not clear to me whether the current code is wrong, or whether we need another GAPIC generator option in the librarian config. |
|
Filed googleapis/librarian#6379 - I strongly suspect this is a matter of v1beta1 not being configured properly in Bazel. Note that it's only v1beta1 that's changed, not v1. |
|
I enriched the pull request description with "Why was this difference happening?" section. |
This PR migrates the
google-cloud-bigquery-connectionpackage to use Librarian for code generation.Highlights
Enabled Librarian generation for
google-cloud-bigquery-connectionby removingskip_generate: trueinlibrarian.yaml.Removed OwlBot configuration (
.OwlBot.yaml).Updated
.repo-metadata.json(added API description, updated pretty name and product documentation link).Corrected package name references in generated
v1beta1samples and GAPIC metadata (changedconnectionto@google-cloud/bigquery-connection).Why was this difference happening?
Prior to this migration, the package name was inconsistent betweenv1andv1beta1. As identified in googleapis/librarian#6379, thev1BUILD.bazel explicitly setpackage_name = "@google-cloud/bigquery-connection", whereas thev1beta1BUILD.bazel did not specify it.When
package_nameis not specified, the generator (gapic-generator-typescript) defaults to the segment before the version in the proto package name (in this case,connectionfromgoogle.cloud.bigquery.connection.v1beta1). This defaulting logic is implemented innaming.tsandapi.ts.Librarian unifies the generation and ensures the correct package name is used across all versions by deriving the package name from the library name (e.g.,
google-cloud-bigquery-connection→@google-cloud/bigquery-connection) viaDerivePackageNameand passing it explicitly as--package-nameto the generator inbuildGeneratorArgs.Updated logging name in
v1beta1client fromconnectiontobigquery-connectionto align withv1.User-facing Changes
v1beta1client tobigquery-connection(previouslyconnection). This may affect you if you filter logs by name.v1client already usedbigquery-connectionas the logger name: