You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(internal/librarian/java): pre-validate java libraries bom version in config (#6613)
This change modifies librarian to pre-validate that the
LibrariesBOMVersion is present for Java libraries during the
configuration parsing and tidying phase (`librarian tidy`). Previously,
this check was performed deep in the
generation phase, which could result in a later, less predictable
failure.
Fixes#5152
---------
Signed-off-by: sofisl <[email protected]>
Copy file name to clipboardExpand all lines: doc/config-schema.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -352,7 +352,7 @@ This document describes the schema for the librarian.yaml.
352
352
| Field | Type | Description |
353
353
| :--- | :--- | :--- |
354
354
|`custom_group_ids`| map[string]string | Maps API path prefixes (e.g., "google/shopping") to their corresponding Maven Group IDs (e.g., "com.google.shopping"). Use this to override the default "com.google.cloud" Group ID for specific API paths (e.g., maps, ads, shopping). |
355
-
|`libraries_bom_version`| string | Is the version of the libraries-bom to use for Java. |
355
+
|`libraries_bom_version`| string | Is the version of the libraries-bom to use for Java. This must be set in the default configuration. |
Copy file name to clipboardExpand all lines: internal/librarian/java/defaults.go
+29-17Lines changed: 29 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -169,32 +169,44 @@ var (
169
169
ErrOmitCommonResourcesConflict=errors.New("conflict: OmitCommonResources is true but google/cloud/common_resources.proto is explicitly listed in AdditionalProtos")
170
170
// ErrCannotDeriveReleasedVersion is returned when released_version cannot be derived.
171
171
ErrCannotDeriveReleasedVersion=errors.New("cannot derive released version")
172
+
// errBOMVersionMissing is returned when libraries_bom_version is not set.
173
+
errBOMVersionMissing=errors.New("libraries bom version not found in config")
172
174
)
173
175
174
-
// Validate checks that the Java-specific configuration for a library is
176
+
// Validate checks that the Java-specific configuration for a library and global config is
175
177
// correctly formatted. It ensures that there are no conflicts in common
0 commit comments