Skip to content

Commit

Permalink
Merge pull request #10 from linkedin/oss-merge
Browse files Browse the repository at this point in the history
Merge from Master to li_trunk
  • Loading branch information
kw2542 authored Sep 16, 2021
2 parents c88d685 + ec8b560 commit 781c311
Show file tree
Hide file tree
Showing 4,274 changed files with 188,394 additions and 66,166 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ Dockerfile text
.gitignore export-ignore
.gitattributes export-ignore
/gradlew* export-ignore
/gradle export-ignore
**/gradle export-ignore

# Website is not part of archive
/website export-ignore
18 changes: 15 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon">
</a>
</td>
<td>---</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Samza/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Samza/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon">
Expand Down Expand Up @@ -132,7 +136,11 @@ See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/badge/icon">
</a>
</td>
<td>---</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Samza/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Samza/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/badge/icon">
Expand All @@ -157,7 +165,11 @@ See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/badge/icon">
</a>
</td>
<td>---</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Samza/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Samza/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Spark/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Spark/lastCompletedBuild/badge/icon">
Expand Down
1 change: 1 addition & 0 deletions .github/actions/cancel-workflow-runs
Submodule cancel-workflow-runs added at 953e05
1 change: 1 addition & 0 deletions .github/actions/github-push-action
Submodule github-push-action added at 057a6b
1 change: 1 addition & 0 deletions .github/actions/gradle-command-action
Submodule gradle-command-action added at 90ccf0
2 changes: 1 addition & 1 deletion .github/autolabeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Please keep the entries sorted lexicographically in each category.

# General
build: ["assembly.xml", "build.gradle", "buildSrc/*", ".gitattributes", ".github/*", ".gitignore", "gradle/*", ".mailmap", "ownership/*", "release/*", "sdks/java/build-tools/*", "settings.gradle"]
build: ["assembly.xml", "build.gradle.kts", "buildSrc/*", ".gitattributes", ".github/*", ".gitignore", "gradle/*", ".mailmap", "ownership/*", "release/*", "sdks/java/build-tools/*", "settings.gradle.kts"]
docker: ["runners/flink/job-server-container/*", "runners/spark/job-server/container/*", "sdks/go/container/*", "sdks/java/container/*", "sdks/python/container/*"]
examples: ["examples/*", "sdks/go/examples/*", "sdks/python/apache_beam/examples/*"]
go: ["sdks/go/*"]
Expand Down
115 changes: 110 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
branches: ['master', 'release-*']
tags: 'v*'
paths: ['sdks/python/**', 'model/**', 'release/**']

workflow_dispatch:

env:
GCP_PATH: "gs://${{ secrets.GCP_PYTHON_WHEELS_BUCKET }}/${GITHUB_REF##*/}/${GITHUB_SHA}-${GITHUB_RUN_ID}/"
Expand Down Expand Up @@ -59,6 +59,9 @@ jobs:
build_source:
runs-on: ubuntu-latest
name: Build python source distribution
outputs:
is_rc: ${{ steps.is_rc.outputs.is_rc }}
rc_num: ${{ steps.get_rc_version.outputs.RC_NUM }}
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -71,6 +74,24 @@ jobs:
run: python -m pip install -r build-requirements.txt
- name: Install wheels
run: python -m pip install wheel
- name: Get tag
id: get_tag
run: |
echo ::set-output name=TAG::${GITHUB_REF#refs/*/}
- name: Check whether an -RC tag was applied to the commit.
id: is_rc
run: |
echo ${{ steps.get_tag.outputs.TAG }} > temp
OUTPUT=$( if grep -e '-RC.' -q temp; then echo 1; else echo 0; fi)
echo "::set-output name=is_rc::$OUTPUT"
- name: Get RELEASE_VERSION and RC_NUM
if: steps.is_rc.outputs.is_rc == 1
id: get_rc_version
run: |
RC_NUM=$(sed -n "s/^.*-RC\([0-9]*\)/\1/p" temp)
RELEASE_VERSION=$(sed -n "s/^v\(.*\)-RC[0-9]/\1/p" temp)
echo "::set-output name=RC_NUM::$RC_NUM"
echo "::set-output name=RELEASE_VERSION::$RELEASE_VERSION"
- name: Build source
working-directory: ./sdks/python
run: python setup.py sdist --formats=zip
Expand All @@ -95,6 +116,50 @@ jobs:
with:
name: source_zip
path: sdks/python/dist
- name: Clear dist
if: steps.is_rc.outputs.is_rc == 1
working-directory: ./sdks/python
run: |
rm -r ./dist
rm -rd apache-beam-source
- name: Rewrite SDK version to include RC number
if: steps.is_rc.outputs.is_rc == 1
working-directory: ./sdks/python
run: |
RELEASE_VERSION=${{ steps.get_rc_version.outputs.RELEASE_VERSION }}
RC_NUM=${{ steps.get_rc_version.outputs.RC_NUM }}
sed -i -e "s/${RELEASE_VERSION}/${RELEASE_VERSION}rc${RC_NUM}/g" apache_beam/version.py
- name: Build RC source
if: steps.is_rc.outputs.is_rc == 1
working-directory: ./sdks/python
run: python setup.py sdist --formats=zip
- name: Add RC checksums
if: steps.is_rc.outputs.is_rc == 1
working-directory: ./sdks/python/dist
run: |
file=$(ls | grep .zip | head -n 1)
sha512sum $file > ${file}.sha512
- name: Unzip RC source
if: steps.is_rc.outputs.is_rc == 1
working-directory: ./sdks/python
run: unzip dist/$(ls dist | grep .zip | head -n 1)
- name: Rename RC source directory
if: steps.is_rc.outputs.is_rc == 1
working-directory: ./sdks/python
run: mv $(ls | grep apache-beam) apache-beam-source-rc
- name: Upload RC source as artifact
if: steps.is_rc.outputs.is_rc == 1
uses: actions/upload-artifact@v2
with:
name: source_rc${{ steps.get_rc_version.outputs.RC_NUM }}
path: sdks/python/apache-beam-source-rc
- name: Upload compressed RC sources as artifacts
if: steps.is_rc.outputs.is_rc == 1
uses: actions/upload-artifact@v2
with:
name: source_zip_rc${{ steps.get_rc_version.outputs.RC_NUM }}
path: sdks/python/dist


prepare_gcs:
name: Prepare GCS
Expand Down Expand Up @@ -134,8 +199,10 @@ jobs:
run: gsutil cp -r -a public-read source/* ${{ env.GCP_PATH }}

build_wheels:
name: Build python wheels on ${{ matrix.os_python.os }}
name: Build python wheels on ${{matrix.arch}} for ${{ matrix.os_python.os }}
needs: build_source
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
runs-on: ${{ matrix.os_python.os }}
strategy:
matrix:
Expand All @@ -144,18 +211,31 @@ jobs:
{"os": "macos-latest", "python": "cp36-* cp37-* cp38-*"},
{"os": "windows-latest", "python": "cp36-* cp37-* cp38-*"},
]
arch: [auto]
include:
- os_python: {"os": "ubuntu-latest", "python": "cp36-* cp37-* cp38-*"}
arch: aarch64
steps:
- name: Download python source distribution from artifacts
uses: actions/download-artifact@v2
with:
name: source
path: apache-beam-source
- name: Download Python SDK RC source distribution from artifacts
if: ${{ needs.build_source.outputs.is_rc == 1 }}
uses: actions/download-artifact@v2
with:
name: source_rc${{ needs.build_source.outputs.rc_num }}
path: apache-beam-source-rc
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- uses: docker/setup-qemu-action@v1
if: ${{matrix.arch == 'aarch64'}}
name: Set up QEMU
- name: Install cibuildwheel
run: pip install cibuildwheel==1.4.2
run: pip install cibuildwheel==1.11.0
- name: Build wheel
working-directory: apache-beam-source
env:
Expand All @@ -178,6 +258,28 @@ jobs:
with:
name: wheelhouse-${{ matrix.os_python.os }}
path: apache-beam-source/wheelhouse/
- name: Build RC wheels
if: ${{ needs.build_source.outputs.is_rc == 1 }}
working-directory: apache-beam-source-rc
env:
CIBW_BUILD: ${{ matrix.os_python.python }}
CIBW_BEFORE_BUILD: pip install cython
run: cibuildwheel --print-build-identifiers && cibuildwheel --output-dir wheelhouse
shell: bash
- name: Add RC checksums
if: ${{ needs.build_source.outputs.is_rc == 1 }}
working-directory: apache-beam-source-rc/wheelhouse/
run: |
for file in *.whl; do
sha512sum $file > ${file}.sha512
done
shell: bash
- name: Upload RC wheels as artifacts
if: ${{ needs.build_source.outputs.is_rc == 1 }}
uses: actions/upload-artifact@v2
with:
name: wheelhouse-rc${{ needs.build_source.outputs.rc_num }}-${{ matrix.os_python.os }}
path: apache-beam-source-rc/wheelhouse/

upload_wheels_to_gcs:
name: Upload wheels to GCS bucket
Expand Down Expand Up @@ -249,14 +351,17 @@ jobs:
if: github.repository_owner == 'apache' && github.event_name == 'schedule'
steps:
- name: Checkout code on master branch
uses: actions/checkout@master
uses: actions/checkout@v2
with:
persist-credentials: false
submodules: recursive
- name: Tag commit
run: |
BRANCH_NAME=${GITHUB_REF##*/}
echo "Tagging ${BRANCH_NAME}"
git tag -f nightly-${BRANCH_NAME} HEAD
- name: Push tags
uses: ad-m/github-push-action@master
uses: ./.github/actions/github-push-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ jobs:
name: "Cancel duplicate workflow runs"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@e9e87cb7738dbb999654aa90d69359d62c9e4eae #v3
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
with:
persist-credentials: false
submodules: recursive
- uses: ./.github/actions/cancel-workflow-runs
name: "Cancel duplicate workflow runs"
with:
cancelMode: duplicates
Expand Down
31 changes: 25 additions & 6 deletions .github/workflows/java_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ on:
pull_request:
branches: ['master', 'release-*']
tags: 'v*'
paths: ['sdks/java/**', 'model/**', 'runners/**', 'examples/java/**', 'examples/kotlin/**', 'release/**']
paths: ['sdks/java/**', 'model/**', 'runners/**', 'examples/java/**',
'examples/kotlin/**', 'release/**', 'buildSrc/**']


jobs:
Expand Down Expand Up @@ -67,9 +68,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
submodules: recursive
# :sdks:java:core:test
- name: Run :sdks:java:core:test
uses: eskatos/gradle-command-action@v1
uses: ./.github/actions/gradle-command-action
with:
arguments: :sdks:java:core:test
- name: Upload test logs for :sdks:java:core:test
Expand All @@ -80,7 +84,7 @@ jobs:
path: sdks/java/core/build/reports/tests/test
# :sdks:java:harness:test
- name: Run :sdks:java:harness:test
uses: eskatos/gradle-command-action@v1
uses: ./.github/actions/gradle-command-action
with:
arguments: :sdks:java:harness:test
if: always()
Expand All @@ -92,7 +96,7 @@ jobs:
path: sdks/java/harness/build/reports/tests/test
# :runners:core-java:test
- name: Run :runners:core-java:test
uses: eskatos/gradle-command-action@v1
uses: ./.github/actions/gradle-command-action
with:
arguments: :runners:core-java:test
if: always()
Expand All @@ -113,8 +117,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
submodules: recursive
- name: Run WordCount Unix
uses: eskatos/gradle-command-action@v1
uses: ./.github/actions/gradle-command-action
with:
arguments: -p examples/ integrationTest --tests org.apache.beam.examples.WordCountIT
-DintegrationTestRunner=direct
Expand Down Expand Up @@ -143,15 +150,27 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
submodules: recursive
- name: Authenticate on GCP
uses: google-github-actions/setup-gcloud@master
with:
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
export_default_credentials: true
- name: Set Java Version
uses: actions/setup-java@v1
with:
java-version: 8
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# gradle-command-action plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml
- name: Run WordCount
uses: eskatos/gradle-command-action@v1
uses: ./.github/actions/gradle-command-action
with:
arguments: -p examples/ integrationTest --tests org.apache.beam.examples.WordCountIT
-DintegrationTestPipelineOptions=["--runner=DataflowRunner","--project=${{ secrets.GCP_PROJECT_ID }}","--tempRoot=gs://${{ secrets.GCP_TESTING_BUCKET }}/tmp/"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/li_runners_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
run: ./gradlew :runners:samza:build :runners:samza:validatesRunner

- name: Validate Spark runner
run: ./gradlew :runners:spark:build :runners:spark:validatesRunner
run: ./gradlew :runners:spark:2:build :runners:spark:2:validatesRunner
Loading

0 comments on commit 781c311

Please sign in to comment.