Skip to content

Commit a71dc4f

Browse files
workflows: run ML tests on ubuntu-latest
In this commit, we run ML tests requiring docker-in-docker environment on `ubuntu-latest`. The motivation behind this is Milvus itests was requiring docker-in-docker environment due to setup issues on beam CI self-hosted environment.
1 parent ecfbc24 commit a71dc4f

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/beam_PostCommit_Python.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,20 @@ env:
5454
jobs:
5555
beam_PostCommit_Python:
5656
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
57-
runs-on: [self-hosted, ubuntu-20.04, highmem22]
57+
runs-on: ${{ matrix.os }}
5858
timeout-minutes: 240
5959
strategy:
6060
fail-fast: false
6161
matrix:
6262
job_name: [beam_PostCommit_Python]
6363
job_phrase: [Run Python PostCommit]
6464
python_version: ['3.9', '3.10', '3.11', '3.12']
65+
# Run on both self-hosted and GitHub-hosted runners.
66+
# Some tests (marked require_docker_in_docker) can't run on Beam's
67+
# self-hosted runners due to Docker-in-Docker environment constraint.
68+
# These tests will only execute on ubuntu-latest (GitHub-hosted).
69+
# Context: https://github.com/apache/beam/pull/35585
70+
os: [[self-hosted, ubuntu-20.04, highmem22], [ubuntu-latest]]
6571
if: |
6672
github.event_name == 'workflow_dispatch' ||
6773
github.event_name == 'pull_request_target' ||
@@ -99,6 +105,11 @@ jobs:
99105
arguments: |
100106
-Pjava21Home=$JAVA_HOME_21_X64 \
101107
-PuseWheelDistribution \
108+
-Pposargs="${{
109+
contains(matrix.os, 'self-hosted') &&
110+
'-m ''not require_docker_in_docker''' ||
111+
'-m ''require_docker_in_docker'''
112+
}}" \
102113
-PpythonVersion=${{ matrix.python_version }} \
103114
env:
104115
CLOUDSDK_CONFIG: ${{ env.KUBELET_GCLOUD_CONFIG_PATH}}

.github/workflows/beam_PreCommit_Python_ML.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,20 @@ env:
5858
jobs:
5959
beam_PreCommit_Python_ML:
6060
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
61-
runs-on: [self-hosted, ubuntu-20.04, main]
61+
runs-on: ${{ matrix.os }}
6262
timeout-minutes: 180
6363
strategy:
6464
fail-fast: false
6565
matrix:
6666
job_name: ['beam_PreCommit_Python_ML']
6767
job_phrase: ['Run Python_ML PreCommit']
6868
python_version: ['3.9','3.10','3.11','3.12']
69+
# Run on both self-hosted and GitHub-hosted runners.
70+
# Some tests (marked require_docker_in_docker) can't run on Beam's
71+
# self-hosted runners due to Docker-in-Docker environment constraint.
72+
# These tests will only execute on ubuntu-latest (GitHub-hosted).
73+
# Context: https://github.com/apache/beam/pull/35585
74+
os: [[self-hosted, ubuntu-20.04, main], [ubuntu-latest]]
6975
if: |
7076
github.event_name == 'push' ||
7177
github.event_name == 'pull_request_target' ||
@@ -96,7 +102,11 @@ jobs:
96102
with:
97103
gradle-command: :sdks:python:test-suites:tox:py${{steps.set_py_ver_clean.outputs.py_ver_clean}}:testPy${{steps.set_py_ver_clean.outputs.py_ver_clean}}ML
98104
arguments: |
99-
-Pposargs=apache_beam/ml/ \
105+
-Pposargs="${{
106+
contains(matrix.os, 'self-hosted') &&
107+
'apache_beam/ml/ -m ''not require_docker_in_docker''' ||
108+
'apache_beam/ml/ -m ''require_docker_in_docker'''
109+
}}" \
100110
-PpythonVersion=${{ matrix.python_version }}
101111
- name: Archive Python Test Results
102112
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)