Skip to content

Commit caf6617

Browse files
authored
Fix PreCommit tests involving docker-in-docker after Milvus dependency rearrangements (#37711)
1 parent 193db39 commit caf6617

3 files changed

Lines changed: 6 additions & 37 deletions

File tree

.github/workflows/beam_PreCommit_Python_Coverage.yml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,14 @@ env:
5858

5959
jobs:
6060
beam_PreCommit_Python_Coverage:
61-
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
62-
runs-on: ${{ matrix.os }}
61+
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
62+
runs-on: [self-hosted, ubuntu-20.04, highmem]
6363
strategy:
6464
fail-fast: false
6565
matrix:
6666
job_name: [beam_PreCommit_Python_Coverage]
6767
job_phrase: [Run Python_Coverage PreCommit]
6868
python_version: ['3.10']
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, highmem], [ubuntu-latest]]
7569
timeout-minutes: 180
7670
if: |
7771
github.event_name == 'push' ||
@@ -92,41 +86,16 @@ jobs:
9286
with:
9387
java-version: default
9488
python-version: ${{ matrix.python_version }}
95-
- name: Start DinD
96-
uses: ./.github/actions/dind-up-action
97-
id: dind
98-
if: contains(matrix.os, 'self-hosted')
99-
with:
100-
# Pin to stable Docker version to avoid compatibility issues
101-
dind-image: "docker:27-dind"
102-
# Enable all the new features
103-
cleanup-dind-on-start: "true"
104-
smoke-test-port-mapping: "true"
105-
prime-testcontainers: "true"
106-
tmpfs-run-size: 2g
107-
tmpfs-varrun-size: 4g
108-
export-gh-env: "true"
10989
- name: Run preCommitPyCoverage
11090
env:
111-
DOCKER_HOST: ${{ contains(matrix.os, 'self-hosted') && steps.dind.outputs.docker-host || '' }}
11291
TOX_TESTENV_PASSENV: "DOCKER_*,TESTCONTAINERS_*,TC_*,BEAM_*,GRPC_*,OMP_*,OPENBLAS_*,PYTHONHASHSEED,PYTEST_*"
113-
TESTCONTAINERS_HOST_OVERRIDE: ${{ contains(matrix.os, 'self-hosted') && env.DIND_IP || '' }}
114-
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE: "/var/run/docker.sock"
115-
TESTCONTAINERS_RYUK_DISABLED: "false"
116-
TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED: "true"
11792
PYTEST_ADDOPTS: "-v --tb=short --maxfail=3 --durations=20 --reruns=2 --reruns-delay=5"
11893
TC_TIMEOUT: "120"
11994
TC_MAX_TRIES: "120"
12095
TC_SLEEP_TIME: "1"
12196
uses: ./.github/actions/gradle-command-self-hosted-action
12297
with:
12398
gradle-command: :sdks:python:test-suites:tox:py310:preCommitPyCoverage
124-
arguments: |
125-
-Pposargs="${{
126-
contains(matrix.os, 'self-hosted') &&
127-
'-m (not require_docker_in_docker)' ||
128-
'-m require_docker_in_docker'
129-
}}"
13099
- uses: codecov/codecov-action@v3
131100
with:
132101
flags: python

.github/workflows/beam_PreCommit_Python_ML.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ jobs:
7373
# Context: https://github.com/apache/beam/pull/35585.
7474
os: [[self-hosted, ubuntu-20.04, main], [ubuntu-latest]]
7575
exclude:
76-
# Temporary exclude Python 3.10, 3.11, from ubuntu-latest.
77-
# This results in pip dependency resolution exceeded maximum depth issue.
78-
# Context: https://github.com/apache/beam/pull/35816.
76+
# exercise DinD tests (needed for Milvus) for latest Python version
7977
- python_version: '3.10'
8078
os: [ubuntu-latest]
8179
- python_version: '3.11'
8280
os: [ubuntu-latest]
81+
- python_version: '3.12'
82+
os: [ ubuntu-latest ]
8383
if: |
8484
github.event_name == 'push' ||
8585
github.event_name == 'pull_request_target' ||

sdks/python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def get_portability_package_data():
551551
'p312_ml_test': [
552552
'datatable',
553553
] + ml_base,
554-
'p313_ml_test': ml_base,
554+
'p313_ml_test': ml_base + milvus_dependency,
555555
'aws': ['boto3>=1.9,<2'],
556556
'azure': [
557557
'azure-storage-blob>=12.3.2,<13',

0 commit comments

Comments
 (0)