Repository navigation
fix(internal/librarian): check explicit API paths in findExistingLibraryForAPI - #7816
Merged
Merged
Conversation
…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
Contributor
There was a problem hiding this comment.
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
marked this pull request as ready for review
October 23, 2026 20:48
noahdietz
approved these changes
Oct 23, 2026
noahdietz
requested changes
Oct 23, 2026
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
noahdietz
approved these changes
Oct 23, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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