chore: configure default_enabled_generator_features in librarian.yaml#14600
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the librarian.yaml configuration by moving the F_open_telemetry_attributes and F_proto_cloneof Go generator features to a global default_enabled_generator_features setting. Consequently, these redundant feature flags have been removed from the individual configurations of numerous libraries. I have no feedback to provide.
8ac9a35 to
1248783
Compare
bhshkh
approved these changes
May 18, 2026
Member
Author
|
To myself: This needs to be merged after Librarian pull request. |
suztomo
added a commit
to googleapis/librarian
that referenced
this pull request
May 18, 2026
…onfiguration (#6029) This change introduces default_enabled_generator_features in librarian.yaml's default.go section and updates Librarian to append these defaults to APIs' `go.enabled_generator_features` list. It implements a `union` helper to merge default generator features with API-specific ones while de-duplicating elements and preserving their original insertion order. This custom helper is necessary as the Go standard library does not provide a built-in order-preserving de-duplication helper for slices. Preserving the order of generator features is important because it ensures the generated `protoc` command line remains consistent across runs. The companion pull request is googleapis/google-cloud-go#14600. The librarian change needs to happen first. After that, I'll update the librarian version in `librarian.yaml` in google-cloud-go with a pseudo version with the default value added there. Fixes #5246
This change adds default_enabled_generator_features under default.go and removes redundant enabled_generator_features from individual APIs where they match the default. Fixes googleapis/librarian#5246 TAG=agy CONV=dc5bc0de-b49f-4b0d-ab5c-5e44d6ecd975
```
$ V=$(GOPROXY=direct go list -m -f '{{.Version}}' github.com/googleapis/librarian@main)
$ echo $V
v0.13.2-0.20260518181009-04b8e642ea4c
```
1248783 to
3369aee
Compare
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.
This change adds default_enabled_generator_features under default.go and removes redundant enabled_generator_features from individual APIs where they match the default.
The companion pull request is googleapis/librarian#6029. The librarian change needs to happen first. After that, I'll update the librarian version in
librarian.yamlin google-cloud-go with a pseudo version. => It isv0.13.2-0.20260518181009-04b8e642ea4c.I regenerated the code using the pseudo version:
This fixes
maps/mapmanagement/apiv2beta/map_management_client.gobeing generated without theF_open_telemetry_attributesoption (details: googleapis/librarian#5246 (comment)).Fixes googleapis/librarian#5246