Skip to content

Flink CI (extended) #104

Flink CI (extended)

Flink CI (extended) #104

# 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.
# This workflow is meant as an extended CI run that includes certain features that shall be tested
# and JDK versions that are supported but not considered default.
name: "Flink CI (extended)"
on:
schedule:
- cron: '0 2,8,14,20 * * *'
workflow_call:
inputs:
branch:
description: "The branch the extended CI run should be executed on."
type: string
required: true
supported-jdk-versions:
description: "Filter string for selecting JDK versions (e.g. '8 11 21' for enabling JDK 8, 11 and 21)."
type: string
secrets:
s3_bucket:
required: false
s3_access_key:
required: false
s3_secret_key:
required: false
workflow_dispatch:
inputs:
branch:
description: "The branch the extended workflow should run on."
default: "master"
type: string
supported-jdk-versions:
description: "Filter string for selecting JDK versions (e.g. '8 11 21' for enabling JDK 8, 11 and 21)."
type: string
permissions: read-all
jobs:
basic-qa:
name: "Pre-compile Checks"
uses: ./.github/workflows/pre-compile-checks.yml
with:
branch: ${{ inputs.branch }}
configure-jdk-workflows:
name: "Configures JDK workflows"
runs-on: "ubuntu-latest"
outputs:
configs: ${{ steps.select-jdk-configs.outputs.configs }}
steps:
- name: "Selects JDK configurations"
id: select-jdk-configs
shell: bash
run: |
# the matrix configuration has to be dynamically generated because GitHub's
# matrix strategy doesn't allow filtering of matrix entries for now
declare -A configs
configs=( \
["8"]="" \
["11"]="-Djdk11 -Pjava11-target" \
["17"]="-Djdk11 -Djdk17 -Pjava17-target" \
["21"]="-Djdk11 -Djdk17 -Djdk21 -Pjava21-target" \
)
configs_json='configs={"include":['
# no separator should be put in front of the first dictionary entry
json_sep=""
for jdk_version in "${!configs[@]}"; do
if [[ "${{ inputs.supported-jdk-versions }}" =~ .*$jdk_version.* ]] || [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "Enables JDK ${jdk_version} workflow."
configs_json=$configs_json$json_sep'{"jdk-version": '$jdk_version', "system-variables": "'${configs["$jdk_version"]}'"}'
# updating the separator if there's more than one workflow configuration added to the dictionary
json_sep=","
fi
done
configs_json=$configs_json']}'
echo "$configs_json" >> $GITHUB_OUTPUT
jdk-workflows:
needs: configure-jdk-workflows
strategy:
matrix: ${{ fromJSON(needs.configure-jdk-workflows.outputs.configs) }}
# a failure in one of the JDK workflows shouldn't affect the other workflows
fail-fast: false
name: "Java ${{ matrix.jdk-version }}"
uses: ./.github/workflows/flink-ci-template.yml
with:
workflow-caller-id: java${{ matrix.jdk-version }}
branch: ${{ inputs.branch }}
environment: 'PROFILE="-Dinclude_hadoop_aws ${{ matrix.system-variables }}"'
jdk-version: ${{ matrix.jdk-version }}
secrets:
s3_bucket: ${{ secrets.s3_bucket }}
s3_access_key: ${{ secrets.s3_access_key }}
s3_secret_key: ${{ secrets.s3_secret_key }}
hadoop313:
name: "Hadoop 3.2.3"
uses: ./.github/workflows/flink-ci-template.yml
with:
workflow-caller-id: hadoop313
branch: ${{ inputs.branch }}
environment: 'PROFILE="-Dflink.hadoop.version=3.2.3 -Phadoop3-tests,hive3"'
jdk-version: 8
secrets:
s3_bucket: ${{ secrets.s3_bucket }}
s3_access_key: ${{ secrets.s3_access_key }}
s3_secret_key: ${{ secrets.s3_secret_key }}
adaptive-scheduler:
name: "AdaptiveScheduler"
uses: ./.github/workflows/flink-ci-template.yml
with:
workflow-caller-id: adaptive-scheduler
branch: ${{ inputs.branch }}
environment: 'PROFILE="-Penable-adaptive-scheduler"'
jdk-version: 8
secrets:
s3_bucket: ${{ secrets.s3_bucket }}
s3_access_key: ${{ secrets.s3_access_key }}
s3_secret_key: ${{ secrets.s3_secret_key }}