Skip to content

ci: Test upper bound dependenices file in Github CI #3877

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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

@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.

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

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.

1 participant