Skip to content

Commit

Permalink
fixes rerun call in matrix jobs (apache#27392)
Browse files Browse the repository at this point in the history
  • Loading branch information
volatilemolotov authored Jul 7, 2023
1 parent dbf9ecc commit cbfeb2e
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 43 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
specific language governing permissions and limitations
under the License.
-->
| Workflow name | Trigger Phrase | Cron Status |
|:-------------:|:--------------:|:-----------:|
| [ Go Precommit ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml) | `Run Go PreCommit`| [![Go Precommit](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml) |
| [ Python PreCommit Docker ](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_DockerBuild.yml) | `Run PythonDocker PreCommit`| [![.github/workflows/job_Precommit_Python_DockerBuild.yml](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_DockerBuild.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_DockerBuild.yml) |
| [ Python Precommit Formatter ](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml) | `Run PythonFormatter PreCommit`| [![.github/workflows/job_PreCommit_PythonAutoformatter.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml) |
| [ Python PreCommit Coverage ](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_Coverage.yml) | `Run Python_Coverage PreCommit`| [![.github/workflows/job_Precommit_Python_Coverage.yml](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_Coverage.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_Coverage.yml) |
| [ Python PreCommit Dataframes ](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Dataframes.yml) | `Run Python_Dataframes PreCommit`| [![.github/workflows/job_PreCommit_Python_Dataframes.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Dataframes.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Dataframes.yml) |
| [ Python PreCommit Examples ](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Examples.yml) | `Run Python_Examples PreCommit` | [![.github/workflows/job_PreCommit_Python_Examples.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Examples.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Examples.yml) |
| [ Python PreCommit Runners ](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Runners.yml) | `Run Python_Runners PreCommit`| [![.github/workflows/job_PreCommit_Python_Runners.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Runners.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Runners.yml) |
| [ Python PreCommit Lint ](https://github.com/apache/beam/actions/workflows/job_Precommit_PythonLint.yml) | `Run PythonLint PreCommit` | [![.github/workflows/job_Precommit_PythonLint.yml](https://github.com/apache/beam/actions/workflows/job_Precommit_PythonLint.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_Precommit_PythonLint.yml) |
| [ Python PreCommit Transforms ](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Transforms.yml)| `Run Python_Transforms PreCommit`| [![.github/workflows/job_PreCommit_Python_Transforms.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Transforms.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Transforms.yml) |
| [ Python PreCommit ](https://github.com/apache/beam/actions/workflows/job_Precommit_Python.yml) | `Run Python PreCommit` | [![.github/workflows/job_Precommit_Python.yml](https://github.com/apache/beam/actions/workflows/job_Precommit_Python.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_Precommit_Python.yml) |
Please note that jobs with matrix need to have matrix element in the comment. Example:
```Run Python PreCommit (3.8)```
| Workflow name | Matrix | Trigger Phrase | Cron Status |
|:-------------:|:------:|:--------------:|:-----------:|
| [ Go Precommit ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml) | N/A |`Run Go PreCommit`| [![Go Precommit](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml) |
| [ Python PreCommit Docker ](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_DockerBuild.yml) | ['3.8','3.9','3.10','3.11'] | `Run PythonDocker PreCommit (matrix_element)`| [![.github/workflows/job_Precommit_Python_DockerBuild.yml](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_DockerBuild.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_DockerBuild.yml) |
| [ Python Precommit Formatter ](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml) | N/A | `Run PythonFormatter PreCommit`| [![.github/workflows/job_PreCommit_PythonAutoformatter.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_PythonAutoformatter.yml) |
| [ Python PreCommit Coverage ](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_Coverage.yml) | N/A | `Run Python_Coverage PreCommit`| [![.github/workflows/job_Precommit_Python_Coverage.yml](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_Coverage.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_Precommit_Python_Coverage.yml) |
| [ Python PreCommit Dataframes ](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Dataframes.yml) | ['3.8','3.9','3.10','3.11'] | `Run Python_Dataframes PreCommit (matrix_element)`| [![.github/workflows/job_PreCommit_Python_Dataframes.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Dataframes.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Dataframes.yml) |
| [ Python PreCommit Examples ](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Examples.yml) | ['3.8','3.9','3.10','3.11'] | `Run Python_Examples PreCommit (matrix_element)` | [![.github/workflows/job_PreCommit_Python_Examples.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Examples.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Examples.yml) |
| [ Python PreCommit Runners ](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Runners.yml) | ['3.8','3.9','3.10','3.11'] | `Run Python_Runners PreCommit (matrix_element)`| [![.github/workflows/job_PreCommit_Python_Runners.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Runners.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Runners.yml) |
| [ Python PreCommit Lint ](https://github.com/apache/beam/actions/workflows/job_Precommit_PythonLint.yml) | N/A | `Run PythonLint PreCommit` | [![.github/workflows/job_Precommit_PythonLint.yml](https://github.com/apache/beam/actions/workflows/job_Precommit_PythonLint.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_Precommit_PythonLint.yml) |
| [ Python PreCommit Transforms ](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Transforms.yml) | ['3.8','3.9','3.10','3.11'] | `Run Python_Transforms PreCommit (matrix_element)`| [![.github/workflows/job_PreCommit_Python_Transforms.yml](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Transforms.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_PreCommit_Python_Transforms.yml) |
| [ Python PreCommit ](https://github.com/apache/beam/actions/workflows/job_Precommit_Python.yml) | ['3.8','3.9','3.10','3.11'] | `Run Python PreCommit (matrix_element)` | [![.github/workflows/job_Precommit_Python.yml](https://github.com/apache/beam/actions/workflows/job_Precommit_Python.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/job_Precommit_Python.yml) |
14 changes: 10 additions & 4 deletions .github/workflows/job_PreCommit_Python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,38 @@ permissions:
jobs:
beam_PreCommit_Python:
strategy:
fail-fast: false
matrix:
python_version: ['3.8','3.9','3.10','3.11']
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
github.event.comment.body == 'Run Python PreCommit' ||
startsWith(github.event.comment.body, 'Run Python PreCommit') ||
github.event_name == 'schedule'
runs-on: [self-hosted, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set comment body with matrix
id: set_comment_body
run: |
echo "comment_body=Run Python PreCommit (${{ matrix.python_version }})" >> $GITHUB_OUTPUT
- name: Rerun on comment
if: github.event.comment.body == 'Run Python PreCommit'
if: github.event.comment.body == steps.set_comment_body.outputs.comment_body
uses: ./.github/actions/rerun-job-action
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
github_repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ github.job }}
github_job: "${{ github.job }} (${{ matrix.python_version }})"
github_current_run_id: ${{ github.run_id }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install Java
uses: actions/setup-java@v3.8.0
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/job_PreCommit_Python_Dataframes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,37 @@ permissions:
jobs:
beam_PreCommit_Python_Dataframes:
strategy:
fail-fast: false
matrix:
python_version: ['3.8','3.9','3.10','3.11']
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
github.event.comment.body == 'Run Python_Dataframes PreCommit' ||
startsWith(github.event.comment.body, 'Run Python_Dataframes PreCommit') ||
github.event_name == 'schedule'
runs-on: [self-hosted, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set comment body with matrix
id: set_comment_body
run: |
echo "comment_body=Run Python_Dataframes PreCommit (${{ matrix.python_version }})" >> $GITHUB_OUTPUT
- name: Rerun on comment
if: github.event.comment.body == 'Run Python_Dataframes PreCommit'
if: github.event.comment.body == steps.set_comment_body.outputs.comment_body
uses: ./.github/actions/rerun-job-action
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
github_repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ github.job }}
github_job: "${{ github.job }} (${{ matrix.python_version }})"
github_current_run_id: ${{ github.run_id }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install Java
uses: actions/setup-java@v3.8.0
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,41 @@ permissions:
jobs:
beam_PreCommit_PythonDocker:
strategy:
fail-fast: false
matrix:
python_version: ['3.8','3.9','3.10','3.11']
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
github.event.comment.body == 'Run PythonDocker PreCommit' ||
startsWith(github.event.comment.body, 'Run PythonDocker PreCommit') ||
github.event_name == 'schedule'
runs-on: [self-hosted, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set comment body with matrix
id: set_comment_body
run: |
echo "comment_body=Run PythonDocker PreCommit (${{ matrix.python_version }})" >> $GITHUB_OUTPUT
- name: Rerun on comment
if: github.event.comment.body == 'Run PythonDocker PreCommit'
if: github.event.comment.body == steps.set_comment_body.outputs.comment_body
uses: ./.github/actions/rerun-job-action
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
github_repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ github.job }}
github_job: "${{ github.job }} (${{ matrix.python_version }})"
github_current_run_id: ${{ github.run_id }}
- name: Install Java
uses: actions/setup-java@v3.8.0
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- uses: actions/setup-go@v4
with:
go-version: '1.16'
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Setup Gradle
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/job_PreCommit_Python_Examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,38 @@ permissions:
jobs:
beam_PreCommit_Python_Examples:
strategy:
fail-fast: false
matrix:
python_version: ['3.8','3.9','3.10','3.11']
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
github.event.comment.body == 'Run Python_Examples PreCommit' ||
startsWith(github.event.comment.body, 'Run Python_Examples PreCommit') ||
github.event_name == 'schedule'
runs-on: [self-hosted, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set comment body with matrix
id: set_comment_body
run: |
echo "comment_body=Run Python_Dataframes PreCommit (${{ matrix.python_version }})" >> $GITHUB_OUTPUT
- name: Rerun on comment
if: github.event.comment.body == 'Run Python_Examples PreCommit'
if: github.event.comment.body == steps.set_comment_body.outputs.comment_body
uses: ./.github/actions/rerun-job-action
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
github_repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ github.job }}
github_job: "${{ github.job }} (${{ matrix.python_version }})"
github_current_run_id: ${{ github.run_id }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install Java
uses: actions/setup-java@v3.8.0
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/job_PreCommit_Python_Runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,38 @@ permissions:
jobs:
beam_PreCommit_Python_Runners:
strategy:
fail-fast: false
matrix:
python_version: ['3.8','3.9','3.10','3.11']
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
github.event.comment.body == 'Run Python_Runners PreCommit' ||
startsWith(github.event.comment.body, 'Run Python_Runners PreCommit') ||
github.event_name == 'schedule'
runs-on: [self-hosted, ubuntu-20.04]

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set comment body with matrix
id: set_comment_body
run: |
echo "comment_body=Run Python_Runners PreCommit (${{ matrix.python_version }})" >> $GITHUB_OUTPUT
- name: Rerun on comment
if: github.event.comment.body == 'Run Python_Runners PreCommit'
if: github.event.comment.body == steps.set_comment_body.outputs.comment_body
uses: ./.github/actions/rerun-job-action
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
github_repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ github.job }}
github_job: "${{ github.job }} (${{ matrix.python_version }})"
github_current_run_id: ${{ github.run_id }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install Java
uses: actions/setup-java@v3.8.0
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/job_PreCommit_Python_Transforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,37 @@ permissions:
jobs:
beam_PreCommit_Python_Transforms:
strategy:
fail-fast: false
matrix:
python_version: ['3.8','3.9','3.10','3.11']
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
github.event.comment.body == 'Run Python_Transforms PreCommit' ||
startsWith(github.event.comment.body, 'Run Python_Transforms PreCommit') ||
github.event_name == 'schedule'
runs-on: [self-hosted, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set comment body with matrix
id: set_comment_body
run: |
echo "comment_body=Run Python_Transforms PreCommit (${{ matrix.python_version }})" >> $GITHUB_OUTPUT
- name: Rerun on comment
if: github.event.comment.body == 'Run Python_Transforms PreCommit'
if: github.event.comment.body == steps.set_comment_body.outputs.comment_body
uses: ./.github/actions/rerun-job-action
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
github_repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ github.job }}
github_job: "${{ github.job }} (${{ matrix.python_version }})"
github_current_run_id: ${{ github.run_id }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install Java
uses: actions/setup-java@v3.8.0
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/job_Precommit_Python_Coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ github.job }}
github_current_run_id: ${{ github.run_id }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Java
uses: actions/setup-java@v3.8.0
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
Expand Down

0 comments on commit cbfeb2e

Please sign in to comment.