ci: trigger downstream module integration tests on upstream component changes - #14222
Merged
Conversation
…ponent changes - Add get_upstream_modules and is_upstream_module_modified in .kokoro/common.sh to map intra-monorepo component dependencies: * java-bigquerystorage triggers java-bigquery and java-bigquery-jdbc * java-bigquery triggers java-bigquery-jdbc * grpc-gcp-java triggers java-spanner and java-spanner-jdbc * java-spanner triggers java-spanner-jdbc * java-storage triggers java-storage-nio * java-logging triggers java-logging-logback - Update should_test_all_modules in .kokoro/common.sh to run all integration tests if sdk-platform-java or google-auth-library-java is modified. - Update integration-single and graalvm-single in .kokoro/build.sh to run split integration and GraalVM tests when an upstream dependency is modified. - Include downstream modules in generate_modified_modules_list for batch runs. - Add comprehensive test coverage in .kokoro/common_test.sh for upstream triggers, auth, and sdk-platform-java changes.
lqiu96
force-pushed
the
ci-downstream-module-triggers
branch
from
September 1, 2026 02:12
b040162 to
a337eec
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Kokoro build scripts to trigger integration and GraalVM tests for downstream modules when their upstream dependencies are modified. It also expands monorepo-wide testing triggers to include modifications in sdk-platform-java and google-auth-library-java, and adds corresponding unit tests. Feedback points out a critical issue in the new test suite (test_is_upstream_module_modified) where the files variable is not updated after modifying TEST_MODIFIED_FILES, causing the tests to evaluate against stale or empty files. A code suggestion was provided to update files dynamically using get_modified_files.
blakeli0
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Following #14217, integration tests for split modules only run when their own module directory is modified or when global parent POMs change. However, some modules depend on other sibling modules in the monorepo:
java-bigquerydepends onjava-bigquerystoragejava-bigquery-jdbcdepends onjava-bigqueryandjava-bigquerystoragejava-spannerdepends ongrpc-gcp-javajava-spanner-jdbcdepends onjava-spannerandgrpc-gcp-javajava-storage-niodepends onjava-storagejava-logging-logbackdepends onjava-loggingAdditionally, changes in
sdk-platform-javaorgoogle-auth-library-javaimpact all client libraries across the entire repository and should trigger all integration tests.Changes
should_test_all_modules): Updated in.kokoro/common.shto trigger monorepo-wide integration tests if eithersdk-platform-javaorgoogle-auth-library-javais modified.get_upstream_modules&is_upstream_module_modified): Added in.kokoro/common.shto map intra-monorepo upstream dependencies and check if any upstream module was modified in the PR diff..kokoro/build.sh): Updatedintegration-singleandgraalvm-singleto execute when an upstream dependency is modified.generate_modified_modules_list): Updated to include downstream modules when their upstream dependencies are modified..kokoro/common_test.sh): Added test coverage forsdk-platform-java,google-auth-library-java, and all upstream-downstream combinations.