Skip to content

ci: trigger downstream module integration tests on upstream component changes - #14222

Merged
lqiu96 merged 1 commit into
mainfrom
ci-downstream-module-triggers
Sep 1, 2026
Merged

ci: trigger downstream module integration tests on upstream component changes#14222
lqiu96 merged 1 commit into
mainfrom
ci-downstream-module-triggers

Conversation

@lqiu96

@lqiu96 lqiu96 commented Sep 1, 2026

Copy link
Copy Markdown
Member

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-bigquery depends on java-bigquerystorage
  • java-bigquery-jdbc depends on java-bigquery and java-bigquerystorage
  • java-spanner depends on grpc-gcp-java
  • java-spanner-jdbc depends on java-spanner and grpc-gcp-java
  • java-storage-nio depends on java-storage
  • java-logging-logback depends on java-logging

Additionally, changes in sdk-platform-java or google-auth-library-java impact all client libraries across the entire repository and should trigger all integration tests.

Changes

  • Global Triggers (should_test_all_modules): Updated in .kokoro/common.sh to trigger monorepo-wide integration tests if either sdk-platform-java or google-auth-library-java is modified.
  • Upstream Mapping (get_upstream_modules & is_upstream_module_modified): Added in .kokoro/common.sh to map intra-monorepo upstream dependencies and check if any upstream module was modified in the PR diff.
  • Split IT & GraalVM Jobs (.kokoro/build.sh): Updated integration-single and graalvm-single to execute when an upstream dependency is modified.
  • Batch Jobs (generate_modified_modules_list): Updated to include downstream modules when their upstream dependencies are modified.
  • Unit Tests (.kokoro/common_test.sh): Added test coverage for sdk-platform-java, google-auth-library-java, and all upstream-downstream combinations.

@lqiu96
lqiu96 requested review from a team as code owners September 1, 2026 02:10
…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
lqiu96 force-pushed the ci-downstream-module-triggers branch from b040162 to a337eec Compare September 1, 2026 02:12

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread .kokoro/common_test.sh
@lqiu96 lqiu96 changed the title feat(ci): trigger downstream module integration tests on upstream component changes ci: trigger downstream module integration tests on upstream component changes Sep 1, 2026
@lqiu96
lqiu96 requested review from blakeli0 and whowes September 1, 2026 14:37
@lqiu96
lqiu96 merged commit 20fc417 into main Sep 1, 2026
198 checks passed
@lqiu96
lqiu96 deleted the ci-downstream-module-triggers branch September 1, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants