From 1e585d3a24399cd7f76e07c53f98df4abccf5013 Mon Sep 17 00:00:00 2001 From: Shunping Huang Date: Sun, 24 May 2026 01:01:28 -0400 Subject: [PATCH 1/2] Fix flaky test_csv_to_json in Beam YAML SDK Sorting this DataFrame by `rank` preserves the permuted index values. Using `.reindex()` does not reset the index, causing `assert_frame_equal` to fail when comparing against the original sequential DataFrame. Replaced `.reindex()` with `.reset_index(drop=True)` to correctly discard the permuted index and reset it to a sequential RangeIndex matching the original input. --- sdks/python/apache_beam/yaml/yaml_transform_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/yaml/yaml_transform_test.py b/sdks/python/apache_beam/yaml/yaml_transform_test.py index bbb60b185c01..192af63a9871 100644 --- a/sdks/python/apache_beam/yaml/yaml_transform_test.py +++ b/sdks/python/apache_beam/yaml/yaml_transform_test.py @@ -287,7 +287,7 @@ def test_csv_to_json(self): output_shard = all_output[0] result = pd.read_json( output_shard, orient='records', - lines=True).sort_values('rank').reindex() + lines=True).sort_values('rank').reset_index(drop=True) pd.testing.assert_frame_equal(data, result) def test_circular_reference_validation(self): From a08e785db2c93da289ebb4f8353357f2919531b5 Mon Sep 17 00:00:00 2001 From: Shunping Huang Date: Mon, 25 May 2026 12:23:34 -0400 Subject: [PATCH 2/2] Trigger tests. --- .github/trigger_files/beam_PostCommit_Python_Versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/trigger_files/beam_PostCommit_Python_Versions.json b/.github/trigger_files/beam_PostCommit_Python_Versions.json index 8ed972c9f579..9cc78c7d1c6c 100644 --- a/.github/trigger_files/beam_PostCommit_Python_Versions.json +++ b/.github/trigger_files/beam_PostCommit_Python_Versions.json @@ -1,4 +1,4 @@ { "comment": "Modify this file in a trivial way to cause this test suite to run", - "revision": 3 + "revision": 4 }