[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
3 times, most recently
from
July 24, 2026 03:51
ccd9d1b to
8b70554
Compare
zhengruifeng
force-pushed
the
ai-test-selection-post-merge-ci
branch
14 times, most recently
from
July 24, 2026 10:46
0050761 to
bb3dfb3
Compare
zhengruifeng
force-pushed
the
ai-test-selection-post-merge-ci
branch
from
July 24, 2026 10:52
bb3dfb3 to
f00dc64
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 dedicated smart class-level post-merge test-selection workflow without changing the existing
build_and_test.ymlworkflow.For trusted Apache Spark pushes, with this draft branch temporarily allowed in the personal fork for verification, the workflow uses Copilot CLI according to the Copilot CLI Actions guidance. The CLI receives a separate, read-only prompt for the pushed tip commit. It analyzes the actual diff, class hierarchies, and test call sites, and considers runnable PySpark doctests for changed docstrings.
The helper validates every proposed target against the checkout before execution, accepts only Scala or Java JVM suites and importable PySpark test modules, excludes R tests, and retains at most 20 targets of each type. A precompile job builds Spark once when targets were selected. The dependent JVM and Python jobs run in parallel and execute each selected class or module individually. The JVM runner resolves each suite to its SBT test project and invokes
testOnly; the Python runner usespython/run-tests --testnames.Why are the changes needed?
Post-merge changes benefit from quick, focused feedback in addition to the existing deterministic CI. Selecting validated class-level tests by dependency, hierarchy, and call-site relevance reduces unrelated test execution while retaining the existing build and test workflows as independent coverage.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
conda run -n spark-dev-313 ./dev/lint-python.git diff --check.dev/smart_test_selection.py.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)