feat: GAPIC library BOM in monorepo_script bootstrap#7991
feat: GAPIC library BOM in monorepo_script bootstrap#7991suztomo merged 5 commits intogoogleapis:monorepo_scriptfrom
Conversation
|
|
||
| Review the artifact name "google-cloud-gapic-bom" in the bom directory and | ||
| configure the version managed by Release Please. Ensure the BOM is part of the | ||
| entire release pipeline. |
There was a problem hiding this comment.
@ddixit14 This message is for you in near future.
There was a problem hiding this comment.
Sure, will keep this in mind.
| detail of the Libraries BOM. | ||
| </description> | ||
| <dependencyManagement> | ||
| BOM_ARTIFACT_LIST |
There was a problem hiding this comment.
You probably need <dependencies> before the placeholder, and a closing one after.
There was a problem hiding this comment.
Indeed, the check failed with Error: Malformed POM /home/runner/work/google-cloud-java/google-cloud-java/monorepo/google-cloud-java/bom/pom.xml: Unrecognised tag: 'dependency' (position: START_TAG seen ...<dependencyManagement>\n <dependency>... @16:17) @ /home/runner/work/google-cloud-java/google-cloud-java/monorepo/google-cloud-java/bom/pom.xml, line 16, column 17.
bootstrap.sh
Outdated
| artifactId_line=$(grep --max-count=1 'artifactId' "${pom_file}") | ||
| version_line=$(grep --max-count=1 'x-version-update' "${pom_file}") | ||
|
|
||
| if [[ $version_line == *"<version>0"* ]]; then |
There was a problem hiding this comment.
Another method is to read the .repo-metadata.json for each library, which specifies whether it's preview or not. It might be more reliable. Also, why not do this in the main loop above where we iterate over repos.txt?
There was a problem hiding this comment.
Nice idea.
why not do this in the main loop above where we iterate over repos.txt?
I feel it's better to split the logic of BOM generation as separate one. No technical reason.
bootstrap.sh
Outdated
|
|
||
| mkdir bom | ||
| awk -v "dependencyManagements=$bom_lines" '{gsub(/BOM_ARTIFACT_LIST/,dependencyManagements)}1' \ | ||
| ../../bom.pom.xml > bom/pom.xml |
There was a problem hiding this comment.
The directly should match the artifact name if possible: google-cloud-gapic-bom.
|
It turned out that the bom module was not declared in the parent module (java-accesscontextmanager). Fix: googleapis/java-accesscontextmanager#359 The error from CoverageAggregator/pom.xml is: |
The bom module was missing in the root pom. It caused build failure in another issue in google-cloud-java repository: googleapis/google-cloud-java#7991 (comment) Other repositories declare the bom module correctly. Example: https://github.com/googleapis/java-accessapproval/blob/main/pom.xml#L116
|
All checks are green. |
The bom module was missing in the root pom. It caused build failure in another issue in google-cloud-java repository: #7991 (comment) Other repositories declare the bom module correctly. Example: https://github.com/googleapis/java-accessapproval/blob/main/pom.xml#L116
The bootstrap script now creates google-cloud-gapic-bom that covers the GA artifacts released from the monorepo.