-
Notifications
You must be signed in to change notification settings - Fork 49
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
ci: add downstream compatibility checks #1909
Conversation
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.
It looks good, but would it make sense to add some tests for the functions added in common.sh
?
What's the reason to not checkout HEAD on main branch? To avoid possible frictions? |
if [ -z "${MODULES_UNDER_TEST}" ]; then | ||
echo "MODULES_UNDER_TEST must be set to run downstream-build.sh" | ||
exit 1 | ||
fi | ||
# Use default value for REPOS_UNDER_TEST if unset. If set to empty string, maintain empty string. | ||
REPOS_UNDER_TEST=${REPOS_UNDER_TEST-"java-storage"} |
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.
Is it intentional to have java-storage
here?
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.
Yes. It's the only current repository with GraalVM tests that don't require cloud project resources.
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.
Thanks! Can we add comments to explain it?
source "$scriptDir/common.sh" | ||
|
||
echo "Setup maven mirror" | ||
mkdir -p "${HOME}/.m2" |
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.
I might be missing something, I thought .m2
folders would be created automatically by running mvn
command?
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.
Likely, however we haven't yet invoked mvn at this point.
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.
What's the content in settings.xml
? If we don't push to anywhere, I think we might be able to just use the default?
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.
https://github.com/googleapis/sdk-platform-java/blob/main/settings.xml
It uses the Google mirror instead of maven central directly.
This logic is not new to this PR. If we remove it from here, we should remove use of the mirror in all the repos that use it. I'd ask this discussion not be considered part of this PR.
sdk-platform-java/.kokoro/presubmit/downstream-build.sh
Lines 28 to 30 in 33e40ff
# Use GCP Maven Mirror | |
mkdir -p "${HOME}/.m2" | |
cp settings.xml "${HOME}/.m2" |
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 logic is not new to this PR. If we remove it from here, we should remove use of the mirror in all the repos that use it. I'd ask this discussion not be considered part of this PR.
Agreed. It was mostly for my own understanding, @suztomo what's the benefit of using Google mirror? I guess it's more stable than Maven central when downloading dependencies locally?
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.
It's also faster in Kokoro CI because both are in Google'a infrastructure.
|
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.
LGTM. Pending resolution of add more comments.
[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed! |
[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed! |
[java_showcase_unit_tests] Kudos, SonarCloud Quality Gate passed! |
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.
Thanks for adding the tests!
Adds a new GitHub workflow to perform downstream testing on client libraries.
Does not invoke integration tests. Downstream integration testing is limited to google-cloud-java via the existing GraalVM Kokoro presubmits.