-
Notifications
You must be signed in to change notification settings - Fork 4.5k
GA Migration Python PreCommit Sharding #23451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2bed71b
Migrated github action
roger-mike 39e0bc4
Alphabetically ordered paths
roger-mike 067763e
Merge branch 'master' into sharding-precommit-python
roger-mike 48c4386
Splitted test into jobs
roger-mike 5a3c7c5
Splitted into a workflow per module
roger-mike File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # 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: PreCommit Python Apache Beam | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 */6 * * *' | ||
| push: | ||
| branches: ['master', 'release-*'] | ||
| tags: 'v*' | ||
| pull_request_target: | ||
| branches: [ 'master', 'release-*'] | ||
| tags: 'v*' | ||
| paths: | ||
| - 'sdks/python/apache_beam/**' | ||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| set-properties: | ||
| runs-on: [self-hosted, ubuntu-20.04] | ||
| outputs: | ||
| properties: ${{ steps.test-properties.outputs.properties }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - id: test-properties | ||
| uses: ./.github/actions/setup-default-test-properties | ||
|
|
||
| apache-beam: | ||
| needs: set-properties | ||
| name: Run Apache Beam Tests | ||
| runs-on: [self-hosted, ubuntu-20.04] | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.ALL_SUPPORTED_VERSIONS}} | ||
| tox-env: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.TOX_ENV}} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - 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 apache_beam/pipeline_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/pipeline_test.py" | ||
| - name: run apache_beam/pvalue_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/pvalue_test.py" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # 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: PreCommit Python Coders | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 */6 * * *' | ||
| push: | ||
| branches: ['master', 'release-*'] | ||
| tags: 'v*' | ||
| pull_request_target: | ||
| branches: [ 'master', 'release-*'] | ||
| tags: 'v*' | ||
| paths: | ||
| - 'sdks/python/apache_beam/coders/**' | ||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| set-properties: | ||
| runs-on: [self-hosted, ubuntu-20.04] | ||
| outputs: | ||
| properties: ${{ steps.test-properties.outputs.properties }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - id: test-properties | ||
| uses: ./.github/actions/setup-default-test-properties | ||
|
|
||
| coders: | ||
| needs: set-properties | ||
| name: Run Coders Tests | ||
| runs-on: [ self-hosted, ubuntu-20.04 ] | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.ALL_SUPPORTED_VERSIONS}} | ||
| tox-env: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.TOX_ENV}} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - 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 apache_beam/coders | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/coders/" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # 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: PreCommit Python Internal | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 */6 * * *' | ||
| push: | ||
| branches: ['master', 'release-*'] | ||
| tags: 'v*' | ||
| pull_request_target: | ||
| branches: [ 'master', 'release-*'] | ||
| tags: 'v*' | ||
| paths: | ||
| - 'sdks/python/apache_beam/internal/**' | ||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| set-properties: | ||
| runs-on: [self-hosted, ubuntu-20.04] | ||
| outputs: | ||
| properties: ${{ steps.test-properties.outputs.properties }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - id: test-properties | ||
| uses: ./.github/actions/setup-default-test-properties | ||
|
|
||
| internal: | ||
| needs: set-properties | ||
| name: Run Internal Tests | ||
| runs-on: [self-hosted, ubuntu-20.04] | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.ALL_SUPPORTED_VERSIONS}} | ||
| tox-env: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.TOX_ENV}} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - 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 apache_beam/internal | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/internal/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| # 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: PreCommit Python IO | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 */6 * * *' | ||
| push: | ||
| branches: ['master', 'release-*'] | ||
| tags: 'v*' | ||
| pull_request_target: | ||
| branches: [ 'master', 'release-*'] | ||
| tags: 'v*' | ||
| paths: | ||
| - 'sdks/python/apache_beam/io/concat_source_test.py' | ||
| - 'sdks/python/apache_beam/io/external/generate_sequence_test.py' | ||
| - 'sdks/python/apache_beam/io/hadoopfilesystem_test.py' | ||
| - 'sdks/python/apache_beam/io/iobase_test.py' | ||
| - 'sdks/python/apache_beam/io/range_trackers_test.py' | ||
| - 'sdks/python/apache_beam/io/restriction_trackers_test.py' | ||
| - 'sdks/python/apache_beam/io/source_test_utils_test.py' | ||
| - 'sdks/python/apache_beam/io/sources_test.py' | ||
| - 'sdks/python/apache_beam/io/utils_test.py' | ||
| - 'sdks/python/apache_beam/io/watermark_estimators_test.py' | ||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| set-properties: | ||
| runs-on: [self-hosted, ubuntu-20.04] | ||
| outputs: | ||
| properties: ${{ steps.test-properties.outputs.properties }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - id: test-properties | ||
| uses: ./.github/actions/setup-default-test-properties | ||
|
|
||
| io: | ||
| needs: set-properties | ||
| name: Run IO Tests | ||
| runs-on: [self-hosted, ubuntu-20.04] | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.ALL_SUPPORTED_VERSIONS}} | ||
| tox-env: ${{fromJson(needs.set-properties.outputs.properties).PythonTestProperties.TOX_ENV}} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - 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 apache_beam/io/contact_source_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/concat_source_test.py" | ||
| - name: run apache_beam/io/external/generate_sequence_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/external/generate_sequence_test.py" | ||
| - name: run apache_beam/io/hadoopfilesystem_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/hadoopfilesystem_test.py" | ||
| - name: run apache_beam/io/iobase_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/iobase_test.py" | ||
| - name: run apache_beam/io/range_trackers_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/range_trackers_test.py" | ||
| - name: run apache_beam/io/restriction_trackers_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/restriction_trackers_test.py" | ||
| - name: run apache_beam/io/source_test_utils_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/source_test_utils_test.py" | ||
| - name: run apache_beam/io/sources_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/sources_test.py" | ||
| - name: run apache_beam/io/utils_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/utils_test.py" | ||
| - name: run apache_beam/io/watermark_estimators_test.py | ||
| uses: ./.github/actions/gradle-command-self-hosted-action | ||
| with: | ||
| gradle-command: :sdks:python:test-suites:tox:py${{env.PYTHON_VERSION}}:testPy${{env.PYTHON_VERSION}}${{matrix.tox-env}} | ||
| arguments: "-Pposargs=apache_beam/io/watermark_estimators_test.py" | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, lets run all of these workflows on
sdks/python/apache_beam. Some folders have dependencies on other folders and we want to make sure we catch issues with tests