Repository navigation
ci: add opt-in FAST_IT_BUILD path for integration-single jobs - #15304
Open
igorbernstein2 wants to merge 3 commits into
Open
igorbernstein2 wants to merge 3 commits into
igorbernstein2 wants to merge 3 commits into
Conversation
Adds an inert opt-in FAST_IT_BUILD=true code path for JOB_TYPE=integration-single that eliminates redundant Maven work without changing default behavior: - Extract shared core_always_install_deps in .kokoro/common.sh and add build_upstream_deps_list / install_upstream_deps to install only required monorepo upstream dependencies (including get_upstream_modules such as grpc-gcp-java for java-spanner / java-spanner-jdbc) without building BUILD_SUBDIR itself or pulling grpc-gcp-java / proto-google-cloud-spanner-v1 into unrelated libraries. - Pass -P=-clirr-compatibility-check to prevent clirr:check from forking a duplicate compile lifecycle despite -Pquick-build (<clirr.skip>true</clirr.skip>). - When INTEGRATION_TEST_ARGS filters modules via -pl/--projects, pre-install BUILD_SUBDIR submodules in parallel with -Dmaven.test.skip=true so main and test sources compile only once, then run mvn verify without --also-make so sibling modules are skipped. When no -pl/--projects filter is present, run a single mvn verify pass directly in BUILD_SUBDIR. - Capture mvn verify exit code with || RETURN_CODE=$? so set -e still runs popd, coerce_logs.sh, and flakybot. - Add unit tests in .kokoro/common_test.sh.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a fast integration test build mode (FAST_IT_BUILD) in the Kokoro build scripts, optimizing the build process by installing only the necessary upstream dependencies and skipping redundant submodule compilations when targeted project filters are used. The feedback points out a potential issue with capturing the exit code of the maven verify command using '|| RETURN_CODE=$?' under 'set -e', which can leave the variable unset or stale on success, and suggests using an if/else block instead.
lqiu96
approved these changes
Dec 1, 2026
lqiu96
left a comment
Member
There was a problem hiding this comment.
Thanks! I think this looks fine. Opt-in for now to see how this works for BigTable. Hopefully this helps makes BT's ITs run faster
This branch has not been deployed
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.
Summary
Adds an inert, opt-in
FAST_IT_BUILD=truebuild path to.kokoro/build.sh(JOB_TYPE=integration-single) and supporting helpers in.kokoro/common.shto eliminate redundant Maven compilation and reactor overhead (~1m–1m 30s per shard).No
.kokoro/*.cfgfiles are changed in this PR; existing CI jobs are 100% unchanged until explicitly opted in viaFAST_IT_BUILD=true(following Kokoroallowed_env_varsallowlisting).Root Causes Addressed
clirr:checkforkedcompilelifecycles: Even though-Pquick-buildsets<clirr.skip>true</clirr.skip>,clirr-maven-plugin:2.8:checkdeclares@Execute(phase = COMPILE)and forks an extracompilepass on every module before checking<skip>. Passing-P=-clirr-compatibility-check(documented injava-shared-config/java-shared-config/pom.xml) prevents the plugin binding and forked compile entirely.grpc-gcp-java/proto-google-cloud-spanner-v1: Extractscore_always_install_deps(withoutgrpc-gcp-java) and addsbuild_upstream_deps_list/install_upstream_deps, which includes module-specific upstream dependencies viaget_upstream_modules(sojava-spannerandjava-spanner-jdbcstill installgrpc-gcp-java, while unrelated libraries likejava-bigtabledropgrpc-gcp-javaandproto-google-cloud-spanner-v1).BUILD_SUBDIR:install_upstream_depsinstalls only upstream monorepo dependencies without compilingBUILD_SUBDIR.INTEGRATION_TEST_ARGSfilters modules with-pl/--projects(e.g.,-pl google-cloud-bigtable), sibling submodules are pre-installed in parallel (-T 1C -Dmaven.test.skip=true) andmvn verifyruns without--also-make, so main and test sources each compile once and sibling modules (such as emulator ITs on cloud shards) are skipped.INTEGRATION_TEST_ARGSdoes not use-pl/--projects(e.g.,java-bigtable-emulator.yaml),mvn verifyruns in a single reactor pass directly insideBUILD_SUBDIR.Verification
bash -n .kokoro/common.sh .kokoro/build.sh .kokoro/common_test.shpasses.bash .kokoro/common_test.shpasses (added unit teststest_has_maven_project_filter,test_build_upstream_deps_list, andtest_install_modules_and_upstream_deps).java-bigtable:install_upstream_deps "java-bigtable"resolves a 51-module reactor (all parents + core deps) with zerogrpc-gcp-java,spanner,bigtable, orclirrexecutions;java-spannerincludesgrpc-gcp-java(54 modules).FAST_IT_BUILD=truerun with-pl google-cloud-bigtable -P bigtable-prod-itcompilesgoogle-cloud-bigtable1x main + 1x test (down from 4x main + 2x test), skipsgoogle-cloud-bigtable-emulator, activatesfailsafe (prod-it), and runs 0clirrexecutions.FAST_IT_BUILD=truerun without-pl(-P bigtable-emulator-it) builds all 10java-bigtablesubmodules in a singlemvn verifypass (1x main + 1x test), activatesfailsafe (emulator-it), and runs 0clirrexecutions.