-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: GAPIC library BOM in monorepo_script bootstrap #7991
feat: GAPIC library BOM in monorepo_script bootstrap #7991
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddixit14 This message is for you in near future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will keep this in mind.
detail of the Libraries BOM. | ||
</description> | ||
<dependencyManagement> | ||
BOM_ARTIFACT_LIST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably need <dependencies>
before the placeholder, and a closing one after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The directly should match the artifact name if possible: google-cloud-gapic-bom
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
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.