ci: split spark_sql_test workflow per Spark version#4408
Merged
Conversation
Replace the single spark_sql_test.yml (which fanned out a 7-module x 4-version matrix) with one workflow per Spark version that delegates to a reusable spark_sql_test_reusable.yml. Spark 3.5 and 4.0 run on PRs and main; Spark 3.4 and 4.1 run on main only.
Add a `pull_request: types: [labeled]` trigger to the Spark 3.4 and 4.1 workflows, gated on the labels `run-spark-3.4-tests` and `run-spark-4.1-tests` respectively. Lets a committer opt a PR into the older / newer Spark coverage without pushing the contributor's branch into apache/datafusion-comet.
Comment on lines
+61
to
+67
| if: github.event_name != 'pull_request' || github.event.label.name == 'run-spark-3.4-tests' | ||
| uses: ./.github/workflows/spark_sql_test_reusable.yml | ||
| with: | ||
| spark-short: '3.4' | ||
| spark-full: '3.4.3' | ||
| java: 11 | ||
| collect-fallback-logs: ${{ github.event.inputs.collect-fallback-logs == 'true' }} |
Comment on lines
+76
to
+81
| uses: ./.github/workflows/spark_sql_test_reusable.yml | ||
| with: | ||
| spark-short: '3.5' | ||
| spark-full: '3.5.8' | ||
| java: 11 | ||
| collect-fallback-logs: ${{ github.event.inputs.collect-fallback-logs == 'true' }} |
Comment on lines
+76
to
+81
| uses: ./.github/workflows/spark_sql_test_reusable.yml | ||
| with: | ||
| spark-short: '4.0' | ||
| spark-full: '4.0.2' | ||
| java: 21 | ||
| collect-fallback-logs: ${{ github.event.inputs.collect-fallback-logs == 'true' }} |
Comment on lines
+61
to
+67
| if: github.event_name != 'pull_request' || github.event.label.name == 'run-spark-4.1-tests' | ||
| uses: ./.github/workflows/spark_sql_test_reusable.yml | ||
| with: | ||
| spark-short: '4.1' | ||
| spark-full: '4.1.1' | ||
| java: 17 | ||
| collect-fallback-logs: ${{ github.event.inputs.collect-fallback-logs == 'true' }} |
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
Part of #4406
spark_sql_test.yml(a 7-module x 4-version matrix) into one workflow per Spark version.spark_sql_test_reusable.ymlinvoked viaworkflow_call; each per-version caller (spark_sql_test_3_4.yml,_3_5.yml,_4_0.yml,_4_1.yml) is ~70 lines and just suppliesspark-short,spark-full, andjava.run-spark-3.4-testsorrun-spark-4.1-tests(works for fork PRs too).Each version is now its own check in PRs, which makes it easier to spot/re-run a single version. The build-native job runs once per workflow invocation (so up to 4x on a main push) but is fully cached.
Followups (not in this PR)
run-spark-3.4-testsandrun-spark-4.1-testslabels in this repo so the on-demand triggers can be applied. GitHub does not auto-create labels referenced from a workflow.Test plan
actionlint -color --shellcheck=off).main.run-spark-3.4-testslabel to a PR triggers the Spark 3.4 workflow against that PR; same forrun-spark-4.1-tests.collect-fallback-logs=trueand confirm the merged artifact uploads with the version-namespaced name.