-
Notifications
You must be signed in to change notification settings - Fork 30
Librarian release pull request: 20250908T145328Z #1966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
JoeWang1127
added a commit
that referenced
this pull request
Sep 8, 2025
codyoss
pushed a commit
that referenced
this pull request
Sep 23, 2025
Librarian Version: v0.0.0-20250923210339-2acb5c1bf5ab Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-release-container@sha256:50dd9b59bcf4f55178f9a35dcd4f81a8db20609da386357fa05a457a8da3b4e9 <details><summary>librarian: 0.2.0</summary> ## [0.2.0](https://github.com/googleapis/librarian/compare/v0.1.0...v0.2.0) (2025-09-23) ### Features * discovery doc methods (#2308) Capture path and query parameters into a synthetic message. These messages are unique per method, and are all children of a different kind of synthetic message that is unique by service. That parent message creates the right naming structure. Updated the templates to demonstrate how this would be used. ([7239558](https://github.com/googleapis/librarian/commit/7239558)) * reorder generate PR body (#2312) Fixes #2071 ([21922f3](https://github.com/googleapis/librarian/commit/21922f3)) * rename source_commit_hash to commit_hash (#2224) For now we will support the old field as well until currently onboarded languages have a chance to source the new field instead. ([710e85a](https://github.com/googleapis/librarian/commit/710e85a)) * add a comment to generation PR if generation has a failure (#2291) Fixes #2287 ([dd44dbf](https://github.com/googleapis/librarian/commit/dd44dbf)) * add flag to configure verbose logging (#2285) Adds -v flag to the CLI that sets the logging level to debug for each command Fixes #2148 ([3fe4e57](https://github.com/googleapis/librarian/commit/3fe4e57)) * restore files after build failure (#2273) Fixes #1682 ([6eb18c4](https://github.com/googleapis/librarian/commit/6eb18c4)) * Set url.template in RequestOptions (#2248) Modifies the transport.rs.mustache template to call google_cloud_gax::options::internal::set_path_template() for each binding. This provides the url.template attribute for OpenTelemetry spans. See #2212 and https://github.com/googleapis/google-cloud-rust/pull/3346 and https://github.com/googleapis/google-cloud-rust/pull/3368 Tested with https://github.com/googleapis/librarian/pull/2247 ([13bef19](https://github.com/googleapis/librarian/commit/13bef19)) * add e2e test for release init --push (#2228) - Adds e2e test case for 'release init --push' - Mocks GitHub API calls for PR creation and labeling - Updates command.go and release_notes.go to support testability Part of #1013 ([4d3c118](https://github.com/googleapis/librarian/commit/4d3c118)) * clean untracked files (#2237) Updates #1682 ([fa1c18f](https://github.com/googleapis/librarian/commit/fa1c18f)) * release_blocked field in per-library configuration (#2243) Fixes https://github.com/googleapis/librarian/issues/897. This change implements the "release init" command part (`release_blocked`). When library config has release_blocked field set to true, the "release init" command skips the library processing. If the library ID is explicitly specified, then `release_blocked` is ignored. ([f12f284](https://github.com/googleapis/librarian/commit/f12f284)) * parse discovery doc path templates (#2241) Discovery doc path templates are specified using URI templates, that is RFC 6570 templates. This is not the same format as the HTTP annotations for Protobuf. Compute only uses a **subset** of the URI template spec, which allows us to parse the strings and use (without change) the `api.PathTemplate` structure. If compute starts using more complex path templates we can grow the data structures at that time. ([4a33949](https://github.com/googleapis/librarian/commit/4a33949)) * generate_blocked field in per-library configuration (#2221) For #897. This change implements the "generate" command. When library config has generate_blocked field set to true, the generate command skips the library processing. If the library is explicitly specified in the argument via "--library", then this Librarian CLI processes the library. ([c3c71af](https://github.com/googleapis/librarian/commit/c3c71af)) * add e2e test for release tag-and-release (#2222) Adds an end-to-end test for the 'release tag-and-release' command. This test uses a mock GitHub server to verify that the command makes the correct API calls for creating tags and releases. Part of https://github.com/googleapis/librarian/issues/1013. ([5d05481](https://github.com/googleapis/librarian/commit/5d05481)) * add DeleteBranch() and ClosePullRequest() (#2232) ([234f2a2](https://github.com/googleapis/librarian/commit/234f2a2)) * add Restore function (#2028) Updates #1682 ([e5a86a1](https://github.com/googleapis/librarian/commit/e5a86a1)) * Ability to include the repository URL of a package in pubspec.yaml (#2229) ([2f526a3](https://github.com/googleapis/librarian/commit/2f526a3)) * Force release for a specific library even if there are no releasable changes (#2181) ([382e634](https://github.com/googleapis/librarian/commit/382e634)) * split `model.rs` into modules (#2213) In Rust, the documentation browser shows the code, and this code was getting too large to render effectively. For some crates, the module is also too large for some IDE defaults. ([de628ec](https://github.com/googleapis/librarian/commit/de628ec)) * add paginator for services proto wrap maxResults (#2208) ([f7a7c8e](https://github.com/googleapis/librarian/commit/f7a7c8e)) * subcommand to publish Rust crates (#2182) ([07f666d](https://github.com/googleapis/librarian/commit/07f666d)) * Use dependency constraints specified in configuration (#1987) The existing configuration found in .sidekick.toml has configuration like this: ```toml # Default package dependency versions. 'package:google_cloud_gax' = '^0.1.0' 'package:http' = '^1.3.0' ``` This PR honors those constraints when generating `pubspec.yaml` ([1a3e3bb](https://github.com/googleapis/librarian/commit/1a3e3bb)) * Make the Dart class representing the service `final` (#2178) Dart classes are, by default, also interfaces. This means that adding a new method to a class will break any code that implements it. The most conservative approach is to make the class `final` - we can relax that restriction and make it `base` later, if it makes sense. ([2f447cc](https://github.com/googleapis/librarian/commit/2f447cc)) * Stage release with forceRun flag. Check cloudBuild trigger with triggersRun variable (#2150) Stage release job with forceRun flag. By default Stage release job will only be run on odd weeks, and forceRun flag is False. If forceRun is True, Stage release job can be run on even weeks. Check cloudBuild trigger with triggersRun variable https://github.com/googleapis/librarian/issues/2060 ([1d68698](https://github.com/googleapis/librarian/commit/1d68698)) * release init can read per-library version override from config.yaml (#2083) Fixes #2041 ([4d2e4de](https://github.com/googleapis/librarian/commit/4d2e4de)) * add ability to compare semver versions (#2047) Towards #2041 It's possible the configured value in config.yaml is too old. We will need to be able to compare 2 semver strings. ([7702829](https://github.com/googleapis/librarian/commit/7702829)) * add per-library override configurations to .librarian/config.yaml (#2039) ([4f8141c](https://github.com/googleapis/librarian/commit/4f8141c)) * Add release-please tag to release PRs so louhi flow will get triggered (#2050) fixes #2038 Tested with ``` go run github.com/googleapis/librarian/cmd/librarian release tag-and-release -repo=/Users/ldetmer/workspace2/librarian -pr=https://github.com/ldetmer/librarian/pull/1 ``` https://github.com/ldetmer/librarian/commit/39ab425a726549ab5991fd2382243e4473fc7c6a contains tag release-please-1 ([f114aa2](https://github.com/googleapis/librarian/commit/f114aa2)) * mount `repo` volume in configure command (#2013) Fixes #1766 ([d8dc3d1](https://github.com/googleapis/librarian/commit/d8dc3d1)) * return without an error if all generations failed (#1979) Fixes #1885 ([0df6d65](https://github.com/googleapis/librarian/commit/0df6d65)) * add a "LICENSE" file to Dart packages. (#1977) pub.dev requires that packages have a LICENSE file in their root. The file was named "LICENSE.txt.mustache" because `WalkTemplatesDir` elides files without an extension (after ".mustache" is removed). `generatedFiles` renames this file to "LICENSE". There were a few other approaches that we could use: 1. `WalkTemplatesDir` could use a different naming convention for elided files (e.g. "internal_<name>.mustache") 2. `generatedFiles` could walk the template directory itself. ([70bb3c6](https://github.com/googleapis/librarian/commit/70bb3c6)) * add release notes in release pull request (#1905) Fixes #1899 ([eebb5fe](https://github.com/googleapis/librarian/commit/eebb5fe)) * add pr body to generate pull request (#1909) Fixes #1703 ([9d782cf](https://github.com/googleapis/librarian/commit/9d782cf)) * log generation statistics on completion (#1892) Fixes #1891. ([716e677](https://github.com/googleapis/librarian/commit/716e677)) * add -branch flag for cloning and PRs (#1893) The same flag is used for two purposes (because you'd almost always want them to be the same): - The remote branch to clone (ignored when not using a remote repo) - The remote branch to use as the base for a PR (i.e. the branch you want to merge into) The flag is used for "generate" and "release init". Fixes #812. ([3521090](https://github.com/googleapis/librarian/commit/3521090)) * change README for GA clients (#1889) ([9e1450d](https://github.com/googleapis/librarian/commit/9e1450d)) * allow APIs to have no service config (#1854) This allows libraries from "just protos" to be represented. Fixes #1712. ([f88a51a](https://github.com/googleapis/librarian/commit/f88a51a)) * get commit history since last library generation (#1837) Fixes #1706 ([8f409cc](https://github.com/googleapis/librarian/commit/8f409cc)) * format release notes content for each library (#1827) Format release notes (body of the release pull request) for each releasable unit (libraries) flagged with ReleaseTriggered. The release pull request description format expected is specified in [go/librarian:commits](http://goto.google.com/librarian:commits), see tag per library. Simplifications made for this first attempt: - only a per-library strategy for Python/Go is implemented for now. - Breaking e.g., “feat!” are not presented with a designated “breaking changes” section. (we do this today with release please). “feat!” and “feat”, “fix!” and “fix” are equivalent for release notes. Fixes #1697 ([1f3b20a](https://github.com/googleapis/librarian/commit/1f3b20a)) * rev the required Dart SDK version (#1848) ([1df05c3](https://github.com/googleapis/librarian/commit/1df05c3)) * allow libraries to have no APIs (#1853) This is required for handwritten libraries to be representable in Librarian state. For the moment, such libraries are skipped in generate calls. Fixes #1852. ([c1f770e](https://github.com/googleapis/librarian/commit/c1f770e)) * implement `commit` flag for release init (#1816) Fixes #1008 ([c590f20](https://github.com/googleapis/librarian/commit/c590f20)) * tag-and-release logic (#1812) ([949f02f](https://github.com/googleapis/librarian/commit/949f02f)) * create a pull request in release init command (#1793) Updates #1008 ([152b561](https://github.com/googleapis/librarian/commit/152b561)) * copy libraries and global files from container output to repo in release init command (#1790) Updates #1008 ([f0edfd6](https://github.com/googleapis/librarian/commit/f0edfd6)) * publish-release automation only triggers CloudBuild if a repository contains a merged pull request with label release:pending (#1789) ([bded5dc](https://github.com/googleapis/librarian/commit/bded5dc)) * support derive next semver from conventional commits (#1769) Add a semver package for logic to parse and increase semantic version according to https://semver.org/, then use it to derive next version from slices of conventional commits. ([73c1bc7](https://github.com/googleapis/librarian/commit/73c1bc7)) * get library changes in `release init` command (#1780) Updates #1008 ([8756e01](https://github.com/googleapis/librarian/commit/8756e01)) * add ability to create branch and push to remote repository (#1775) Fixes #1762 ([e3c9e31](https://github.com/googleapis/librarian/commit/e3c9e31)) * add a skeleton for release init (#1761) Fixes #1655 Updates #1008 ([6dbc3c0](https://github.com/googleapis/librarian/commit/6dbc3c0)) * add logic to get pull requests (#1754) ([6444b5f](https://github.com/googleapis/librarian/commit/6444b5f)) * add logic to parse pr bodies (#1767) ([00b91cd](https://github.com/googleapis/librarian/commit/00b91cd)) * parse conventional commits for library since last released version -part2 (#1765) Adds method to parse commits since last released for a library to slices of ConventionalCommit. Also adds a check for tag-format that {version} is required. Additional context: [go/librarian:release-please-lite](http://goto.google.com/librarian:release-please-lite) 2nd part of change. Fixes https://github.com/googleapis/librarian/issues/1694 ([b2e2c93](https://github.com/googleapis/librarian/commit/b2e2c93)) * parse conventional commits for library since last released version (#1711) Adds logic to parse conventional commits and a method to get conventional commits for library since last released version. Main changes: - basic logic for getting commits for path since tag/commit mostly ported from v0.1.0 [gitrepo.go](https://github.com/googleapis/librarian/blob/v0.1.0/internal/gitrepo/gitrepo.go) - logic to parse commit message into conventional commit struct in `internal/gitrepo/conventional_commits.go` based on regex, inspired by [this code](https://gitlab.com/digitalxero/go-conventional-commit/-/blob/master/conventional_commits.go?ref_type=heads) Additional context: [go/librarian:release-please-lite](http://goto.google.com/librarian:release-please-lite) For #1694 ([65a9774](https://github.com/googleapis/librarian/commit/65a9774)) * add automation go script for triggering all configured repositories (#1687) Usage: ``` go run github.com/googleapis/librarian/cmd/automation@<tag-or-ref> \ --command=generate \ --project=<project-id> ``` Fixes #1612 Fixes #1571 ([2d88ae9](https://github.com/googleapis/librarian/commit/2d88ae9)) * extends `configure-request.json` (#1715) Fixes #1653 ([0190366](https://github.com/googleapis/librarian/commit/0190366)) * partially copy a repo (#1686) Fixes #1685 ([946e550](https://github.com/googleapis/librarian/commit/946e550)) * add skeleton for release tag-and-release (#1701) Also added the one new flag we will need for this command. ([004401f](https://github.com/googleapis/librarian/commit/004401f)) * add support requred for release (#1693) We are going to need more github functionality in order to tag and release from librarian. This adds all of the functions that should be required. ([c8a858e](https://github.com/googleapis/librarian/commit/c8a858e)) * implement `release-init` container contract (#1677) Fixes #1011 ([7b883ee](https://github.com/googleapis/librarian/commit/7b883ee)) * add a global config (#1663) Fixes #1656 ([4b35724](https://github.com/googleapis/librarian/commit/4b35724)) * add RepositoriesConfig yaml struct (#1661) Adds config file definitions for repositories.yaml which the list of repositories configured for librarian automation. Towards #1571 ([709adc0](https://github.com/googleapis/librarian/commit/709adc0)) * add labels to a github issue (#1642) Fixes #1012 ([a5b5b68](https://github.com/googleapis/librarian/commit/a5b5b68)) * clone googleapis if apisource is unspecified (#1589) Set api-source value to https://github.com/googleapis/googleapis when the flag is unspecified. Also clone googleapis repo. ([955052c](https://github.com/googleapis/librarian/commit/955052c)) * record library generation failure message in PR message (#999) Record library generation failure message in PR message ([97720cd](https://github.com/googleapis/librarian/commit/97720cd)) * local binding errors for bad requests (#2763) ([03f8b6b](https://github.com/googleapis/librarian/commit/03f8b6b)) * hide empty _unknown_fields (#2744) * feat(types): hide empty _unknown_fields * fix style ([38fab3a](https://github.com/googleapis/librarian/commit/38fab3a)) * add push-config flag and corresponding functionality (#868) ([aaee79b](https://github.com/googleapis/librarian/commit/aaee79b)) * add `push-config` flag and its functionality. When push-config and github token both set and exist, we do the following: 1. add all changes to staging. 2. commit them. 3. create pull request and push to the repo. ([aaee79b](https://github.com/googleapis/librarian/commit/aaee79b)) * rework configure container contract (#898) Refactor configure command container contract: Create a `generate-request.json` from state Mount `.librarian` to /librarian Mount `.librarian/generator-input` to /input Mount `apiRoot` to /source Fixes #769, fixes #815 --------- ([ae87263](https://github.com/googleapis/librarian/commit/ae87263)) * add clean logic to generate (#871) port over owl-bot clean logic - port over clean logic from owl-bot [code](https://github.com/googleapis/repo-automation-bots/blob/12dad68640960290910b660e4325630c9ace494b/packages/owl-bot/src/copy-code.ts#L1027) - Configurations: Use regex for preserve and remove config in [state.yaml](https://github.com/googleapis/librarian/blob/a5695eb2bff6ef813cac3c5ed005c3448bfb5da2/internal/config/state.go#L96-L101). This is the consistent with old owl-bot logic ([ref](https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/src/config-files.ts#L166-L176)). - The clean logic can deal with symlink (see added tests [here](https://github.com/googleapis/librarian/blob/644f67303089394716911b78d57069344fc45ade/internal/librarian/generate_test.go#L510-L532)). But os.CopyFS() in Go 1.24 does not support symlink and throws error. (Will support in next 1.25 release) Added a comment for it. (Python confirmed it is non-blocking for onboarding) Will try to fix test coverage while in review Fixes #775 --------- ([3ee39a6](https://github.com/googleapis/librarian/commit/3ee39a6)) * parse service config from api source (#873) ([90d0c5e](https://github.com/googleapis/librarian/commit/90d0c5e)) * rework build container contract (#863) Rework build command container contract - Create `build-request.json` - Mount `.librarian` to `/librarian` - Mount repo root to `/repo` ([ade9ce0](https://github.com/googleapis/librarian/commit/ade9ce0)) * rework generate container contract (#807) Fixes #770 ([a69aac4](https://github.com/googleapis/librarian/commit/a69aac4)) * add `host-mount` flag (#788) Fixes #768 ([2382b7c](https://github.com/googleapis/librarian/commit/2382b7c)) * add unit tests for file package (#757) This change introduces unit tests for the `file.go` file in the `internal/librarian` package. The tests cover the following functions: - `readAllBytesFromFile` - `appendToFile` - `createAndWriteToFile` - `createAndWriteBytesToFile` The tests use a table-driven approach to test multiple scenarios, including success, error, and edge cases. ([e370eac](https://github.com/googleapis/librarian/commit/e370eac)) * run gcloud.Generate (#2586) This change adds a boilerplate gcloud.Generate function and integrates it into the sidekick refresh flow. Logic related to the gcloud.yaml file is moved into a new internal/config/gcloud/ package, since it must be part of the config.Config struct to be passed into Generate, and to avoid a dependency cycle, since config.Config is imported by internal/gcloud. ([2ec911e](https://github.com/googleapis/librarian/commit/2ec911e)) * add testdata (#2567) Add testdata for the generated gcloud command YAML. See generator/internal/gcloud/testdata/parallelstore/README.md for details on where the testdata is copied from. ([d2b2617](https://github.com/googleapis/librarian/commit/d2b2617)) * add structs for gcloud config YAML (#2566) Introduce Go structs for parsing a sample gcloud config YAML file. This is a first step to evaluate if we can use sidekick for automating gcloud command generation. ([37ed41e](https://github.com/googleapis/librarian/commit/37ed41e)) ### Bug Fixes * temporarily use short SHA for release links (#2325) We noticed that we were not able to open the release init PR today because the character limit exceeds what github allows. For now, by shortening the SHA links we can get under this limit. We should have a more robust solution in the future. ([2acb5c1](https://github.com/googleapis/librarian/commit/2acb5c1)) * missing `Debug` for discovery requests (#2319) We want to generate the `Debug` implementation for children of the discovery request. ([68f137d](https://github.com/googleapis/librarian/commit/68f137d)) * add commit body to release note (#2316) Release note example: https://github.com/googleapis/google-cloud-python/pull/14531 Fixes #2234 ([9d21e30](https://github.com/googleapis/librarian/commit/9d21e30)) * bad link for parent messages (#2309) For most messages `Name == Codec.Name`, but there are a handful of messages that are all uppercase in Protobuf (e.g. `CVSS` in grafeas), and the naming conventions for Rust convert these to `CamelCase` (`Cvss` in that example). ([dca5878](https://github.com/googleapis/librarian/commit/dca5878)) * Filter for commits associated to a library (#2295) ([3336fa5](https://github.com/googleapis/librarian/commit/3336fa5)) * skip write LastGeneratedCommit field to json (#2293) `last_generated_commit` field should be omitted from all generated JSON request files: release-init-request.json, configure-request.json, generate-request.json, and build-request.json. Ref [language-onboarding.md](https://github.com/googleapis/librarian/blob/main/doc/language-onboarding.md) Fixes #2081 ([a945eb7](https://github.com/googleapis/librarian/commit/a945eb7)) * sort discovery doc elements (#2279) This is to preserve their order in the generated code. We want to avoid spurious changes due to hash table salt. ([cefad37](https://github.com/googleapis/librarian/commit/cefad37)) * URI templates need matchers too (#2261) ([2835eda](https://github.com/googleapis/librarian/commit/2835eda)) * handle multi-line commit message (#2244) Fixes #2234 ([cb44b42](https://github.com/googleapis/librarian/commit/cb44b42)) * read api dir from temp folder (#2239) ([ca32437](https://github.com/googleapis/librarian/commit/ca32437)) * align tag-and-release e2e test with API workflow (#2240) Updates the end-to-end test for the 'release tag-and-release' command to align with the refactoring introduced in commit 2807adf. The refactoring removed the command's dependency on a local repository clone, causing the existing e2e test to fail as it was still based on a local git setup. The command now fetches the state.yaml file directly from the GitHub API. This change updates the test by: - Removing the unnecessary local git repository setup. - Modifying the mock HTTP server to correctly simulate the multi-step API process used by the go-github client to download a file (directory listing followed by content download). - Updating the 'newTagAndReleaseRunner' to correctly use the 'github-api-endpoint' flag, ensuring the client is properly directed to the mock server during tests. Part of #1013. ([b38097e](https://github.com/googleapis/librarian/commit/b38097e)) * validate library IDs are unique (#2187) Fixes #2186 (Additionally, fixes a panic if a test that wants an error doesn't produce one.) ([6188338](https://github.com/googleapis/librarian/commit/6188338)) * set branch in generate runner (#2189) Fixes #2188 ([3cdc998](https://github.com/googleapis/librarian/commit/3cdc998)) * Skip release if there are no releasable units (#2010) ([0ee547d](https://github.com/googleapis/librarian/commit/0ee547d)) * skip bumps for new crates (#2169) Renamed `manifestVersionUpdated` to better capture what it does, fix the code to skip new files, and fixed all the tests. ([f93994a](https://github.com/googleapis/librarian/commit/f93994a)) * add cl num in release note (#2156) Fixes #2112 ([973d2df](https://github.com/googleapis/librarian/commit/973d2df)) * parse commit message that contains multiple headers (#2147) Fixes #2120 ([2e21c79](https://github.com/googleapis/librarian/commit/2e21c79)) * format state yaml with indent of 2 for passing lint (#2149) Fixes #2116 ([3532f19](https://github.com/googleapis/librarian/commit/3532f19)) * breaking change and feature pre-1.0 yields minor version bump (#2117) Fixes #2109 ([a57e5fd](https://github.com/googleapis/librarian/commit/a57e5fd)) * Use language repo's commit value as the source_commit_hash (#2078) ([cb3c723](https://github.com/googleapis/librarian/commit/cb3c723)) * add newline after Flags in help text (#2125) Currently there is a newline after `Commands:` and `Usage:` in the help text. Add a newline after `Flags:` for consistency. ([28e1282](https://github.com/googleapis/librarian/commit/28e1282)) * add newline after Usage in help text (#2110) Currently there is a newline after `Commands:` but not `Usage:` in the help text. Add a newline after `Usage:` for consistency. ([305d7a5](https://github.com/googleapis/librarian/commit/305d7a5)) * add link to definition of comitt-ish (#2085) ([27f5eaa](https://github.com/googleapis/librarian/commit/27f5eaa)) * add a title prefix (#2082) Prefix a PR title with `chore`. The 'release init' process now correctly identifies commits from pull requests (PRs) that adhere to the conventional commit message format. This is because the process only uses the commit message, not the PR title, to determine conventionality. Fixes #2079 ([c609ee9](https://github.com/googleapis/librarian/commit/c609ee9)) * read release init response (#2075) Fixes #2057 ([56d59af](https://github.com/googleapis/librarian/commit/56d59af)) * specify the repository when searching for pull requests (#1986) ([919487b](https://github.com/googleapis/librarian/commit/919487b)) * regen PR title to feat (#2049) ([9bef458](https://github.com/googleapis/librarian/commit/9bef458)) * revert https://github.com/googleapis/librarian/pull/2015 (#2046) Addressing https://github.com/googleapis/librarian/issues/2014#issuecomment-3274084757 ([4ffad18](https://github.com/googleapis/librarian/commit/4ffad18)) * honor container contract changes format (#2037) This was a regression from a00e91b5fe84ded76c7618acfcbcd927161509d2. Added a test so this will not happen again and fixed up a couple other testing quirks. ([f393e24](https://github.com/googleapis/librarian/commit/f393e24)) * save librarian state in release init (#2034) Write librarian state after updating libraries in release init. Modify the test to check `state.yaml` in repo to verify the libraries are updated. Fixes #2030 ([0dd0273](https://github.com/googleapis/librarian/commit/0dd0273)) * use --output path directly for container mount (#2015) The 'release init' command was incorrectly creating a nested 'output' subdirectory within the path provided by the --output flag (aliased to WorkRoot). This caused the container's /output volume to be mounted to <workroot>/output instead of <workroot>. This commit changes the behavior to use the r.workRoot value directly as the source for the /output volume mount, aligning with user expectations for the --output flag. Fixes #2014 ([45aa04a](https://github.com/googleapis/librarian/commit/45aa04a)) * `GA` is spelled `stable` (#2011) At least that is how you spell it in the `.repo-metadata.json` files. ([33501c0](https://github.com/googleapis/librarian/commit/33501c0)) * generate PR body (#2009) Fixes an issue where the generate PR body parsing code was referencing the wrong repo. ([88abd0d](https://github.com/googleapis/librarian/commit/88abd0d)) * clean should preserve and remove files from sourceRoots (#1950) ([80ec945](https://github.com/googleapis/librarian/commit/80ec945)) * commit the right repo in generate (#1969) Fixes #1963 ([e98e2be](https://github.com/googleapis/librarian/commit/e98e2be)) * format release note correctly for multiple same category commits (#1965) Created release pull request in https://github.com/googleapis/librarian/pull/1966 Fixes #1957 ([e536c9a](https://github.com/googleapis/librarian/commit/e536c9a)) * save old version in release (#1953) Run command: ``` go run ./cmd/librarian release init -repo=. -push ``` Release pull request created in https://github.com/googleapis/librarian/pull/1955 The release note is not well formatted, will address in https://github.com/googleapis/librarian/pull/1964. Fixes #1932 ([a00e91b](https://github.com/googleapis/librarian/commit/a00e91b)) * report the correct missing environment variable (#1962) Fixes #1961 ([50acf6e](https://github.com/googleapis/librarian/commit/50acf6e)) * change merge PR check condition to use merge_at field (#1959) If the PR is merged, then the `merged_at` field has value. Otherwise it is a closed PR, and the `merged_at` field is null. Test Example: In my forked repo, only https://github.com/catchyzheng/google-cloud-python/pull/4 is closed PR, and its `merged_at` field is null. Other PRs were merged and has `merged_at` values. The `merged_at` field can be checked here: https://api.github.com/repos/catchyzheng/google-cloud-python/pulls?per_page=100&state=closed ([31e3ef3](https://github.com/googleapis/librarian/commit/31e3ef3)) * Tests and commands run in Windows (#1954) ([f890a37](https://github.com/googleapis/librarian/commit/f890a37)) * do not delete any files in .librarian/generator-input directory (#1934) In case the remove-regex contains a directory that exists in .librarian/generator-input, the librarian CLI should not delete it when calling clean. ([0d3b7eb](https://github.com/googleapis/librarian/commit/0d3b7eb)) * Add label for PRs on release init (#1911) ([c6e8e2e](https://github.com/googleapis/librarian/commit/c6e8e2e)) * fix pull request url format mismatch (#1927) https://github.com/googleapis/librarian/issues/1924 ([ccfcfd9](https://github.com/googleapis/librarian/commit/ccfcfd9)) * support SSH remotes (#1898) ([3aebde8](https://github.com/googleapis/librarian/commit/3aebde8)) * Correct help text for push flag (#1908) Updates help text to refer to the correct '-push' flag instead of the non-existent '-push-config'. Fixes #1726 With this fix, `go run ./cmd/librarian generate -h` shows: ``` jinseop@jinseop:/workspace/librarian$ go run ./cmd/librarian generate -h Specify the API repository root and the path within it for the API to generate. Optional flags can be specified to use a non-default language repository, and to indicate whether or not to build the generated library. The generate command handles both onboarding new libraries and regenerating existing ones. The behavior is determined by the provided flags. **Onboarding a new library:** To configure and generate a new library, specify both the "-api" and "-library" flags. This process involves: 1. Running the "configure" command in the language container to set up the repository. 2. Adding the new library's configuration to the ".librarian/state.yaml" file. 3. Proceeding with the generation steps below. **Regenerating existing libraries:** If only "-api" or "-library" is specified, the command regenerates that single, existing library. If neither flag is provided, it regenerates all libraries listed in ".librarian/state.yaml". The generation process for an existing library involves delegating to the language container's 'generate' command. After generation, the tool cleans the destination directory and copies the new files into place, according to the configuration in '.librarian/state.yaml'. If the '--build' flag is specified, the 'build' command is also executed. **Output:** After generation, if the "-push" flag is provided, the changes are committed to a new branch, and a pull request is created. Otherwise, the changes are left in the local working tree for inspection. Usage: librarian generate -source=<api-root> -api=<api-path> [flags] Flags: -api string path to the API to be configured/generated (e.g., google/cloud/functions/v2) -api-source string location of googleapis repository. If undefined, googleapis will be cloned to the output -branch string remote branch to use with the code repository for cloning and pull requests. (default "main") -build whether to build the generated code -host-mount string a mount point from Docker host and within the Docker. The format is {host-dir}:{local-dir}. -image string Container image to run for subcommands. Defaults to the image in the pipeline state. -library string The ID of a single library to update. This is repo-specific and defined in the state.yaml -output string Working directory root. When this is not specified, a working directory will be created in /tmp. -push whether to push the generated code -repo string Code repository where the generated code will reside. Can be a remote in the format of a remote URL such as https://github.com/{owner}/{repo} or a local file path like /path/to/repo. Both absolute and relative paths are supported. If not specified, will try to detect if the current working directory is configured as a language repository. 2025/09/03 12:26:47 flag: help requested exit status 1 ``` ([cedfb49](https://github.com/googleapis/librarian/commit/cedfb49)) * prevent panic on release command without subcommand (#1901) Fixes #1723 When running without a subcommand, the program panicked due to a nil pointer dereference. This occurred because the command has no action and no configuration. This change adds a check to see if a command has a function. If it does not, it prints the command's help text and exits, preventing the panic. With the fix: ``` jinseop@jinseop:/workspace/librarian$ go run ./cmd/librarian release Manages releases of libraries. Usage: librarian release <command> [arguments] Commands: init initiates a release by creating a release pull request. tag-and-release tags and creates a GitHub release for a merged pull request. 2025/09/02 16:55:30 command "release" requires a subcommand exit status 1 ``` ([ee7391a](https://github.com/googleapis/librarian/commit/ee7391a)) * Parse arguments as flags on hyphen prefix (#1902) Fixes [#1724](https://github.com/googleapis/librarian/issues/1724) ``` > go run ./cmd/librarian release -h Manages releases of libraries. Usage: librarian release <command> [arguments] Commands: init initiates a release by creating a release pull request. tag-and-release tags and creates a GitHub release for a merged pull request. 2025/09/02 17:36:44 flag: help requested exit status 1 ``` Matches the convention from `go run ./cmd/librarian generate -h` to output with `flag: help requested` with the flag usage ([e9f2ea3](https://github.com/googleapis/librarian/commit/e9f2ea3)) * generate should fail with error if all libraries failed (#1876) Fixes #1787 ([b7b26e2](https://github.com/googleapis/librarian/commit/b7b26e2)) * for tag-and-release not reading -repo flag (#1878) fixes #1855 ([a7188e2](https://github.com/googleapis/librarian/commit/a7188e2)) * skip fetching commits if last generated commit is empty (#1870) Fixes #1869 ([8b3c743](https://github.com/googleapis/librarian/commit/8b3c743)) * get conventional commits from source repository (#1867) Function `updateChangesSinceLastGeneration` may not be needed since we don't need to pass api changes to language container. Fixes #1866 ([40e7bc3](https://github.com/googleapis/librarian/commit/40e7bc3)) * default to source_roots when no remove_regex (#1863) It is expected behavior to defaults to the `source_roots` as documented. Adding missed implementation. https://github.com/googleapis/librarian/blob/8f409cc46adc7958a9393e52bd4b272ce2d75697/internal/config/state.go#L116-L119 Fixes #1739 ([3d051f8](https://github.com/googleapis/librarian/commit/3d051f8)) * add MergeCommitSHA check, _PR substitution, PR limit in publish-release automation command (#1833) add MergeCommitSHA check, _PR substitution, PR limit in publish-release automation command https://github.com/googleapis/librarian/issues/1786 https://github.com/googleapis/librarian/issues/1810 ([4d2db9b](https://github.com/googleapis/librarian/commit/4d2db9b)) * bump version while updating libraries for release (#1842) Also refactored the function a little as it takes a pointer to data so no need to return the data -- mutate it instead. ([d6fa957](https://github.com/googleapis/librarian/commit/d6fa957)) * don't clean dir for release init copies (#1824) We should intentionally copy over only the files that are in the output directory of the release init container. We don't mandate today that all libraries files must be copied over, so we should selectively overwrite files when required. ([a8ddd21](https://github.com/googleapis/librarian/commit/a8ddd21)) * use a clean output directory for each API when generating (#1836) An alternative would be to clean the output directory after each library is generated, but keeping them all (separately) will make it easier to diagnose problems. Fixes #1774 ([5ebd352](https://github.com/googleapis/librarian/commit/5ebd352)) * don't pass undocumented flags (#1834) ([7ef0103](https://github.com/googleapis/librarian/commit/7ef0103)) * don't clone apisource for `release init` (#1825) ([71a25ee](https://github.com/googleapis/librarian/commit/71a25ee)) * subcommands now process args correctly (#1826) ([95f6736](https://github.com/googleapis/librarian/commit/95f6736)) * ignore version override if library flag is not specified (#1822) Fixes #1823 ([aa507b1](https://github.com/googleapis/librarian/commit/aa507b1)) * track the source service for mixins (#1821) We need this to generate the right gRPC calls in Rust. ([c0c043b](https://github.com/googleapis/librarian/commit/c0c043b)) * setup global config in init docker command (#1800) Fixes #1795 ([ca31f73](https://github.com/googleapis/librarian/commit/ca31f73)) * make response files optional for generate/build (#1788) readLibraryState() now returns a nil pointer (but no error) if the container response file doesn't exist. When the response is required (e.g. for configure) this should be checked explicitly. Fixes #1741 ([ad446e1](https://github.com/googleapis/librarian/commit/ad446e1)) * username is required, but ignored for GitHub's https push (#1784) ([d40c87c](https://github.com/googleapis/librarian/commit/d40c87c)) * make config.yaml optional (#1783) This file should not be required. ([eb00ef2](https://github.com/googleapis/librarian/commit/eb00ef2)) * change librarian volume to read-write in `build` command (#1772) Fixes #1771 ([c2a26dc](https://github.com/googleapis/librarian/commit/c2a26dc)) * support local language repos better (#1756) ([c9d075e](https://github.com/googleapis/librarian/commit/c9d075e)) * generate command should parse the -push flag (#1744) Fixes #1743 ([b53dcf3](https://github.com/googleapis/librarian/commit/b53dcf3)) * fix invalidPathChars regex (#1714) Failure observed in #1713 because flaw in regex `invalidPathChars`, the null byte (\x00) to be treated as a literal string of \, x, 0, 0, which incorrectly flagged any path containing the number 0 as invalid (e.g., area120). This fix changes the constant to an interpreted string. Test cases added. Fixes #1713 ([dcd1f71](https://github.com/googleapis/librarian/commit/dcd1f71)) * use source repo if `api-source` flag is not specified (#1633) Fixes #1631 ([7f365a4](https://github.com/googleapis/librarian/commit/7f365a4)) * add release related fields to state (#1630) add new fields related to release according to [go/librarian:release-command](http://goto.google.com/librarian:release-command). Fixes #1006 ([29881b8](https://github.com/googleapis/librarian/commit/29881b8)) * update state file for each success (#1017) ([18457c3](https://github.com/googleapis/librarian/commit/18457c3)) * sidekick commands execute on Windows (#1577) ([c7bf957](https://github.com/googleapis/librarian/commit/c7bf957)) * remove github.com/ghodss/yaml dependency (#1574) Replace use of github.com/ghodss/yaml with a small function since the needed functionality is only a few lines of code. Fixes https://github.com/googleapis/librarian/issues/1545 ([f1293f9](https://github.com/googleapis/librarian/commit/f1293f9)) * fix errors in internal/sidekick (#1575) Fix these errors detected by TestGolangCILint: ``` --- FAIL: TestGolangCILint (1.53s) all_test.go:156: /Users/julieqiu/bin/homebrew/Cellar/go/1.24.4/libexec/bin/go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest run: exit status 1 internal/sidekick/internal/api/model.go:27:2: Comment should end in a period (godot) // descriptorpb.FieldDescriptorProto_Type ^ internal/sidekick/internal/api/model.go:290:1: Comment should end in a period (godot) // ``` ^ internal/sidekick/internal/api/model.go:368:1: Comment should end in a period (godot) // OperationInfo contains normalized long running operation info ^ internal/sidekick/internal/api/documentation.go:116:9: QF1004: could use strings.ReplaceAll instead (staticcheck) new := strings.Replace(*documentation, override.Match, override.Replace, -1) ^ internal/sidekick/internal/dart/annotate.go:593:3: QF1002: could use tagged switch on field.Typez (staticcheck) switch { ^ internal/sidekick/internal/dart/annotate.go:613:3: QF1002: could use tagged switch on valueField.Typez (staticcheck) switch { ^ internal/sidekick/internal/dart/annotate.go:669:3: QF1002: could use tagged switch on field.Typez (staticcheck) switch { ^ internal/sidekick/internal/dart/annotate.go:681:3: QF1002: could use tagged switch on valueField.Typez (staticcheck) switch { ^ internal/sidekick/internal/dart/annotate.go:730:3: QF1002: could use tagged switch on field.Typez (staticcheck) switch { ^ internal/sidekick/internal/parser/pagination.go:63:6: QF1001: could apply De Morgan's law (staticcheck) if !(hasPageSize && hasPageToken != nil) { ^ internal/sidekick/internal/parser/pagination.go:87:6: QF1001: could apply De Morgan's law (staticcheck) if !(hasNextPageToken && hasRepeatedItem) { ^ internal/sidekick/internal/rust/annotate.go:775:3: QF1002: could use tagged switch on segment (staticcheck) switch { ^ internal/sidekick/internal/rust/codec.go:492:2: QF1003: could use tagged switch on f.Typez (staticcheck) if f.Typez == api.MESSAGE_TYPE { ^ internal/sidekick/sidekick_test.go:148:30: QF1004: could use strings.ReplaceAll instead (staticcheck) "package-name-override": strings.Replace(config.Name, "/", "-", -1) + "-golden-protobuf", ^ internal/sidekick/downloads_cache_test.go:209:49: makeTestContents - result 1 (error) is always nil (unparam) func makeTestContents(t *testing.T) (*contents, error) { ^ internal/sidekick/internal/dart/annotate.go:202:74: (*annotateModel).annotateModel - result 0 (*github.com/googleapis/librarian/internal/sidekick/internal/dart.modelAnnotations) is never used (unparam) func (annotate *annotateModel) annotateModel(options map[string]string) (*modelAnnotations, error) { ^ internal/sidekick/internal/golang/gotemplate.go:106:64: annotateModel - result 0 (*github.com/googleapis/librarian/internal/sidekick/internal/golang.modelAnnotations) is never used (unparam) func annotateModel(model *api.API, options map[string]string) (*modelAnnotations, error) { ^ internal/sidekick/downloads_cache_test.go:33:14: os.MkdirTemp() could be replaced by t.TempDir() in TestExistingDirectory (usetesting) tmp, err := os.MkdirTemp(t.TempDir(), "sidekick-test-") ^ internal/sidekick/downloads_cache_test.go:65:18: os.MkdirTemp() could be replaced by t.TempDir() in TestWithDownload (usetesting) testDir, err := os.MkdirTemp(t.TempDir(), "sidekick-test-") ^ internal/sidekick/downloads_cache_test.go:112:18: os.MkdirTemp() could be replaced by t.TempDir() in TestTargetExists (usetesting) testDir, err := os.MkdirTemp(t.TempDir(), "sidekick-test-") ^ internal/sidekick/downloads_cache_test.go:147:18: os.MkdirTemp() could be replaced by t.TempDir() in TestDownloadGoogleapisRootTgzExists (usetesting) testDir, err := os.MkdirTemp(t.TempDir(), "sidekick-test-") ^ internal/sidekick/downloads_cache_test.go:170:18: os.MkdirTemp() could be replaced by t.TempDir() in TestDownloadGoogleapisRootNeedsDownload (usetesting) testDir, err := os.MkdirTemp(t.TempDir(), "sidekick-test-") ^ internal/sidekick/sidekick_dart_test.go:26:17: os.MkdirTemp() could be replaced by t.TempDir() in TestDartFromProtobuf (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_rust_prost_convert_test.go:25:17: os.MkdirTemp() could be replaced by t.TempDir() in TestRustProstConvert (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_rust_prost_test.go:25:17: os.MkdirTemp() could be replaced by t.TempDir() in TestRustProstFromProtobuf (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_sample_test.go:25:17: os.MkdirTemp() could be replaced by t.TempDir() in TestSampleFromProtobuf (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_test.go:43:17: os.MkdirTemp() could be replaced by t.TempDir() in TestRustFromOpenAPI (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_test.go:84:17: os.MkdirTemp() could be replaced by t.TempDir() in TestRustFromProtobuf (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_test.go:176:17: os.MkdirTemp() could be replaced by t.TempDir() in TestRustModuleFromProtobuf (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_test.go:244:17: os.MkdirTemp() could be replaced by t.TempDir() in TestRustBootstrapWkt (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_test.go:311:17: os.MkdirTemp() could be replaced by t.TempDir() in TestRustOverrideTitleAndDescription (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/sidekick_test.go:363:17: os.MkdirTemp() could be replaced by t.TempDir() in TestGoFromProtobuf (usetesting) outDir, err := os.MkdirTemp(t.TempDir(), "golden") ^ internal/sidekick/update_test.go:39:8: os.Chdir() could be replaced by t.Chdir() in TestUpdateRootConfig (usetesting) defer os.Chdir(cwd) ^ internal/sidekick/update_test.go:40:12: os.Chdir() could be replaced by t.Chdir() in TestUpdateRootConfig (usetesting) if err := os.Chdir(tempDir); err != nil { ^ ``` Fixes https://github.com/googleapis/librarian/issues/1541 ([caaee72](https://github.com/googleapis/librarian/commit/caaee72)) * ignored directories are configurable (#1573) ([906e2e0](https://github.com/googleapis/librarian/commit/906e2e0)) * skip dart directory (#1570) For https://github.com/googleapis/librarian/issues/1563 ([6ac562e](https://github.com/googleapis/librarian/commit/6ac562e)) * hardcode dart as excluded path (#1564) Sidekick currently hardcodes paths that are excluded when running on the google-cloud-rust repo. Change this from generator/ to dart/ since the code moved. This logic will be refactored in a follow-up PR. For https://github.com/googleapis/librarian/issues/1563 ([b601994](https://github.com/googleapis/librarian/commit/b601994)) * fix TestGcloudConfig (#1557) TestGcloudConfig is skipped in https://github.com/googleapis/librarian/pull/1533. The test failure is now fixed. Fixes https://github.com/googleapis/librarian/issues/1544 ([df86dd2](https://github.com/googleapis/librarian/commit/df86dd2)) * merge into single Go module (#1533) Remove the go.mod file from internal/sidekick, merging sidekick and librarian into a single Go module. Add a requireProtoc helper to skip tests when protoc is not installed, ensuring go test ./... passes on a fresh clone without requiring protoc. Install protoc as part of the workflow in https://github.com/googleapis/librarian/blob/main/.github/workflows/librarian.yaml, so that all tests run in CI. Codecov is temporarily disabled for internal/sidekick because internal/sidekick reduced code coverage from 82% to 65%, which is our below baseline of 80%. This will be fixed in follow up PRs. For https://github.com/googleapis/librarian/issues/1510 For https://github.com/googleapis/librarian/issues/1543 Fixes https://github.com/googleapis/librarian/issues/1538 Fixes https://github.com/googleapis/librarian/issues/1535 ([904934e](https://github.com/googleapis/librarian/commit/904934e)) * fix godoclint errors (#1554) Fix godoclint errors and remove internal/sidekick from the exclude list in TestGodocLint. Fixes https://github.com/googleapis/librarian/issues/1542 ([5448d85](https://github.com/googleapis/librarian/commit/5448d85)) * make repo flag optional and derive from cwd when applicable (#1522) Make repo flag optional, removing required flag validation. Add logic to derive from current working directory when there is librarian state file detected, otherwise, return error. ([b06989f](https://github.com/googleapis/librarian/commit/b06989f)) * read configure response (#989) Fixes #985 ([60554f6](https://github.com/googleapis/librarian/commit/60554f6)) * rm unused flags (#1506) ([6d33faf](https://github.com/googleapis/librarian/commit/6d33faf)) * improve error handling at commit and push (#1508) When no changes to commit, should log and return with no error, do not attempt to proceed with commit and push. Commit error should be captured and returned. Added test cases for these error handling, and fixed test setup with mocks. Fixes #994 ([9f5b05a](https://github.com/googleapis/librarian/commit/9f5b05a)) * run yamlfmt on internal/sidekick ([3a2eea7](https://github.com/googleapis/librarian/commit/3a2eea7)) * use snake_case in generate-request.json (#1045) Fixes https://github.com/googleapis/librarian/issues/1044 ([4c00f7d](https://github.com/googleapis/librarian/commit/4c00f7d)) * populate service config in `configure` command (#1500) Fixes #1499 ([02344f4](https://github.com/googleapis/librarian/commit/02344f4)) * add github remote https limitation in error message (#1025) Add https scheme in error message, because we limit git to use https urls. Fixes #993 ([efdcce7](https://github.com/googleapis/librarian/commit/efdcce7)) * derive github url from remote origin (#1003) Derive Github url only from the remote named origin. The other remotes will be ignored. Fix #919 ([87a232c](https://github.com/googleapis/librarian/commit/87a232c)) * handle generation for all libraries vs. single library according to flags (#977) Add flow control to handle both single library generation and all configured libraries generation. - Add "--library" flag and config - removed redundant/outdated `detectIfLibraryConfigured` - generate logic addition/change: - generate single library if `api` or `library` specified, extra step to configure new library when both `api` and `library` specified and library not present in state.yaml - loop though state and generate for all existing libraries when no `api` or `library` specified. - `runConfigureCommand` adds library entry to state, and calls containerClient.Configure with correct request/ctx. - add test cases, updates to some log entries, and update command doc to reflect changes - remove some unused code Reference for reviewers: decision diagram in [go/librarian:generate-command](http://go/librarian:generate-command) Fixes #929 Fixes #955 Fixes #931 ([d9f37fc](https://github.com/googleapis/librarian/commit/d9f37fc)) * rename flag source to api-source (#987) rename flag source to api-source ([b33b06e](https://github.com/googleapis/librarian/commit/b33b06e)) * make pushConfig default to empty string (#946) make pushConfig default to empty string ([cf1111e](https://github.com/googleapis/librarian/commit/cf1111e)) * update generate required flag checks (#935) Fix required flag check in generate.go - remove required flag check for `api` and `source` flag in newGenerateRunner - add a check in `runConfigureCommand` for `api` as it is required for generating a library for the first time - swap test cases accordingly - update `repo` flag description Fixes #928 Fixes #914 ([6f76a14](https://github.com/googleapis/librarian/commit/6f76a14)) * use absolute path for librarian mount (#927) use absolute path for librarian mount in docker.Generate and docker.Build, update test to verify Fixes #925 ([10e3218](https://github.com/googleapis/librarian/commit/10e3218)) * load state.yaml from librarian dir (#915) State file is now expected in `.librarian/state.yaml` Fixes #916 ([d41bd0e](https://github.com/googleapis/librarian/commit/d41bd0e)) * rename findLibraryIDByApiPath to findLibraryIDByAPIPath (#860) Rename following Go conventions to favor capitalizing entire acronyms or initialisms like "API" and "ID" in names. ([87bdb2c](https://github.com/googleapis/librarian/commit/87bdb2c)) * redefine the pipeline-state file contract (#803) Defines pipeline state file contract in state.go, revised helper functions saving and loading pipeline state, and validation logics in stateandconfig.go. - created config/state.go for state.yaml file contract - renamed temp structs for pipeline config as config/pipelineconfig.go (created in #800) - created [doc/state-schema.md](https://github.com/googleapis/librarian/blob/a6817d8a68740032a833d9d123d2426893dd132d/doc/state-schema.md) to document the schema and requirements. - Validate() added for the state structs, and validation done right after parsing. - validation for library-id is added according to #784, for list of validation constraints on each field, refer to the added [doc/state-schema.md](https://github.com/googleapis/librarian/blob/a6817d8a68740032a833d9d123d2426893dd132d/doc/state-schema.md) Fixes #772 ([1952280](https://github.com/googleapis/librarian/commit/1952280)) * remove create-release-artifacts command (#817) Remove create-release-artifacts command and associated code referenced by it to simplify the codebase. The docs and comments will be further cleaned up in the following PR and being tracked by #802 Fixes #782 ([af17cb2](https://github.com/googleapis/librarian/commit/af17cb2)) * remove update-image-tag command (#811) Remove update-image-tag command and associated code referenced by it to simplify the codebase. The docs and comments will be further cleaned up in the following PR and being tracked by https://github.com/googleapis/librarian/issues/802. Fixes https://github.com/googleapis/librarian/issues/778 ([08691e2](https://github.com/googleapis/librarian/commit/08691e2)) * Remove publish-release-artifacts command (#801) Remove `publish-release-artifacts` command, associated code and documentation. Closes #780 --------- ([b6d8062](https://github.com/googleapis/librarian/commit/b6d8062)) * remove merge-release-pr command (#797) Remove `merge-release-pr` command and associated code referenced by it to simplify the codebase. Also clean up merge-release-pr and create-release-pr from the docs and comments. Fixes #779 ([56d8428](https://github.com/googleapis/librarian/commit/56d8428)) * remove create-release-pr command (#789) Remove `create-release-pr` command and associated code referenced by it to simplify the codebase. Fixes #781 ([39d2a9b](https://github.com/googleapis/librarian/commit/39d2a9b)) * add Command types (#2584) Go structs are added to support unmarshalling the gcloud command YAML files in testdata/parallelstore/surface. The files in testdata/parallelstore/surface were updated to ensure compatibility with round-trip parsing tests. Specifically: - The help_text fields were converted from block scalars to single-line style - Fields that were set to false have been removed ([6ea6d31](https://github.com/googleapis/librarian/commit/6ea6d31)) * run yamlfmt on testdata (#2583) Ran yamlfmt on the testdata directory to ensure consistent formatting and make the files easier to read and compare against in tests. ([19ed950](https://github.com/googleapis/librarian/commit/19ed950)) * rename flagAddAPIRoot to flagAddAPI (#712) ([8c1a875](https://github.com/googleapis/librarian/commit/8c1a875)) * remove flag push (#723) remove the flag push according to go/librarian:cli-reimagined. The config is not touched and will get false by default. Underlying logic will change in future, leaving out of scope for this fix. Fixes #679 ([3958224](https://github.com/googleapis/librarian/commit/3958224)) * delete configure (#717) Fixes https://github.com/googleapis/librarian/issues/673 ([727c03d](https://github.com/googleapis/librarian/commit/727c03d)) * rename APIPath to API (#711) Rename APIPath to API to match the new flag name. For https://github.com/googleapis/librarian/pull/686 ([7b6847e](https://github.com/googleapis/librarian/commit/7b6847e)) * rename APIRoot to Source (#710) Rename APIRoot to Source to match the flag name. Fixes https://github.com/googleapis/librarian/issues/677 ([f65993f](https://github.com/googleapis/librarian/commit/f65993f)) * rename flag api-root to source (#688) Fixes #677 ([f0db649](https://github.com/googleapis/librarian/commit/f0db649)) * rename flag api-path to api (#686) Fixes #676 ([1655d08](https://github.com/googleapis/librarian/commit/1655d08)) ### Documentation * move CLI docs to cmd pkg (#2314) We should have these at the root of the command where people would install the CLI from. Will link to these in the README in a future commit. ([17a68d4](https://github.com/googleapis/librarian/commit/17a68d4)) * regen CLI docs (#2296) ([654b8f3](https://github.com/googleapis/librarian/commit/654b8f3)) * add godoc for nested commands (#2225) Added Go's versions of partials to the text template so we can recurse through nested commands and print all of thier help text godoc. ([58f943a](https://github.com/googleapis/librarian/commit/58f943a)) * generate helptext for subcommands (#2114) Also had to remove that it was an error to not to not specify Run. ([b91721a](https://github.com/googleapis/librarian/commit/b91721a)) * start generating package godoc (#1956) Created a means for us to generate the doc.go file based off output from the help text. There is much more doc that still needs to be put into this file but wanted to land this as a proof of concept at least. ([43e0a10](https://github.com/googleapis/librarian/commit/43e0a10)) * add some clarifications (#1974) ([fb75149](https://github.com/googleapis/librarian/commit/fb75149)) * add consistency and more examples for CLI help text (#1948) ([505b74a](https://github.com/googleapis/librarian/commit/505b74a)) * bring more consistent styling to flag documentation ([4be588f](https://github.com/googleapis/librarian/commit/4be588f)) * fix repo flag formatting (#1916) ([b8dc941](https://github.com/googleapis/librarian/commit/b8dc941)) * update help text for library flag (#1841) Fixes #1725 ([1321930](https://github.com/googleapis/librarian/commit/1321930)) * add doc comments for all exported symbols (#1556) Add missing documentation comments for all exported symbols and enable TestExportedSymbolsHaveDocs for internal/sidekick. Fixes https://github.com/googleapis/librarian/issues/1540 ([9dd3573](https://github.com/googleapis/librarian/commit/9dd3573)) </details>
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.
Librarian Version: not available
Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-release-container@sha256:50dd9b59bcf4f55178f9a35dcd4f81a8db20609da386357fa05a457a8da3b4e9
librarian: 0.1.2
0.1.2 (2025-09-08)
Features
add release notes in release pull request (feat: add release notes in release pull request #1905) (eebb5fe)
add pr body to generate pull request (feat: add pr body to generate pull request #1909) (9d782cf)
log generation statistics on completion (feat(internal/librarian): log generation statistics on completion #1892) (716e677)
add -branch flag for cloning and PRs (feat(internal/librarian): add -branch flag for cloning and PRs #1893) (3521090)
change README for GA clients (feat(sidekick/rust): change README for GA clients #1889) (9e1450d)
allow APIs to have no service config (feat(librarian): allow APIs to have no service config #1854) (f88a51a)
get commit history since last library generation (feat: get commit history since last library generation #1837) (8f409cc)
format release notes content for each library (feat(librarian): format release notes content for each library #1827) (1f3b20a)
rev the required Dart SDK version (feat(dart): rev the required Dart SDK version #1848) (1df05c3)
allow libraries to have no APIs (feat(librarian): allow libraries to have no APIs #1853) (c1f770e)
implement
commit
flag for release init (feat: implementcommit
flag for release init #1816) (c590f20)tag-and-release logic (feat(internal/librarian): tag-and-release logic #1812) (949f02f)
create a pull request in release init command (feat: create a pull request in release init command #1793) (152b561)
copy libraries and global files from container output to repo in release init command (feat: copy libraries and global files from container output to repo in release init command #1790) (f0edfd6)
publish-release automation only triggers CloudBuild if a repository contains a merged pull request with label release:pending (feat: publish-release automation only triggers CloudBuild if a repository contains a merged pull request with label release:pending #1789) (bded5dc)
support derive next semver from conventional commits (feat(internal/semver): support derive next semver from conventional commits #1769) (73c1bc7)
get library changes in
release init
command (feat: get library changes inrelease init
command #1780) (8756e01)add ability to create branch and push to remote repository (feat: add ability to create branch and push to remote repository #1775) (e3c9e31)
add a skeleton for release init (feat(internal/librarian): add a skeleton for release init #1761) (6dbc3c0)
add logic to get pull requests (feat(internal/librarian): add logic to get pull requests #1754) (6444b5f)
add logic to parse pr bodies (feat(internal/librarian): add logic to parse pr bodies #1767) (00b91cd)
parse conventional commits for library since last released version -part2 (feat(librarian): parse conventional commits for library since last released version -part2 #1765) (b2e2c93)
parse conventional commits for library since last released version (feat(librarian): parse conventional commits for library since last released version #1711) (65a9774)
add automation go script for triggering all configured repositories (feat: add automation go script for triggering all configured repositories #1687) (2d88ae9)
extends
configure-request.json
(feat(internal/docker): extendsconfigure-request.json
#1715) (0190366)partially copy a repo (feat(librarian/docker): partially copy a repo #1686) (946e550)
add skeleton for release tag-and-release (feat(internal/librarian): add skeleton for release tag-and-release #1701) (004401f)
add support requred for release (feat(internal/github): add support requred for release #1693) (c8a858e)
implement
release-init
container contract (feat: implementrelease-init
container contract #1677) (7b883ee)add a global config (feat: add a global config #1663) (4b35724)
add RepositoriesConfig yaml struct (feat: add RepositoriesConfig yaml struct #1661) (709adc0)
add labels to a github issue (feat: add labels to a github issue #1642) (a5b5b68)
clone googleapis if apisource is unspecified (feat: clone googleapis if apisource is unspecified #1589) (955052c)
Bug Fixes
add a newline between commits (b92defc)
save old version in release (fix: save old version in release #1953) (a00e91b)
report the correct missing environment variable (fix(internal/librarian): report the correct missing environment variable #1962) (50acf6e)
change merge PR check condition to use merge_at field (fix: change merge PR check condition to use merge_at field #1959) (31e3ef3)
Tests and commands run in Windows (fix(sidekick): Tests and commands run in Windows #1954) (f890a37)
do not delete any files in .librarian/generator-input directory (fix: do not delete any files in .librarian/generator-input directory #1934) (0d3b7eb)
Add label for PRs on release init (fix: Add label for PRs on release init #1911) (c6e8e2e)
fix pull request url format mismatch (fix: fix pull request url format mismatch #1927) (ccfcfd9)
support SSH remotes (fix(librarian): support SSH remotes #1898) (3aebde8)
Correct help text for push flag (fix(generate): Correct help text for push flag #1908) (cedfb49)
prevent panic on release command without subcommand (fix(librarian): prevent panic on release command without subcommand #1901) (ee7391a)
Parse arguments as flags on hyphen prefix (fix(internal/librarian): Parse arguments as flags on hyphen prefix #1902) (e9f2ea3)
generate should fail with error if all libraries failed (fix(internal/librarian): generate should fail with error if all libraries failed #1876) (b7b26e2)
for tag-and-release not reading -repo flag (fix: for tag-and-release not reading -repo flag #1878) (a7188e2)
skip fetching commits if last generated commit is empty (fix: skip fetching commits if last generated commit is empty #1870) (8b3c743)
get conventional commits from source repository (fix: get conventional commits from source repository #1867) (40e7bc3)
default to source_roots when no remove_regex (fix(internal/librarian): default to source_roots when no remove_regex #1863) (3d051f8)
add MergeCommitSHA check, _PR substitution, PR limit in publish-release automation command (fix: add MergeCommitSHA check, _PR substitution, PR limit in publish-release automation command #1833) (4d2db9b)
bump version while updating libraries for release (fix(librarian): bump version while updating libraries for release #1842) (d6fa957)
don't clean dir for release init copies (fix(internal/librarian): don't clean dir for release init copies #1824) (a8ddd21)
use a clean output directory for each API when generating (fix: use a clean output directory for each API when generating #1836) (5ebd352)
don't pass undocumented flags (fix(librarian): don't pass undocumented flags #1834) (7ef0103)
don't clone apisource for
release init
(fix(librarian): don't clone apisource forrelease init
#1825) (71a25ee)subcommands now process args correctly (fix(librarian): subcommands now process args correctly #1826) (95f6736)
ignore version override if library flag is not specified (fix: ignore version override if library flag is not specified #1822) (aa507b1)
track the source service for mixins (fix(sidekick): track the source service for mixins #1821) (c0c043b)
setup global config in init docker command (fix: setup global config in init docker command #1800) (ca31f73)
make response files optional for generate/build (fix(internal/librarian): make response files optional for generate/build #1788) (ad446e1)
username is required, but ignored for GitHub's https push (fix: username is required, but ignored for GitHub's https push #1784) (d40c87c)
make config.yaml optional (fix: make config.yaml optional #1783) (eb00ef2)
change librarian volume to read-write in
build
command (fix: change librarian volume to read-write inbuild
command #1772) (c2a26dc)support local language repos better (fix(internal/librarian): support local language repos better #1756) (c9d075e)
generate command should parse the -push flag (fix: generate command should parse the -push flag #1744) (b53dcf3)
fix invalidPathChars regex (fix(librarian/internal): fix invalidPathChars regex #1714) (dcd1f71)
use source repo if
api-source
flag is not specified (fix(internal/librarian): use source repo ifapi-source
flag is not specified #1633) (7f365a4)add release related fields to state (fix(librarian): add release related fields to state #1630) (29881b8)
update state file for each success (fix(internal/librarian): update state file for each success #1017) (18457c3)
sidekick commands execute on Windows (fix(internal/sidekick): sidekick commands execute on Windows #1577) (c7bf957)
remove github.com/ghodss/yaml dependency (fix(internal/sidekick): remove github.com/ghodss/yaml dependency #1574) (f1293f9)
fix errors in internal/sidekick (fix(golangci-lint): fix errors in internal/sidekick #1575) (caaee72)
ignored directories are configurable (fix(sidekick): ignored directories are configurable #1573) (906e2e0)
Documentation
bring more consistent styling to flag documentation (4be588f)
fix repo flag formatting (docs(librarian): fix repo flag formatting #1916) (b8dc941)
update help text for library flag (docs: update help text for library flag #1841) (1321930)