Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 2 additions & 33 deletions .github/workflows/beam_PreCommit_Python_Coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,14 @@ env:

jobs:
beam_PreCommit_Python_Coverage:
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
runs-on: ${{ matrix.os }}
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
runs-on: [self-hosted, ubuntu-20.04, highmem]
strategy:
fail-fast: false
matrix:
job_name: [beam_PreCommit_Python_Coverage]
job_phrase: [Run Python_Coverage PreCommit]
python_version: ['3.10']
# Run on both self-hosted and GitHub-hosted runners.
# Some tests (marked require_docker_in_docker) can't run on Beam's
# self-hosted runners due to Docker-in-Docker environment constraint.
# These tests will only execute on ubuntu-latest (GitHub-hosted).
# Context: https://github.com/apache/beam/pull/35585
os: [[self-hosted, ubuntu-20.04, highmem], [ubuntu-latest]]
timeout-minutes: 180
if: |
github.event_name == 'push' ||
Expand All @@ -92,41 +86,16 @@ jobs:
with:
java-version: default
python-version: ${{ matrix.python_version }}
- name: Start DinD
uses: ./.github/actions/dind-up-action
id: dind
if: contains(matrix.os, 'self-hosted')
with:
# Pin to stable Docker version to avoid compatibility issues
dind-image: "docker:27-dind"
# Enable all the new features
cleanup-dind-on-start: "true"
smoke-test-port-mapping: "true"
prime-testcontainers: "true"
tmpfs-run-size: 2g
tmpfs-varrun-size: 4g
export-gh-env: "true"
- name: Run preCommitPyCoverage
env:
DOCKER_HOST: ${{ contains(matrix.os, 'self-hosted') && steps.dind.outputs.docker-host || '' }}
TOX_TESTENV_PASSENV: "DOCKER_*,TESTCONTAINERS_*,TC_*,BEAM_*,GRPC_*,OMP_*,OPENBLAS_*,PYTHONHASHSEED,PYTEST_*"
TESTCONTAINERS_HOST_OVERRIDE: ${{ contains(matrix.os, 'self-hosted') && env.DIND_IP || '' }}
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE: "/var/run/docker.sock"
TESTCONTAINERS_RYUK_DISABLED: "false"
TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED: "true"
PYTEST_ADDOPTS: "-v --tb=short --maxfail=3 --durations=20 --reruns=2 --reruns-delay=5"
TC_TIMEOUT: "120"
TC_MAX_TRIES: "120"
TC_SLEEP_TIME: "1"
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:python:test-suites:tox:py310:preCommitPyCoverage
arguments: |
-Pposargs="${{
contains(matrix.os, 'self-hosted') &&
'-m (not require_docker_in_docker)' ||
'-m require_docker_in_docker'
}}"
- uses: codecov/codecov-action@v3
with:
flags: python
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/beam_PreCommit_Python_ML.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ jobs:
# Context: https://github.com/apache/beam/pull/35585.
os: [[self-hosted, ubuntu-20.04, main], [ubuntu-latest]]
exclude:
# Temporary exclude Python 3.10, 3.11, from ubuntu-latest.
# This results in pip dependency resolution exceeded maximum depth issue.
# Context: https://github.com/apache/beam/pull/35816.
# exercise DinD tests (needed for Milvus) for latest Python version
- python_version: '3.10'
os: [ubuntu-latest]
- python_version: '3.11'
os: [ubuntu-latest]
- python_version: '3.12'
os: [ ubuntu-latest ]
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
Expand Down
2 changes: 1 addition & 1 deletion sdks/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def get_portability_package_data():
'p312_ml_test': [
'datatable',
] + ml_base,
'p313_ml_test': ml_base,
'p313_ml_test': ml_base + milvus_dependency,
'aws': ['boto3>=1.9,<2'],
'azure': [
'azure-storage-blob>=12.3.2,<13',
Expand Down
Loading