[WIP][INFRA] Add smart class-level test selection for post-merge CI#57461
Draft
zhengruifeng wants to merge 1 commit into
Draft
[WIP][INFRA] Add smart class-level test selection for post-merge CI#57461zhengruifeng wants to merge 1 commit into
zhengruifeng wants to merge 1 commit into
Conversation
zhengruifeng
force-pushed
the
ai-test-selection-post-merge-ci
branch
2 times, most recently
from
July 24, 2026 03:29
56b2c83 to
ccd9d1b
Compare
zhengruifeng
force-pushed
the
ai-test-selection-post-merge-ci
branch
from
July 24, 2026 03:51
ccd9d1b to
8b70554
Compare
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 draft adds a standalone
AI test selectionpost-merge workflow. It runs only for trusted Apache Spark pushes and does not modify the existing Build workflow or its reusablebuild_and_test.ymlimplementation.Copilot CLI receives the changed paths and may inspect the checkout with read-only tools. It returns up to four Scala suite classes and four PySpark test modules.
dev/ai_test_selection.pyvalidates every target against the checkout, resolves Scala suites to their exact SBT project (including Connect, YARN, and Kafka subprojects), and rejects invalid or broad targets.The workflow invokes every selected Scala suite separately with
build/sbt "<project>/testOnly <Suite>". It builds Spark once when Python tests are selected, then invokespython/run-tests --testnames <module>separately for each selected PySpark test file. Copilot setup or request failures produce no selected targets and do not affect the existing CI workflows.Why are the changes needed?
Module-level selection can execute many tests unrelated to a post-merge change. Class-level Scala selection and per-file PySpark selection provide a focused test signal while retaining the existing deterministic CI as independent coverage.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
git diff --check.dev/ai_test_selection.py validate.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)