Skip to content

Commit

Permalink
Github Workflow Replacement for Jenkins Jobs, beam_LoadTests_Python_G…
Browse files Browse the repository at this point in the history
…BK_Flink_Batch; beam_Java_LoadTests_Combine_Smoke_PR (#28897)
  • Loading branch information
magicgoody authored Oct 13, 2023
1 parent a7c6728 commit a342d28
Show file tree
Hide file tree
Showing 12 changed files with 481 additions and 2 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/beam_Java_LoadTests_Combine_Smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# 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: LoadTests Java Combine Smoke

on:
# issue_comment:
# types: [created]
# schedule:
# - cron: '1 1 * * *'
workflow_dispatch:

#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
contents: read
deployments: read
id-token: none
issues: read
discussions: read
packages: read
pages: read
repository-projects: read
security-events: read
statuses: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.body || github.event.sender.login }}'
cancel-in-progress: true

env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}

jobs:
beam_Java_LoadTests_Combine_Smoke:
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule' ||
github.event.comment.body == 'Run Java Load Tests Combine Smoke'
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 720
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
strategy:
matrix:
job_name: ["beam_Java_LoadTests_Combine_Smoke"]
job_phrase: ["Run Java Load Tests Combine Smoke"]
steps:
- uses: actions/checkout@v3
- name: Setup repository
uses: ./.github/actions/setup-action
with:
comment_phrase: ${{ matrix.job_phrase }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
- name: Prepare test arguments
uses: ./.github/actions/test-arguments-action
with:
test-type: load
test-language: java
argument-file-paths: |
${{ github.workspace }}/.github/workflows/load-tests-job-configs/java_LoadTests_Combine_Smoke_CombineLoadTest_load_test_Dataflow-1.txt
${{ github.workspace }}/.github/workflows/load-tests-job-configs/java_LoadTests_Combine_Smoke_CombineLoadTest_load_test_Dataflow-2.txt
${{ github.workspace }}/.github/workflows/load-tests-job-configs/java_LoadTests_Combine_Smoke_CombineLoadTest_load_test_Dataflow-3.txt
# The env variables are created and populated in the test-arguments-action as "<github.job>_test_arguments_<argument_file_paths_index>"
- name: run CombineLoadTest load test Dataflow-1
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:java:testing:load-tests:run
arguments: |
-PloadTest.mainClass=org.apache.beam.sdk.loadtests.CombineLoadTest \
-Prunner=:runners:google-cloud-dataflow-java \
'-PloadTest.args=${{ env.beam_Java_LoadTests_Combine_Smoke_test_arguments_1 }}' \
- name: run CombineLoadTest load test Dataflow-2
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:java:testing:load-tests:run
arguments: |
-PloadTest.mainClass=org.apache.beam.sdk.loadtests.CombineLoadTest \
-Prunner=:runners:google-cloud-dataflow-java \
'-PloadTest.args=${{ env.beam_Java_LoadTests_Combine_Smoke_test_arguments_2 }}' \
- name: run CombineLoadTest load test Dataflow-3
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:java:testing:load-tests:run
arguments: |
-PloadTest.mainClass=org.apache.beam.sdk.loadtests.CombineLoadTest \
-Prunner=:runners:google-cloud-dataflow-java \
'-PloadTest.args=${{ env.beam_Java_LoadTests_Combine_Smoke_test_arguments_3 }}'
155 changes: 155 additions & 0 deletions .github/workflows/beam_LoadTests_Python_GBK_Flink_Batch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# 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: LoadTests Python GBK Flink Batch

on:
# issue_comment:
# types: [created]
# schedule:
# - cron: '1 1 * * *'
workflow_dispatch:

#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
contents: read
deployments: read
id-token: none
issues: read
discussions: read
packages: read
pages: read
repository-projects: read
security-events: read
statuses: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.body || github.event.sender.login }}'
cancel-in-progress: true

env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
GCLOUD_ZONE: us-central1-a
CLUSTER_NAME: beam-loadtests-py-gbk-flk-batch-${{ github.run_id }}
GCS_BUCKET: gs://beam-flink-cluster
FLINK_DOWNLOAD_URL: https://archive.apache.org/dist/flink/flink-1.15.0/flink-1.15.0-bin-scala_2.12.tgz
HADOOP_DOWNLOAD_URL: https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0/flink-shaded-hadoop-2-uber-2.8.3-10.0.jar
FLINK_TASKMANAGER_SLOTS: 1
DETACHED_MODE: true
HARNESS_IMAGES_TO_PULL: gcr.io/apache-beam-testing/beam-sdk/beam_go_sdk:latest
JOB_SERVER_IMAGE: gcr.io/apache-beam-testing/beam_portability/beam_flink1.15_job_server:latest
ARTIFACTS_DIR: gs://beam-flink-cluster/beam-loadtests-py-gbk-flk-batch-${{ github.run_id }}

jobs:
beam_LoadTests_Python_GBK_Flink_Batch:
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule' ||
github.event.comment.body == 'Run Load Tests Python GBK Flink Batch'
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 720
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
strategy:
matrix:
job_name: ["beam_LoadTests_Python_GBK_Flink_Batch"]
job_phrase: ["Run Load Tests Python GBK Flink Batch"]
steps:
- uses: actions/checkout@v3
- name: Setup repository
uses: ./.github/actions/setup-action
with:
comment_phrase: ${{ matrix.job_phrase }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
python-version: 3.8
- name: Prepare test arguments
uses: ./.github/actions/test-arguments-action
with:
test-type: load
test-language: python
argument-file-paths: |
${{ github.workspace }}/.github/workflows/load-tests-job-configs/python_GBK_Flink_Batch_2GB_of_10B_records.txt
${{ github.workspace }}/.github/workflows/load-tests-job-configs/python_GBK_Flink_Batch_2GB_of_100B_records.txt
${{ github.workspace }}/.github/workflows/load-tests-job-configs/python_GBK_Flink_Batch_fanout_4_times_with_2GB_10-byte_records_total.txt
${{ github.workspace }}/.github/workflows/load-tests-job-configs/python_GBK_Flink_Batch_fanout_8_times_with_2GB_10-byte_records_total.txt
${{ github.workspace }}/.github/workflows/load-tests-job-configs/python_GBK_Flink_Batch_reiterate_4_times_10kB_values.txt
- name: get current time
run: echo "NOW_UTC=$(date '+%m%d%H%M%S' --utc)" >> $GITHUB_ENV
- name: Start Flink with parallelism 5
env:
FLINK_NUM_WORKERS: 5
run: |
cd ${{ github.workspace }}/.test-infra/dataproc; ./flink_cluster.sh create
# The env variables are created and populated in the test-arguments-action as "<github.job>_test_arguments_<argument_file_paths_index>"
- name: run Flink Batch 2GB of 10B records test
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:python:apache_beam:testing:load_tests:run --info
arguments: |
-PloadTest.mainClass=apache_beam.testing.load_tests.group_by_key_test \
-Prunner=PortableRunner \
'-PloadTest.args=${{ env.beam_LoadTests_Python_GBK_Flink_Batch_test_arguments_1 }} --job_name=load-tests-python-flink-batch-gbk-1-${{env.NOW_UTC}}' \
- name: run Flink Batch 2GB of 100B records test
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:python:apache_beam:testing:load_tests:run
arguments: |
-PloadTest.mainClass=apache_beam.testing.load_tests.group_by_key_test \
-Prunner=PortableRunner \
'-PloadTest.args=${{ env.beam_LoadTests_Python_GBK_Flink_Batch_test_arguments_2 }} --job_name=load-tests-python-flink-batch-gbk-2-${{env.NOW_UTC}}' \
- name: run reiterate 4 times 10kB values test
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:python:apache_beam:testing:load_tests:run
arguments: |
-PloadTest.mainClass=apache_beam.testing.load_tests.group_by_key_test \
-Prunner=PortableRunner \
'-PloadTest.args=${{ env.beam_LoadTests_Python_GBK_Flink_Batch_test_arguments_5 }} --job_name=load-tests-python-flink-batch-gbk-6-${{env.NOW_UTC}}' \
- name: Restart Flink with parallelism 16
env:
FLINK_NUM_WORKERS: 16
run: |
cd ${{ github.workspace }}/.test-infra/dataproc; ./flink_cluster.sh restart
- name: run fanout 4 times with 2GB 10-byte records total test
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:python:apache_beam:testing:load_tests:run
arguments: |
-PloadTest.mainClass=apache_beam.testing.load_tests.group_by_key_test \
-Prunner=PortableRunner \
'-PloadTest.args=${{ env.beam_LoadTests_Python_GBK_Flink_Batch_test_arguments_3 }} --job_name=load-tests-python-flink-batch-gbk-4-${{env.NOW_UTC}}' \
- name: run fanout 8 times with 2GB 10-byte records total test
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:python:apache_beam:testing:load_tests:run
arguments: |
-PloadTest.mainClass=apache_beam.testing.load_tests.group_by_key_test \
-Prunner=PortableRunner \
'-PloadTest.args=${{ env.beam_LoadTests_Python_GBK_Flink_Batch_test_arguments_4 }} --job_name=load-tests-python-flink-batch-gbk-5-${{env.NOW_UTC}}' \
- name: Teardown Flink
if: always()
run: |
${{ github.workspace }}/.test-infra/dataproc/flink_cluster.sh delete
# TODO(https://github.com/apache/beam/issues/20146) Re-enable auto builds after these tests pass.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule' ||
github.event.comment.body == 'Run Java CompressedTextIO Performance Test'
github.event.comment.body == 'Run Python xlang KafkaIO Performance Test'
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 240
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
strategy:
matrix:
job_name: ["beam_PerformanceTests_xlang_KafkaIO_Python"]
job_phrase: ["Run Java CompressedTextIO Performance Test"]
job_phrase: ["Run Python xlang KafkaIO Performance Test"]
steps:
- uses: actions/checkout@v3
- name: Setup repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
python-version: '3.8'
- name: run XVR GoUsingJava Dataflow script
env:
USER: github-actions
CLOUDSDK_CONFIG: ${{ env.KUBELET_GCLOUD_CONFIG_PATH}}
uses: ./.github/actions/gradle-command-self-hosted-action
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.

--region=us-central1
--appName=smoke-dsl-java
--tempLocation=gs://temp-storage-for-perf-tests/smoketests
--sourceOptions={"numRecords":100000,"splitPointFrequencyRecords":1}
--stepOptions={"outputRecordsPerInputRecord":1,"preservesInputKeyDistribution":true}
--fanout=10
--iterations=1
--numWorkers=5
--autoscalingAlgorithm=NONE
--runner=DataflowRunner
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.

--region=us-central1
--appName=smoke-dsl-java
--tempLocation=gs://temp-storage-for-perf-tests/smoketests
--sourceOptions={"numRecords":100000,"keySizeBytes":1,"valueSizeBytes":1}
--fanout=1
--iterations=1
--numWorkers=3
--autoscalingAlgorithm=NONE
--streaming=false
--runner=DataflowRunner
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.

--region=us-central1
--appName=smoke-dsl-java
--tempLocation=gs://temp-storage-for-perf-tests/smoketests
--sourceOptions={"numRecords":20000,"keySizeBytes":1,"valueSizeBytes":1}
--fanout=10
--iterations=1
--numWorkers=5
--autoscalingAlgorithm=NONE
--streaming=false
--runner=DataflowRunner
Loading

0 comments on commit a342d28

Please sign in to comment.