This is an automated email from the ASF dual-hosted git repository. cvandermerwe pushed a commit to branch revert-37556-dooutputstuplebug in repository https://gitbox.apache.org/repos/asf/beam.git
commit 900ba7e9657c9a9858b06537465b264e1e77e9b4 Author: claudevdm <[email protected]> AuthorDate: Mon Mar 9 18:20:27 2026 -0400 Revert "fix(python): Register all output pcollections of a transform rather t…" This reverts commit 6a1618eca88ec88b9ebcb17336b39ae37d8ee500. --- sdks/python/apache_beam/pipeline.py | 5 ++--- sdks/python/apache_beam/pipeline_test.py | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sdks/python/apache_beam/pipeline.py b/sdks/python/apache_beam/pipeline.py index 7446f9df38c..3cce2c5bb77 100644 --- a/sdks/python/apache_beam/pipeline.py +++ b/sdks/python/apache_beam/pipeline.py @@ -829,10 +829,9 @@ class Pipeline(HasDisplayData): assert isinstance(result.producer.inputs, tuple) if isinstance(result, pvalue.DoOutputsTuple): - all_tags = [result._main_tag] + list(result._tags) - for tag in all_tags: + for tag, pc in list(result._pcolls.items()): if tag not in current.outputs: - current.add_output(result[tag], tag) + current.add_output(pc, tag) continue # If there is already a tag with the same name, increase a counter for diff --git a/sdks/python/apache_beam/pipeline_test.py b/sdks/python/apache_beam/pipeline_test.py index ac3e6ac4afc..b28fe3c3d14 100644 --- a/sdks/python/apache_beam/pipeline_test.py +++ b/sdks/python/apache_beam/pipeline_test.py @@ -1648,10 +1648,9 @@ class RunnerApiTest(unittest.TestCase): all_applied_transforms[xform.full_label] = xform current_transforms.extend(xform.parts) xform = all_applied_transforms['Split Sales'] - # Confirm that Split Sales correctly has three outputs: the main - # (untagged) output plus the two tagged outputs specified by - # ParDo.with_outputs in ParentSalesSplitter. - assert len(xform.outputs) == 3 + # Confirm that Split Sales correctly has two outputs as specified by + # ParDo.with_outputs in ParentSalesSplitter. + assert len(xform.outputs) == 2 if __name__ == '__main__':
