Skip to content

chore: migrate google-cloud-bigquery-connection to librarian#8544

Open
quirogas wants to merge 2 commits into
googleapis:mainfrom
quirogas:scripted-migrate-google-cloud-bigquery-connection
Open

chore: migrate google-cloud-bigquery-connection to librarian#8544
quirogas wants to merge 2 commits into
googleapis:mainfrom
quirogas:scripted-migrate-google-cloud-bigquery-connection

Conversation

@quirogas

@quirogas quirogas commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This PR migrates the google-cloud-bigquery-connection package to use Librarian for code generation.

Highlights

  • Enabled Librarian generation for google-cloud-bigquery-connection by removing skip_generate: true in librarian.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 v1beta1 samples and GAPIC metadata (changed connection to @google-cloud/bigquery-connection).

    Why was this difference happening? Prior to this migration, the package name was inconsistent between v1 and v1beta1. As identified in googleapis/librarian#6379, the v1 BUILD.bazel explicitly set package_name = "@google-cloud/bigquery-connection", whereas the v1beta1 BUILD.bazel did not specify it.

    When package_name is not specified, the generator (gapic-generator-typescript) defaults to the segment before the version in the proto package name (in this case, connection from google.cloud.bigquery.connection.v1beta1). This defaulting logic is implemented in naming.ts and api.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) via DerivePackageName and passing it explicitly as --package-name to the generator in buildGeneratorArgs.

  • Updated logging name in v1beta1 client from connection to bigquery-connection to align with v1.

User-facing Changes

  • Changed the logger name for v1beta1 client to bigquery-connection (previously connection). This may affect you if you filter logs by name.
    // Before
    private _log = logging.log('connection');
    // After
    private _log = logging.log('bigquery-connection');
    Note that v1 client already used bigquery-connection as the logger name:
    // v1/connection_service_client.ts (unchanged)
    private _log = logging.log('bigquery-connection');

@quirogas quirogas requested a review from a team as a code owner June 11, 2026 06:47
@quirogas quirogas self-assigned this Jun 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@quirogas quirogas force-pushed the scripted-migrate-google-cloud-bigquery-connection branch from 5acb535 to 737af28 Compare June 11, 2026 06:56
@jskeet

jskeet commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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.

@jskeet

jskeet commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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.

@suztomo

suztomo commented Jun 15, 2026

Copy link
Copy Markdown
Member

I enriched the pull request description with "Why was this difference happening?" section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants