GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: GAPIC library BOM in monorepo_script bootstrap by suztomo · Pull Request #7991 · googleapis/google-cloud-java

Conversation

@suztomo

@suztomo suztomo commented Jul 8, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The bootstrap script now creates google-cloud-gapic-bom that covers the GA artifacts released from the monorepo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@suztomo
feat: GAPIC library BOM in monorepo_script bootstrap
cad735b
@suztomo
suztomo requested a review from Neenu1995 July 8, 2022 16:44
suztomo added 2 commits July 8, 2022 12:51
@suztomo
fix: fixed typo
9d9e14e
@suztomo
fix: sort by module name
5373cf5
@suztomo
suztomo requested a review from ddixit14 July 8, 2022 16:58
ddixit14
ddixit14 approved these changes Jul 8, 2022
View reviewed changes
suztomo
suztomo commented Jul 8, 2022
View reviewed changes
Comment thread README.md

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.

@suztomo suztomo Jul 8, 2022

Copy link
Copy Markdown
Member Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ddixit14 ddixit14 Jul 8, 2022

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
meltsufin
meltsufin reviewed Jul 8, 2022
View reviewed changes
Comment thread bom.pom.xml
detail of the Libraries BOM.
</description>
<dependencyManagement>
BOM_ARTIFACT_LIST

@meltsufin meltsufin Jul 8, 2022

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@suztomo suztomo Jul 8, 2022

Copy link
Copy Markdown
Member Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 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

@meltsufin meltsufin Jul 8, 2022

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@suztomo suztomo Jul 8, 2022

Copy link
Copy Markdown
Member Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread bootstrap.sh Outdated

mkdir bom
awk -v "dependencyManagements=$bom_lines" '{gsub(/BOM_ARTIFACT_LIST/,dependencyManagements)}1' \
../../bom.pom.xml > bom/pom.xml

@meltsufin meltsufin Jul 8, 2022

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@suztomo suztomo Jul 8, 2022

Copy link
Copy Markdown
Member Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@suztomo
fix: fix the build
3c067d7
@suztomo

suztomo commented Jul 8, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Error: Non-resolvable import POM: Could not find artifact com.google.cloud:google-identity-accesscontextmanager-bom:pom:1.4.1-SNAPSHOT @ line 24, column 19. When I remove google-identity-accesscontextmanager-bom entry from the pom.xml, it works. What's special about google-identity-accesscontextmanager-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:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>google-cloud-java</artifactId>
    <groupId>com.google.api</groupId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>CoverageAggregator</artifactId>

  <properties>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
  </properties>

  <dependencies>
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

  </dependencies>

</project>
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@suztomo suztomo mentioned this pull request Jul 8, 2022
fix: the bom module was missing in the root pom googleapis/java-accesscontextmanager#359
Merged
gcf-merge-on-green Bot pushed a commit to googleapis/java-accesscontextmanager that referenced this pull request Jul 8, 2022
@suztomo
fix: the bom module was missing in the root pom (#359)
2af19cd
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
@suztomo
fix: run validate before creating CoverageAggregator
6d7fab0
@suztomo

suztomo commented Jul 8, 2022

Copy link
Copy Markdown
Member Author

All checks are green.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@suztomo
suztomo merged commit 46654e0 into googleapis:monorepo_script Jul 8, 2022
github-actions Bot pushed a commit that referenced this pull request Jul 8, 2022
@suztomo
fix: the bom module was missing in the root pom (#359)
476e618
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Neenu1995 Neenu1995 Awaiting requested review from Neenu1995
2 more reviewers
@meltsufin meltsufin meltsufin left review comments
@ddixit14 ddixit14 ddixit14 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@suztomo @meltsufin @ddixit14
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.