Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4f94a1b
precommit rat, spotless and whitespace
fernando-wizeline Aug 23, 2022
83e0698
removing files
fernando-wizeline Aug 23, 2022
7d8cef8
Update job-precommit-rat.yml
fernando-wizeline Sep 8, 2022
326e1af
Update job-precommit-spotless.yml
fernando-wizeline Sep 8, 2022
af6fdc1
Update job-precommit-whitespace.yml
fernando-wizeline Sep 8, 2022
9b648d5
Base actions to use for precommit and postcommit workflows
benEng Sep 8, 2022
774f5f8
Adding Java, Flink, Spark and Golang supported versions to json file
fernando-wizeline Sep 8, 2022
dff0b37
updating CI.md and yaml files
fernando-wizeline Sep 8, 2022
d8689ee
switching to temurin due to Apache License compatibility
fernando-wizeline Sep 9, 2022
e1240a9
adding postcommit java dataflow v1 and v2
fernando-wizeline Sep 12, 2022
5f407a4
Update job-postcommit-java-dataflow-v1.yml
fernando-wizeline Sep 13, 2022
2d74377
excluding github and website dirs
fernando-wizeline Sep 13, 2022
d82c234
setting go version to 1.18
fernando-wizeline Sep 13, 2022
ac16a97
Merge pull request #124 from benWize/base-action-ga-self-hosted
fernando-wizeline Sep 14, 2022
a230d0a
Merge pull request #125 from fernando-wizeline/gam-postcommit-java-da…
fernando-wizeline Sep 14, 2022
ab7c627
Update DockerEnvironmentFactory.java
fernando-wizeline Sep 14, 2022
3a229f0
Update job-postcommit-java-dataflow-v1.yml
fernando-wizeline Sep 14, 2022
e865081
Merge branch 'master' into gam-precommit-rat-spotless-whitespace
fernando-wizeline Sep 14, 2022
18c1d8e
Merge pull request #129 from fernando-wizeline/gam-precommit-rat-spot…
fernando-wizeline Sep 14, 2022
53384e0
Add environment as optionals in setup-base-action
benEng Sep 14, 2022
25d7d0e
Merge pull request #130 from benWize/base-action-ga-self-hosted
fernando-wizeline Sep 14, 2022
9377bc6
Update DockerEnvironmentFactory.java
fernando-wizeline Sep 15, 2022
b3c38ab
Update job-precommit-spotless.yml
fernando-wizeline Sep 15, 2022
c2365d4
Update DockerEnvironmentFactory.java
fernando-wizeline Sep 15, 2022
9a82d13
python postcommit examples
fernando-wizeline Sep 19, 2022
c1bb678
Update CI.md
fernando-wizeline Sep 19, 2022
670e3a2
Merge branch 'master' into gam-postcommit-python-cron-sharding-examples
fernando-wizeline Sep 19, 2022
3c03a69
Update job-postcommit-python-examples.yml
fernando-wizeline Sep 19, 2022
6d37fd8
Merge branch 'gam-postcommit-python-cron-sharding-examples' of https:…
fernando-wizeline Sep 19, 2022
ec204b6
reverting changes from other merge
fernando-wizeline Sep 19, 2022
d8a35c9
tweaking
fernando-wizeline Sep 19, 2022
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
70 changes: 70 additions & 0 deletions .github/workflows/job-postcommit-python-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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 will run the tests for python Examples with DataflowRunner.

name: PostCommit Python Examples

on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
push:
branches: ['master', 'release-*']
tags: ['v*']

permissions: read-all

jobs:
set-properties:
runs-on: self-hosted
outputs:
properties: ${{ steps.test-properties.outputs.properties }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive
- id: test-properties
uses: ./.github/actions/setup-default-test-properties

python_examples:
needs: set-properties
name: Python Examples
runs-on: self-hosted
strategy:
fail-fast: true
matrix:
version: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.ALL_SUPPORTED_VERSIONS}}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive
- name: Set python version
run: echo "PYTHON_VERSION=$(echo ${{ matrix.version }} | sed -e 's/\.//g')" >> $GITHUB_ENV
- name: Setup environment
uses: ./.github/actions/setup-self-hosted-action
with:
requires-go-18: false
- name: Run :sdks:python:test-suites:dataflow:py${{env.PYTHON_VERSION}}:postCommitITByTestDirectory
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:python:test-suites:dataflow:py${{env.PYTHON_VERSION}}:postCommitITByTestDirectory
arguments: "-PtestDir=apache_beam/examples"
2 changes: 1 addition & 1 deletion .test-infra/jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,4 @@ Beam Jenkins overview page: [link](https://ci-beam.apache.org/)
retest this please
```

* Last update (mm/dd/yyyy): 04/04/2022
* Last update (mm/dd/yyyy): 04/04/2022
8 changes: 8 additions & 0 deletions CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ Service Account shall have following permissions ([IAM roles](https://cloud.goog
| Java Wordcount Direct Runner | Runs Java WordCount example with Direct Runner. | Yes | Yes | Yes | - |
| Java Wordcount Dataflow | Runs Java WordCount example with DataFlow Runner. | - | Yes | Yes | Yes |

### PostCommit Workflows

#### Python PostCommit Examples DataFlow - [job-postcommit-python-examples.yml](.github/workflows/job-postcommit-python-examples.yml)

| Job | Description | Pull Request Run | Direct Push/Merge Run | Scheduled Run | Requires GCP Credentials |
|--------------------------------------------|--------------------------------------------|------------------|-----------------------|---------------|--------------------------|
| Run Python PostCommit Examples on DataFlow | Run Python PostCommit Examples on DataFlow | No | Yes | Yes | No |

### GitHub Action Tips

* If you introduce changes to the workflow it is possible that your changes will not be present in the check run triggered in Pull Request.
Expand Down
25 changes: 25 additions & 0 deletions sdks/python/test-suites/dataflow/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,31 @@ task preCommitIT_V2{
dependsOn preCommitIT_streaming_V2
}

task postCommitITByTestDirectory {
def testDir = project.hasProperty('testDir') ? project.testDir : ''
dependsOn 'installGcpTest'
dependsOn ':sdks:python:sdist'
dependsOn ':runners:google-cloud-dataflow-java:worker:shadowJar'

def dataflowWorkerJar = project(":runners:google-cloud-dataflow-java:worker").shadowJar.archivePath

doLast {
def testOpts = basicPytestOpts + ["--numprocesses=8", "--dist=loadfile"]
def argMap = [
"test_opts": testOpts + [testDir],
"sdk_location": files(configurations.distTarBall.files).singleFile,
"worker_jar": dataflowWorkerJar,
"suite": "postCommitIT-df${pythonVersionSuffix}",
"collect": "it_postcommit"
]
def cmdArgs = mapToArgString(argMap)
exec {
executable 'sh'
args '-c', ". ${envdir}/bin/activate && ${runScriptsDir}/run_integration_test.sh $cmdArgs"
}
}
}

task postCommitIT {
dependsOn 'installGcpTest'
dependsOn ':sdks:python:sdist'
Expand Down