[SPARK-48200][INFRA] Split `build_python.yml` into per-version cron jobs
### What changes were proposed in this pull request?
This PR aims to split `build_python.yml` into per-version cron jobs.
Technically, this includes a revert of SPARK-48149 and choose [the discussed alternative](https://github.com/apache/spark/pull/46407#discussion_r1591586209).
- https://github.com/apache/spark/pull/46407
- https://github.com/apache/spark/pull/46454
### Why are the changes needed?
To recover Python CI successfully in ASF INFRA policy.
- https://github.com/apache/spark/actions/workflows/build_python.yml
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Manual review.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #46477 from dongjoon-hyun/SPARK-48200.
Authored-by: Dongjoon Hyun <dhyun@apple.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
diff --git a/.github/workflows/build_python.yml b/.github/workflows/build_python_3.10.yml
similarity index 63%
copy from .github/workflows/build_python.yml
copy to .github/workflows/build_python_3.10.yml
index efa281d..5ae37fb 100644
--- a/.github/workflows/build_python.yml
+++ b/.github/workflows/build_python_3.10.yml
@@ -17,26 +17,14 @@
# under the License.
#
-# According to https://infra.apache.org/github-actions-policy.html,
-# all workflows SHOULD have a job concurrency level less than or equal to 15.
-# To do that, we run one python version per cron schedule
-name: "Build / Python-only (master, PyPy 3.9/Python 3.10/Python 3.12)"
+name: "Build / Python-only (master, Python 3.10)"
on:
schedule:
- - cron: '0 15 * * *'
- cron: '0 17 * * *'
- - cron: '0 19 * * *'
jobs:
run-build:
- strategy:
- fail-fast: false
- matrix:
- include:
- - pyversion: ${{ github.event.schedule == '0 15 * * *' && 'pypy3' }}
- - pyversion: ${{ github.event.schedule == '0 17 * * *' && 'python3.10' }}
- - pyversion: ${{ github.event.schedule == '0 19 * * *' && 'python3.12' }}
permissions:
packages: write
name: Run
@@ -48,7 +36,7 @@
hadoop: hadoop3
envs: >-
{
- "PYTHON_TO_TEST": "${{ matrix.pyversion }}"
+ "PYTHON_TO_TEST": "python3.10"
}
jobs: >-
{
diff --git a/.github/workflows/build_python.yml b/.github/workflows/build_python_3.12.yml
similarity index 63%
rename from .github/workflows/build_python.yml
rename to .github/workflows/build_python_3.12.yml
index efa281d..e1fd45a 100644
--- a/.github/workflows/build_python.yml
+++ b/.github/workflows/build_python_3.12.yml
@@ -17,26 +17,14 @@
# under the License.
#
-# According to https://infra.apache.org/github-actions-policy.html,
-# all workflows SHOULD have a job concurrency level less than or equal to 15.
-# To do that, we run one python version per cron schedule
-name: "Build / Python-only (master, PyPy 3.9/Python 3.10/Python 3.12)"
+name: "Build / Python-only (master, Python 3.12)"
on:
schedule:
- - cron: '0 15 * * *'
- - cron: '0 17 * * *'
- cron: '0 19 * * *'
jobs:
run-build:
- strategy:
- fail-fast: false
- matrix:
- include:
- - pyversion: ${{ github.event.schedule == '0 15 * * *' && 'pypy3' }}
- - pyversion: ${{ github.event.schedule == '0 17 * * *' && 'python3.10' }}
- - pyversion: ${{ github.event.schedule == '0 19 * * *' && 'python3.12' }}
permissions:
packages: write
name: Run
@@ -48,7 +36,7 @@
hadoop: hadoop3
envs: >-
{
- "PYTHON_TO_TEST": "${{ matrix.pyversion }}"
+ "PYTHON_TO_TEST": "python3.12"
}
jobs: >-
{
diff --git a/.github/workflows/build_python.yml b/.github/workflows/build_python_pypy3.9.yml
similarity index 63%
copy from .github/workflows/build_python.yml
copy to .github/workflows/build_python_pypy3.9.yml
index efa281d..e05071e 100644
--- a/.github/workflows/build_python.yml
+++ b/.github/workflows/build_python_pypy3.9.yml
@@ -17,26 +17,14 @@
# under the License.
#
-# According to https://infra.apache.org/github-actions-policy.html,
-# all workflows SHOULD have a job concurrency level less than or equal to 15.
-# To do that, we run one python version per cron schedule
-name: "Build / Python-only (master, PyPy 3.9/Python 3.10/Python 3.12)"
+name: "Build / Python-only (master, PyPy 3.9)"
on:
schedule:
- cron: '0 15 * * *'
- - cron: '0 17 * * *'
- - cron: '0 19 * * *'
jobs:
run-build:
- strategy:
- fail-fast: false
- matrix:
- include:
- - pyversion: ${{ github.event.schedule == '0 15 * * *' && 'pypy3' }}
- - pyversion: ${{ github.event.schedule == '0 17 * * *' && 'python3.10' }}
- - pyversion: ${{ github.event.schedule == '0 19 * * *' && 'python3.12' }}
permissions:
packages: write
name: Run
@@ -48,7 +36,7 @@
hadoop: hadoop3
envs: >-
{
- "PYTHON_TO_TEST": "${{ matrix.pyversion }}"
+ "PYTHON_TO_TEST": "pypy3"
}
jobs: >-
{