-
Notifications
You must be signed in to change notification settings - Fork 84
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
chore: linkage monitor GitHub Actions for Java repository template #933
chore: linkage monitor GitHub Actions for Java repository template #933
Conversation
retry_with_backoff 3 10 \ | ||
mvn install -B -V \ | ||
-DskipTests=true \ | ||
-Dclirr.skip=true \ | ||
-Denforcer.skip=true \ | ||
-Dmaven.javadoc.skip=true \ | ||
-Dgcloud.download.skip=true |
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.
This command is now part of ci.yaml
# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR | ||
JAR=linkage-monitor-latest-all-deps.jar | ||
curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" | ||
|
||
# Fails if there's new linkage errors compared with baseline | ||
java -jar ${JAR} com.google.cloud:libraries-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.
These commands are done at the new action specified at GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor
. GoogleCloudPlatform/cloud-opensource-java@a7f4d63#diff-83a64340a0cc2b591f154efe6cc2f4928d0391788f54d76966bde9b7cb12d36cR10 (See the curl command downloads the versioned uber JAR)
@Neenu1995 I see you got assigned to this. Let me know if you need any clarification. |
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.
Can you send a PR to any one of the libraries to test it out? Then we'll merge this one if it passes.
Oh I see it was done in spanner. |
Thank you. |
@stephaniewang526 @chingor13
This PR migrates the Java library repositories to use the versioned action through cloud-opensource-java repository. Previously the Linkage Monitor was not versioned and caused unexpected problem in past (GoogleCloudPlatform/cloud-opensource-java#1838). To have proper versioning of the tool, we have prepared a versioned Linkage Monitor through
GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor
.As we no longer need
curl
to download the uber JAR, we don't needlinkage-monitor.sh
, I put the Maven install command in ci.yaml.Details of the background: go/jdd-github-actions.
CC: @elharo
What is Linkage Monitor
Linkage Monitor works as a presubmit check in a GitHub repository to prevent open source libraries in the Google Cloud Java orbit (GAX, google-http-java-client, gRPC, etc.) from releasing versions that would introduce new linkage errors.
More on https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/Linkage-Monitor
What did I test?
I tested this yaml file in java-spanner and it worked.
https://github.com/googleapis/java-spanner/pull/831/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133ddR57