Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/branch35_scheduler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: "Branch-3.5 CI Scheduler"

on:
schedule:
- cron: '0 11 */4 * *'
workflow_dispatch:
inputs:
target:
description: Target workflow to run
required: true
type: choice
default: all
options:
- all
- scala213
- python_3.9

jobs:
schedule:
if: github.repository == 'apache/spark'
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
actions: write
steps:
- name: Scala 2.13 Build
if: >-
github.event.schedule == '0 11 */4 * *' ||
(github.event_name == 'workflow_dispatch' &&
(inputs.target == 'scala213' || inputs.target == 'all'))
run: |
gh workflow run build_scala213.yml --repo ${{ github.repository }} --ref branch-3.5
- name: Python 3.9 Build
if: >-
github.event.schedule == '0 11 */4 * *' ||
(github.event_name == 'workflow_dispatch' &&
(inputs.target == 'python_3.9' || inputs.target == 'all'))
run: |
gh workflow run build_python_3.9.yml --repo ${{ github.repository }} --ref branch-3.5
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,21 @@
# under the License.
#

name: "Build / Python-only (branch-3.5)"
# This is a placeholder. Python 3.9 is not built on master, which targets newer
# Python versions. The file exists here only so that the README build status
# badge, which resolves a workflow by its path on the default branch, renders
# for the branches that still run it (e.g. branch-3.5). The actual build is
# defined in the same file on those branches.

name: "Build / Python-only (Python 3.9)"

on:
schedule:
- cron: '0 11 */4 * *'
workflow_dispatch:

jobs:
run-build:
permissions:
packages: write
name: Run
uses: ./.github/workflows/build_and_test.yml
noop:
if: github.repository == 'apache/spark'
with:
java: 8
branch: branch-3.5
hadoop: hadoop3
envs: >-
{
"PYSPARK_IMAGE_TO_TEST": "",
"PYTHON_TO_TEST": ""
}
jobs: >-
{
"pyspark": "true",
"pyspark-pandas": "true"
}
runs-on: ubuntu-latest
steps:
- name: No-op
run: echo "Python 3.9 is not built on this branch. See branches that still support it (e.g. branch-3.5)."
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,22 @@
# under the License.
#

name: "Build (branch-3.5, Scala 2.13, JDK 8)"
# This is a placeholder. Scala 2.13 is the default on master, so there is no

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice trick, and the comment here explains it well. One gap: the PR description says it "removes the per-build build_branch35*.yml files from master," but they're actually renamed to these no-op placeholders and deliberately kept — because a README badge resolves its workflow by path on the default branch, so the file must exist on master for the ?branch=branch-3.5 badge to render.

Worth stating that in the PR description too: a maintainer who reads "removed" might later delete these no-op files as dead code and silently break the branch-3.5 badges. (Verified build_scala213.yml / build_python_3.9.yml / build_main.yml all exist on branch-3.5, so the scheduler triggers and badges resolve correctly.)

# separate scheduled Scala 2.13 build here. The file exists only so that the
# README build status badge, which resolves a workflow by its path on the
# default branch, renders for the branches that still run it as a separate
# build (e.g. branch-3.5). The actual build is defined in the same file on
# those branches.

name: "Build / Java8 (Scala 2.13, JDK 8)"

on:
schedule:
- cron: '0 11 */4 * *'
workflow_dispatch:

jobs:
run-build:
permissions:
packages: write
name: Run
uses: ./.github/workflows/build_and_test.yml
noop:
if: github.repository == 'apache/spark'
with:
java: 8
branch: branch-3.5
hadoop: hadoop3
envs: >-
{
"SCALA_PROFILE": "scala2.13",
"PYSPARK_IMAGE_TO_TEST": "",
"PYTHON_TO_TEST": "",
"ORACLE_DOCKER_IMAGE_NAME": "gvenzl/oracle-xe:21.3.0"
}
jobs: >-
{
"build": "true",
"sparkr": "true",
"tpcds-1g": "true",
"docker-integration-tests": "true",
"k8s-integration-tests": "true",
"lint" : "true"
}
runs-on: ubuntu-latest
steps:
- name: No-op
run: echo "Scala 2.13 is the default on master and is not built separately. See branches that run it as a separate build (e.g. branch-3.5)."
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ This README file only contains basic setup instructions.
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_maven_java21.yml/badge.svg?branch=branch-4.0)](https://github.com/apache/spark/actions/workflows/build_maven_java21.yml?query=branch%3Abranch-4.0) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_python_3.11.yml/badge.svg?branch=branch-4.0)](https://github.com/apache/spark/actions/workflows/build_python_3.11.yml?query=branch%3Abranch-4.0) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_python_pypy3.10.yml/badge.svg?branch=branch-4.0)](https://github.com/apache/spark/actions/workflows/build_python_pypy3.10.yml?query=branch%3Abranch-4.0) |
| branch-3.5 | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_branch35.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_branch35.yml) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_branch35_python.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_branch35_python.yml) |
| branch-3.5 | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_main.yml/badge.svg?branch=branch-3.5)](https://github.com/apache/spark/actions/workflows/build_main.yml?query=branch%3Abranch-3.5) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_scala213.yml/badge.svg?branch=branch-3.5)](https://github.com/apache/spark/actions/workflows/build_scala213.yml?query=branch%3Abranch-3.5) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_python_3.9.yml/badge.svg?branch=branch-3.5)](https://github.com/apache/spark/actions/workflows/build_python_3.9.yml?query=branch%3Abranch-3.5) |


## Building Spark
Expand Down