[SPARK-57069][INFRA] Share SBT precompile artifact with docker/k8s integration test CI jobs#56110
Open
zhengruifeng wants to merge 1 commit into
Open
Conversation
…t CI jobs Generated-by: Claude Code (Opus 4.7)
Contributor
Author
CI performance: before vs afterComparing per-job wall time on real CI runs:
Samples:
Reading the result
|
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.
What changes were proposed in this pull request?
This PR extends the SBT precompile-sharing pattern (parent: SPARK-56830; prior sub-tasks: SPARK-56768 pyspark, SPARK-56831 sparkr, SPARK-56943 JVM build) to the two remaining SBT-compiling jobs in
.github/workflows/build_and_test.ymlthat still run their own full Spark compile:docker-integration-testsk8s-integration-testsConcretely:
precompilejob'sif:gate is extended to also fire whendocker-integration-tests == 'true'ork8s-integration-tests == 'true'in the precondition output, so the artifact is available whenever either job needs it.docker-integration-tests:needs: precondition->needs: [precondition, precompile]if:extended with(!cancelled()) &&so the job still runs if precompile is cancelled.Run tests, with graceful fallback (continue-on-error: true).Run testsexportsSKIP_SCALA_BUILD=truewhen extraction succeeded;dev/run-tests.pyalready honors this flag and skipsbuild_apache_spark+build_spark_assembly_sbt.k8s-integration-tests:needs:andif:change.build/sbt ... "kubernetes-integration-tests/test"call rather thandev/run-tests.py, so noSKIP_SCALA_BUILDis set. SBT sees the extractedtarget/and skips compilation of the already-built modules (Spark Core, SQL, etc.); only thekubernetes-integration-teststest module itself compiles incrementally.Optional: graceful fallback if precompile fails
Same pattern as the prior sub-tasks:
precompilekeepscontinue-on-error: true.needs.precompile.result == 'success'and hascontinue-on-error: true.continue-on-error: true.SKIP_SCALA_BUILD=trueis exported only whensteps.extract-precompiled.outcome == 'success'; otherwisedev/run-tests.pyruns the original local SBT build.Worst case is degraded to the pre-PR behavior, not a workflow failure.
Profile coverage
The precompile job runs:
docker-integration-tests: profile is in the precompile invocation; the module'starget/is pre-built, sodev/run-tests --modules docker-integration-testsonly runs the test phase.k8s-integration-tests:-Pkubernetesis in the precompile so the parent module is pre-built. The job itself adds-Pkubernetes-integration-teststo enable the integration test submodule, which SBT compiles incrementally on top of the reusedtarget/. Net work in this job drops from "compile all of Spark + integration tests" to "compile only the integration-tests module".Why are the changes needed?
Today every scheduled / dispatched run of
build_and_test.ymlthat requiresdocker-integration-testsork8s-integration-testsre-runs the same SBT compile thatprecompilealready produced forpyspark/sparkr/build. Wiring these two consumers to the existing artifact removes that duplicate work for free (precompile is already running).Does this PR introduce any user-facing change?
No. CI infrastructure change only.
How was this patch tested?
The change is exercised by the CI run of this PR itself. The Download/Extract steps log artifact size; the Run tests step prints
Reusing precompiled artifact, skipping local SBT build.for the docker job when the fast path is taken. If the precompile job is forced to fail (or its artifact is missing), both consumers fall back to the original local SBT build.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)