Skip to content

Conversation

lqiu96
Copy link
Member

@lqiu96 lqiu96 commented Aug 4, 2025

See b/436286826 for more information

Example workflow run: https://github.com/googleapis/sdk-platform-java/actions/runs/16759125283/job/47449497271?pr=3877

Sample run with upper-bounds file

Running locally: ./.github/scripts/test_dependency_compatibility.sh

mvn verify -Penable-integration-tests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip -Denforcer.skip -Djavax.annotation-api.version=1.3.2 -Dgrpc.version=1.74.0 -Dgoogle.auth.version=1.37.1 -Dgoogle.http-client.version=1.47.1 -Dgson.version=2.13.1 -Dguava.version=33.4.8-jre -Dprotobuf.version=4.31.1 -Dopentelemetry.version=1.52.0 -Derrorprone.version=4.15.1 -Dj2objc-annotations.version=3.0.0 -Dthreetenbp.version=1.7.1 -Dslf4j.version=2.0.17 -Dgrpc-gcp.version=1.6.1 -Dgoogle.oauth-client.version=1.39.0 -Dgoogle.api-client.version=2.8.0 -Dthreeten-extra.version=1.8.0 -Dopencensus.version=0.31.0 -Dfindbugs.version=3.0.2 -Derrorprone.version=2.41.0 -Dcodec.version=1.19.0 -Dhttpcomponents.httpcore.version=4.4.16 -Dhttpcomponents.httpclient.version=4.5.14 -Dapache-httpclient-5.version=5.5 -Dapache-httpcore-5.version=5.3.4 -Dperfmark-api.version=0.27.0 -Dj2objc-annotations.version=3.0.0 -Dgoogle.cloud.opentelemetry.version=0.36.0 -Dopentelemetry-semconv.version=1.34.0 -Dflogger.version=0.9 -Darrow.version=18.3.0 -Ddev.cel.version=0.10.1 -Dcom.google.crypto.tink.version=1.18.0 -Dio.opentelemetry.contrib.opentelemetry-gcp-resources.version=1.48.0-alpha

Expected error when using an incompatible Deps version

Running locally with Protobuf 4.26.0: ./.github/scripts/test_dependency_compatibility.sh -l protobuf=4.26.0

Results:

[ERROR] /Users/lawrenceqiu/IdeaProjects/sdk-platform-java/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/OAuthRequirements.java:[65,42] cannot find symbol
[ERROR]   symbol:   class UnusedPrivateParameter
[ERROR]   location: class com.google.api.OAuthRequirements
[ERROR] /Users/lawrenceqiu/IdeaProjects/sdk-platform-java/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/OAuthRequirements.java:[74,51] package com.google.protobuf.GeneratedMessageV3 does not exist

Future

This does not cover binary or behavior compatibility issues. We plan on using downstream unit and integration tests to test those incompatibilities in a future date.

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Aug 4, 2025
@product-auto-label product-auto-label bot added size: l Pull request size is large. size: m Pull request size is medium. and removed size: m Pull request size is medium. size: l Pull request size is large. labels Aug 5, 2025
@lqiu96 lqiu96 force-pushed the dependency-version branch from d5b2be5 to 6e96807 Compare August 12, 2025 14:50
@lqiu96 lqiu96 force-pushed the dependency-version branch from 6e96807 to e1575ba Compare August 12, 2025 14:53
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Aug 12, 2025
@lqiu96 lqiu96 requested review from zhumin8 and blakeli0 August 12, 2025 14:57
@lqiu96 lqiu96 marked this pull request as ready for review August 12, 2025 14:57
@lqiu96
Copy link
Member Author

lqiu96 commented Aug 12, 2025

@gemini-cli /review

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR introduces a new GitHub Actions workflow to test for dependency compatibility using an upper-bounds dependency file. This is a great addition to help ensure the stability of the project.

🔍 General Feedback

  • The shell script and workflow are well-structured and easy to understand.
  • The use of workflow_dispatch is a good feature for manual testing.
  • There are a few minor issues with duplicate keys in the dependencies file and missing newlines at the end of files.

Overall, this is a solid contribution. Once the minor issues are addressed, this will be ready to merge.

@lqiu96
Copy link
Member Author

lqiu96 commented Aug 12, 2025

@gemini-cli /review

Copy link

Copy link

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@lqiu96 lqiu96 merged commit 210464d into main Aug 14, 2025
58 of 60 checks passed
@lqiu96 lqiu96 deleted the dependency-version branch August 14, 2025 21:31
lqiu96 added a commit that referenced this pull request Aug 21, 2025
See b/436286826 for more information

Example workflow run:
https://github.com/googleapis/sdk-platform-java/actions/runs/16759125283/job/47449497271?pr=3877

## Sample run with upper-bounds file
Running locally: `./.github/scripts/test_dependency_compatibility.sh`

```
mvn verify -Penable-integration-tests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip -Denforcer.skip -Djavax.annotation-api.version=1.3.2 -Dgrpc.version=1.74.0 -Dgoogle.auth.version=1.37.1 -Dgoogle.http-client.version=1.47.1 -Dgson.version=2.13.1 -Dguava.version=33.4.8-jre -Dprotobuf.version=4.31.1 -Dopentelemetry.version=1.52.0 -Derrorprone.version=4.15.1 -Dj2objc-annotations.version=3.0.0 -Dthreetenbp.version=1.7.1 -Dslf4j.version=2.0.17 -Dgrpc-gcp.version=1.6.1 -Dgoogle.oauth-client.version=1.39.0 -Dgoogle.api-client.version=2.8.0 -Dthreeten-extra.version=1.8.0 -Dopencensus.version=0.31.0 -Dfindbugs.version=3.0.2 -Derrorprone.version=2.41.0 -Dcodec.version=1.19.0 -Dhttpcomponents.httpcore.version=4.4.16 -Dhttpcomponents.httpclient.version=4.5.14 -Dapache-httpclient-5.version=5.5 -Dapache-httpcore-5.version=5.3.4 -Dperfmark-api.version=0.27.0 -Dj2objc-annotations.version=3.0.0 -Dgoogle.cloud.opentelemetry.version=0.36.0 -Dopentelemetry-semconv.version=1.34.0 -Dflogger.version=0.9 -Darrow.version=18.3.0 -Ddev.cel.version=0.10.1 -Dcom.google.crypto.tink.version=1.18.0 -Dio.opentelemetry.contrib.opentelemetry-gcp-resources.version=1.48.0-alpha
```

## Expected error when using an incompatible Deps version
Running locally with Protobuf 4.26.0:
`./.github/scripts/test_dependency_compatibility.sh -l protobuf=4.26.0`

Results:
```
[ERROR] /Users/lawrenceqiu/IdeaProjects/sdk-platform-java/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/OAuthRequirements.java:[65,42] cannot find symbol
[ERROR]   symbol:   class UnusedPrivateParameter
[ERROR]   location: class com.google.api.OAuthRequirements
[ERROR] /Users/lawrenceqiu/IdeaProjects/sdk-platform-java/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/OAuthRequirements.java:[74,51] package com.google.protobuf.GeneratedMessageV3 does not exist
```

## Future
This does not cover binary or behavior compatibility issues. We plan on
using downstream unit and integration tests to test those
incompatibilities in a future date.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants