-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Presubmit upper-bound-check with Google Libraries BOM #6606
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
Conversation
|
The errors seem valid. I added "What can we do?" section. @elharo Do they (this PR and the diagnosis) look good to you? |
|
Sounds accurate. I agree that google-cloud-bom should update google-cloud-core dependency to 1.91.3 ASAP and absolutely before the next release. This is why we need this check. The PR that made this change shouldn't have gone in. |
Codecov Report
@@ Coverage Diff @@
## master #6606 +/- ##
=========================================
Coverage 46.35% 46.35%
Complexity 28001 28001
=========================================
Files 2613 2613
Lines 288075 288075
Branches 33779 33779
=========================================
Hits 133526 133526
Misses 144309 144309
Partials 10240 10240Continue to review full report at Codecov.
|
| # Read the version of POM. Example version: '0.116.1-alpha-SNAPSHOT' | ||
| VERSION_POM=google-cloud-bom/pom.xml | ||
| # Namespace (xmlns) prevents xmllint from specifying tag names in XPath | ||
| VERSION=`sed -e 's/xmlns=".*"//' $VERSION_POM | xmllint --xpath '/project/version/text()' -` |
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.
why sed -e 's/xmlns=".*"?
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.
Because Namespace (xmlns) prevents xmllint from specifying tag names in XPath.
https://stackoverflow.com/questions/41114695/get-pom-xml-version-with-xmllint
|
xmllint works nicely: |
|
Nice solution with xmllint! |
|
@chingor13 Thank you for confirmation in 6650. Would you merge this PR? (Only those with write access to this repository can merge pull requests.) |
Fixes GoogleCloudPlatform/cloud-opensource-java#971 .
@chingor13 , @kolea2 , @BenWhitehead I think this presubmit will help google-cloud-java to find forgotten dependency updates. Does this look good to you?
Background
Elliotte and I are thinking an additional presubmit to ensure upper bounds check to the libraries in Google Libraries BOM. This presubmit ensures Google Libraries BOM will pick up the highest versions among transitive dependencies.
Example failure
This presubmit fails with master (721d749):
What does that mean?
This output shows 2 errors:
com.google.auth:google-auth-library-oauth2-http: 0.18.0 is the highest but 0.17.2 is picked up (because it's closer to the root).com.google.auth:google-auth-library-credentials: 0.18.0 is the highest but 0.17.2 is picked up.What can we do?
Update the version of the two libraries.