Skip to content

Fix Python 3.13 compatibility and serialization test flakiness

621b9a0
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Closed

[Python] Improve error messaging for PTransform serialization failures #37210

Fix Python 3.13 compatibility and serialization test flakiness
621b9a0
Select commit
Loading
Failed to load commit list.
GitHub Actions / Python 3.10 Test Results (ubuntu-latest) failed Jan 3, 2026 in 0s

1 errors, 23 skipped, 17 pass in 8m 38s

 2 files  ±0   2 suites  ±0   8m 38s ⏱️ -12s
41 tests +1  17 ✅ ±0  23 💤 ±0  0 ❌ ±0  1 🔥 +1 
64 runs  +2  17 ✅ ±0  45 💤 ±0  0 ❌ ±0  2 🔥 +2 

Results for commit 621b9a0. ± Comparison against earlier commit 9cd785e.

Annotations

Check failure on line 0 in /

See this annotation in the file changed.

@github-actions github-actions / Python 3.10 Test Results (ubuntu-latest)

All 2 runs with error: apache_beam.transforms.ptransform_test

sdks/python/test-suites/tox/py310/build/srcs/sdks/python/pytest_py310-cloudcoverage.xml [took 0s]
sdks/python/test-suites/tox/py310/build/srcs/sdks/python/pytest_py310-cloudcoverage_no_xdist.xml [took 0s]
Raw output
collection failure
target/.tox-py310-cloudcoverage/py310-cloudcoverage/lib/python3.10/site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
target/.tox-py310-cloudcoverage/py310-cloudcoverage/lib/python3.10/site-packages/_pytest/pathlib.py:549: in import_path
    mod = _import_module_using_spec(
target/.tox-py310-cloudcoverage/py310-cloudcoverage/lib/python3.10/site-packages/_pytest/pathlib.py:725: in _import_module_using_spec
    spec.loader.exec_module(mod)  # type: ignore[union-attr]
target/.tox-py310-cloudcoverage/py310-cloudcoverage/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:177: in exec_module
    source_stat, co = _rewrite_test(fn, self.config)
target/.tox-py310-cloudcoverage/py310-cloudcoverage/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:357: in _rewrite_test
    tree = ast.parse(source, filename=strfn)
/opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/ast.py:50: in parse
    return compile(source, filename, mode, flags,
E     File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py310/build/srcs/sdks/python/apache_beam/transforms/ptransform_test.py", line 325
E       """Tests that a helpful error message is raised on serialization failure."""
E   IndentationError: expected an indented block after function definition on line 324

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Python 3.10 Test Results (ubuntu-latest)

23 skipped tests found

There are 23 skipped tests, see "Raw output" for the full list of skipped tests.
Raw output
apache_beam.examples.ml_transform.ml_transform_it_test
apache_beam.examples.snippets.transforms.elementwise.mltransform_test
apache_beam.examples.snippets.transforms.elementwise.runinference_test
apache_beam.ml.anomaly.detectors.pyod_adapter_test
apache_beam.ml.inference.gemini_inference_it_test
apache_beam.ml.inference.gemini_inference_test
apache_beam.ml.inference.huggingface_inference_it_test
apache_beam.ml.inference.huggingface_inference_test
apache_beam.ml.inference.onnx_inference_test
apache_beam.ml.inference.pytorch_inference_test
apache_beam.ml.inference.tensorflow_inference_test
apache_beam.ml.inference.tensorrt_inference_test
apache_beam.ml.inference.vertex_ai_inference_it_test
apache_beam.ml.inference.xgboost_inference_test
apache_beam.ml.transforms.handlers_test
apache_beam.ml.transforms.tft_test
apache_beam.runners.dask.dask_runner_test
apache_beam.testing.analyzers.perf_analysis_test
apache_beam.testing.benchmarks.cloudml.cloudml_benchmark_test
apache_beam.transforms.enrichment_handlers.feast_feature_store_it_test
apache_beam.transforms.enrichment_handlers.feast_feature_store_test
apache_beam.typehints.pytorch_type_compatibility_test
apache_beam.yaml.yaml_ml_test

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Python 3.10 Test Results (ubuntu-latest)

41 tests found

There are 41 tests, see "Raw output" for the full list of tests.
Raw output
apache_beam.examples.ml_transform.ml_transform_it_test
apache_beam.examples.snippets.transforms.elementwise.mltransform_test
apache_beam.examples.snippets.transforms.elementwise.runinference_test
apache_beam.ml.anomaly.detectors.pyod_adapter_test
apache_beam.ml.inference.gemini_inference_it_test
apache_beam.ml.inference.gemini_inference_test
apache_beam.ml.inference.huggingface_inference_it_test
apache_beam.ml.inference.huggingface_inference_test
apache_beam.ml.inference.onnx_inference_test
apache_beam.ml.inference.pytorch_inference_test
apache_beam.ml.inference.tensorflow_inference_test
apache_beam.ml.inference.tensorrt_inference_test
apache_beam.ml.inference.vertex_ai_inference_it_test
apache_beam.ml.inference.xgboost_inference_test
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_empty_input_chunks
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_filtered_search_with_bm25_full_text_and_batching
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_filtered_search_with_cosine_similarity_and_batching
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_hybrid_search
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_invalid_query_on_non_existent_collection
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_invalid_query_on_non_existent_field
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_keyword_search_with_inner_product_sparse_embedding
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_vector_search_with_euclidean_distance
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_vector_search_with_inner_product_similarity
apache_beam.ml.rag.ingestion.milvus_search_it_test.TestMilvusVectorWriterConfig ‑ test_idempotent_write
apache_beam.ml.rag.ingestion.milvus_search_it_test.TestMilvusVectorWriterConfig ‑ test_invalid_write_on_missing_primary_key_in_entity
apache_beam.ml.rag.ingestion.milvus_search_it_test.TestMilvusVectorWriterConfig ‑ test_invalid_write_on_non_existent_collection
apache_beam.ml.rag.ingestion.milvus_search_it_test.TestMilvusVectorWriterConfig ‑ test_invalid_write_on_non_existent_partition
apache_beam.ml.rag.ingestion.milvus_search_it_test.TestMilvusVectorWriterConfig ‑ test_write_on_auto_id_primary_key
apache_beam.ml.rag.ingestion.milvus_search_it_test.TestMilvusVectorWriterConfig ‑ test_write_on_existent_collection_with_default_schema
apache_beam.ml.rag.ingestion.milvus_search_it_test.TestMilvusVectorWriterConfig ‑ test_write_with_batching
apache_beam.ml.rag.ingestion.milvus_search_it_test.TestMilvusVectorWriterConfig ‑ test_write_with_custom_column_specifications
apache_beam.ml.transforms.handlers_test
apache_beam.ml.transforms.tft_test
apache_beam.runners.dask.dask_runner_test
apache_beam.testing.analyzers.perf_analysis_test
apache_beam.testing.benchmarks.cloudml.cloudml_benchmark_test
apache_beam.transforms.enrichment_handlers.feast_feature_store_it_test
apache_beam.transforms.enrichment_handlers.feast_feature_store_test
apache_beam.transforms.ptransform_test
apache_beam.typehints.pytorch_type_compatibility_test
apache_beam.yaml.yaml_ml_test