Skip to content

fix(internal/librarian): check explicit API paths in findExistingLibraryForAPI - #7816

Merged
sofisl merged 2 commits into
googleapis:mainfrom
sofisl:fix/config-get-libraries
Oct 23, 2026
Merged

sofisl merged 2 commits into
googleapis:mainfrom
sofisl:fix/config-get-libraries

Conversation

@sofisl

@sofisl sofisl commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Update findExistingLibraryForAPI to check if any configured library explicitly lists the target API path in its APIs slice before falling back to deriving a default library name from the API path. This ensures librarian config get libraries resolves libraries whose configured name differs from the default derived name (such as Ruby gems with underscores or multi-API libraries bundling sub-packages).

Fixes #7814

…aryForAPI

Update findExistingLibraryForAPI to check if any configured library
explicitly lists the target API path in its APIs slice before falling
back to deriving a default library name from the API path. This ensures
librarian config get libraries resolves libraries whose configured name
differs from the default derived name (such as Ruby gems with
underscores or multi-API libraries bundling sub-packages).

Fixes googleapis#7814

@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 findExistingLibraryForAPI in internal/librarian/add.go to check if an API path is already explicitly listed in any library's APIs before performing language-specific checks, provided that explicitLibraryName is empty. It also adds corresponding test cases in internal/librarian/config_test.go to verify this behavior for Ruby (custom name) and Go (subpackage API path). I have no feedback to provide.

@sofisl
sofisl marked this pull request as ready for review October 23, 2026 20:48
@sofisl
sofisl requested a review from a team as a code owner October 23, 2026 20:49
Comment thread internal/librarian/add.go Resolved
Move the library.APIs check into the default branch of
findExistingLibraryForAPI so Node.js and Python continue to dispatch
directly to FindExistingLibraryForNewAPI.

For googleapis#7814
@sofisl
sofisl requested a review from noahdietz October 23, 2026 22:23
@sofisl
sofisl merged commit 00ae0ab into googleapis:main Oct 23, 2026
48 checks passed
sofisl pushed a commit that referenced this pull request Oct 27, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.50.0](v0.49.0...v0.50.0)
(2026-10-27)


### Features

* **internal/librarian/java:** parallelize generation and formatting
([#7813](#7813))
([bf3b603](bf3b603))


### Bug Fixes

* **internal/librarian:** check explicit API paths in
findExistingLibraryForAPI
([#7816](#7816))
([00ae0ab](00ae0ab)),
refs [#7814](#7814)
* **internal/sidekick/rust_prost:** map BytesValue
([#7798](#7798))
([7080958](7080958))
* **internal/sidekick/rust:** match prost-build module snake_case
([#7806](#7806))
([8790f1b](8790f1b))
* **sidekick/swift:** support google.api.HttpBody in REST
([#7811](#7811))
([d427811](d427811))
* **swift:** strip backticks from DocC xref links
([#7804](#7804))
([6a931c5](6a931c5)),
refs [#751](#751)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
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.

librarian: add proto search for librarian config get libraries

2 participants