Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
082873a
workflows: add `ubuntu-latest` to postcommit/ml
mohamedawnallah Aug 7, 2025
bd56d2c
workflows: include os runner as part of job name and test results
mohamedawnallah Aug 15, 2025
6896ceb
Merge remote-tracking branch 'upstream/master' into revertUbuntuLates…
mohamedawnallah Aug 16, 2025
475289f
sdks/python: properly make milvus as extra dependency
mohamedawnallah Aug 16, 2025
ad4cc0c
sdks/python: fix linting issues
mohamedawnallah Aug 16, 2025
7f3b197
sdks/python: fix formatting issues
mohamedawnallah Aug 16, 2025
76c77df
.github: trigger postcommit python
mohamedawnallah Aug 16, 2025
ea7c886
workflows: properly show job names
mohamedawnallah Aug 19, 2025
fdabfdc
.github: trigger beam postcommit python
mohamedawnallah Aug 19, 2025
a078c97
Merge remote-tracking branch 'upstream/master' into revertUbuntuLates…
mohamedawnallah Aug 28, 2025
ab93ebb
workflows: add `ubuntu-latest` to `beam_PreCommit_Python_Coverage`
mohamedawnallah Aug 28, 2025
c8d88b0
actions+sdks/python: upgrade pip
mohamedawnallah Aug 29, 2025
8e37726
workflows: exclude `ubuntu-latest` from `beam_PostCommit_Python`
mohamedawnallah Sep 5, 2025
7c40ae3
sdks/python: force tests to run only on precommit
mohamedawnallah Sep 5, 2025
e58bfad
Revert "actions+sdks/python: upgrade pip"
mohamedawnallah Sep 7, 2025
0cd2f87
workflows: run python 3.12 only on precommit ml `ubuntu-latest` os
mohamedawnallah Sep 7, 2025
1ff0f56
Merge remote-tracking branch 'upstream/master' into revertUbuntuLates…
mohamedawnallah Sep 10, 2025
cc9f74c
test-suites/direct/common.gradle: remove milvus postcommit gradle hook
mohamedawnallah Sep 10, 2025
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
23 changes: 7 additions & 16 deletions .github/workflows/beam_PostCommit_Python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,15 @@ env:

jobs:
beam_PostCommit_Python:
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
runs-on: ${{ matrix.os }}
timeout-minutes: 240
strategy:
fail-fast: false
matrix:
job_name: [beam_PostCommit_Python]
job_phrase: [Run Python PostCommit]
job_name: ['beam_PostCommit_Python']
job_phrase: ['Run Python PostCommit']
python_version: ['3.9', '3.10', '3.11', '3.12']
# 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
# Temporary removed the ubuntu-latest env till resolving deps issues.
os: [[self-hosted, ubuntu-20.04, highmem22]]
if: |
github.event_name == 'workflow_dispatch' ||
Expand All @@ -81,7 +75,7 @@ jobs:
with:
comment_phrase: ${{ matrix.job_phrase }} ${{ matrix.python_version }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
Expand All @@ -106,19 +100,15 @@ jobs:
arguments: |
-Pjava21Home=$JAVA_HOME_21_X64 \
-PuseWheelDistribution \
-Pposargs="${{
contains(matrix.os, 'self-hosted') &&
'-m (not require_docker_in_docker)' ||
'-m require_docker_in_docker'
}}" \
-Pposargs="-m (not require_docker_in_docker)" \
-PpythonVersion=${{ matrix.python_version }} \
env:
CLOUDSDK_CONFIG: ${{ env.KUBELET_GCLOUD_CONFIG_PATH}}
- name: Archive Python Test Results
uses: actions/upload-artifact@v4
if: failure()
with:
name: Python ${{ matrix.python_version }} Test Results
name: Python ${{ matrix.python_version }} Test Results (${{ join(matrix.os, ', ') }})
path: '**/pytest*.xml'
- name: Publish Python Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand All @@ -128,3 +118,4 @@ jobs:
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/pytest*.xml'
large_files: true
check_name: "Python ${{ matrix.python_version }} Test Results (${{ join(matrix.os, ', ') }})"
3 changes: 1 addition & 2 deletions .github/workflows/beam_PreCommit_Python_Coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ jobs:
# 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
# Temporary removed the ubuntu-latest env till resolving deps issues.
os: [[self-hosted, ubuntu-20.04, highmem]]
os: [[self-hosted, ubuntu-20.04, highmem], [ubuntu-latest]]
timeout-minutes: 180
if: |
github.event_name == 'push' ||
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/beam_PreCommit_Python_ML.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ env:

jobs:
beam_PreCommit_Python_ML:
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
runs-on: ${{ matrix.os }}
timeout-minutes: 180
strategy:
Expand All @@ -70,9 +70,18 @@ jobs:
# 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
# Temporary removed the ubuntu-latest env till resolving deps issues.
os: [[self-hosted, ubuntu-20.04, main]]
# Context: https://github.com/apache/beam/pull/35585.
os: [[self-hosted, ubuntu-20.04, main], [ubuntu-latest]]
exclude:
# Temporary exclude Python 3.9, 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.
- python_version: '3.9'
os: [ubuntu-latest]
- python_version: '3.10'
os: [ubuntu-latest]
- python_version: '3.11'
os: [ubuntu-latest]
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
Expand All @@ -86,7 +95,7 @@ jobs:
with:
comment_phrase: ${{ matrix.job_phrase }} ${{ matrix.python_version }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) (${{ join(matrix.os, ', ') }})
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
Expand All @@ -113,7 +122,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: Python ${{ matrix.python_version }} Test Results
name: Python ${{ matrix.python_version }} Test Results ${{ matrix.os }}
path: '**/pytest*.xml'
- name: Publish Python Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand All @@ -123,3 +132,4 @@ jobs:
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/pytest*.xml'
large_files: true
check_name: "Python ${{ matrix.python_version }} Test Results (${{ join(matrix.os, ', ') }})"
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def test_empty_input_chunks(self):

expected_chunks = []

with TestPipeline(is_integration_test=True) as p:
with TestPipeline() as p:
result = (p | beam.Create(test_chunks) | Enrichment(handler))
assert_that(
result,
Expand Down Expand Up @@ -702,7 +702,7 @@ def test_filtered_search_with_cosine_similarity_and_batching(self):
embedding=Embedding(dense_embedding=[0.3, 0.4, 0.5]))
]

with TestPipeline(is_integration_test=True) as p:
with TestPipeline() as p:
result = (p | beam.Create(test_chunks) | Enrichment(handler))
assert_that(
result,
Expand Down Expand Up @@ -807,7 +807,7 @@ def test_filtered_search_with_bm25_full_text_and_batching(self):
embedding=Embedding())
]

with TestPipeline(is_integration_test=True) as p:
with TestPipeline() as p:
result = (p | beam.Create(test_chunks) | Enrichment(handler))
assert_that(
result,
Expand Down Expand Up @@ -948,7 +948,7 @@ def test_vector_search_with_euclidean_distance(self):
embedding=Embedding(dense_embedding=[0.3, 0.4, 0.5]))
]

with TestPipeline(is_integration_test=True) as p:
with TestPipeline() as p:
result = (p | beam.Create(test_chunks) | Enrichment(handler))
assert_that(
result,
Expand Down Expand Up @@ -1088,7 +1088,7 @@ def test_vector_search_with_inner_product_similarity(self):
embedding=Embedding(dense_embedding=[0.3, 0.4, 0.5]))
]

with TestPipeline(is_integration_test=True) as p:
with TestPipeline() as p:
result = (p | beam.Create(test_chunks) | Enrichment(handler))
assert_that(
result,
Expand Down Expand Up @@ -1153,7 +1153,7 @@ def test_keyword_search_with_inner_product_sparse_embedding(self):
sparse_embedding=([1, 2, 3, 4], [0.05, 0.41, 0.05, 0.41])))
]

with TestPipeline(is_integration_test=True) as p:
with TestPipeline() as p:
result = (p | beam.Create(test_chunks) | Enrichment(handler))
assert_that(
result,
Expand Down Expand Up @@ -1226,7 +1226,7 @@ def test_hybrid_search(self):
embedding=Embedding(dense_embedding=[0.1, 0.2, 0.3]))
]

with TestPipeline(is_integration_test=True) as p:
with TestPipeline() as p:
result = (p | beam.Create(test_chunks) | Enrichment(handler))
assert_that(
result,
Expand Down
28 changes: 0 additions & 28 deletions sdks/python/test-suites/direct/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -419,33 +419,6 @@ task feastIntegrationTest {
}
}

// Integration tests that require Docker-in-Docker capabilities.
// These tests are marked with the `require_docker_in_docker` pytest marker
// because they rely on Docker-in-Docker configurations that are not supported
// on Beam's self-hosted GitHub Actions runners. Docker-in-Docker works on
// ubuntu-latest GitHub-hosted runners but not on self-hosted environments due
// to containerization architecture differences.
// Context: https://github.com/apache/beam/pull/35585
task dockerInDockerIntegrationTest {
dependsOn 'installGcpTest'
dependsOn ':sdks:python:sdist'

doLast {
def testOpts = basicTestOpts
def argMap = [
"test_opts": testOpts,
"suite": "postCommitIT-direct-py${pythonVersionSuffix}",
"collect": "require_docker_in_docker",
"runner": "TestDirectRunner",
]
def cmdArgs = mapToArgString(argMap)
exec {
executable 'sh'
args '-c', ". ${envdir}/bin/activate && ${runScriptsDir}/run_integration_test.sh $cmdArgs"
}
}
}

// Add all the RunInference framework IT tests to this gradle task that runs on Direct Runner Post commit suite.
project.tasks.register("inferencePostCommitIT") {
dependsOn = [
Expand All @@ -456,7 +429,6 @@ project.tasks.register("inferencePostCommitIT") {
'transformersInferenceTest',
'testcontainersTest',
'feastIntegrationTest',
'dockerInDockerIntegrationTest',
// (TODO) https://github.com/apache/beam/issues/25799
// uncomment tfx bsl tests once tfx supports protobuf 4.x
// 'tfxInferenceTest',
Expand Down
Loading