Skip to content

[WIP][INFRA] Add smart class-level test selection for post-merge CI#57461

Draft
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:ai-test-selection-post-merge-ci
Draft

[WIP][INFRA] Add smart class-level test selection for post-merge CI#57461
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:ai-test-selection-post-merge-ci

Conversation

@zhengruifeng

@zhengruifeng zhengruifeng commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This draft adds a standalone AI test selection post-merge workflow. It runs only for trusted Apache Spark pushes and does not modify the existing Build workflow or its reusable build_and_test.yml implementation.

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.py validates 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 invokes python/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?

  • Reviewed the individual-test commands in https://spark.apache.org/developer-tools.html.
  • Parsed the dedicated GitHub Actions workflow with PyYAML.
  • Ran git diff --check.
  • Validated known Scala, Connect, and PySpark targets with dev/ai_test_selection.py validate.
  • No full Spark test suite was run; this workflow-only change will be exercised by post-merge CI.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Codex (GPT-5)

@zhengruifeng zhengruifeng changed the title [WIP][INFRA] Add precise AI test selection to post-merge CI [WIP][INFRA] Add class-level AI test selection to post-merge CI Jul 23, 2026
@zhengruifeng zhengruifeng changed the title [WIP][INFRA] Add class-level AI test selection to post-merge CI [WIP][INFRA] Add AI-based class-level test selection for post-merge CI Jul 23, 2026
@zhengruifeng
zhengruifeng force-pushed the ai-test-selection-post-merge-ci branch 2 times, most recently from 56b2c83 to ccd9d1b Compare July 24, 2026 03:29
@zhengruifeng
zhengruifeng force-pushed the ai-test-selection-post-merge-ci branch from ccd9d1b to 8b70554 Compare July 24, 2026 03:51
@zhengruifeng zhengruifeng changed the title [WIP][INFRA] Add AI-based class-level test selection for post-merge CI [WIP][INFRA] Add smart class-level test selection for post-merge CI Jul 24, 2026
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.

1 participant