You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ro...@apache.org on 2025/01/18 01:43:22 UTC
(beam) branch master updated: [yaml] propogate error_handling to windowing composite config (#33443)
This is an automated email from the ASF dual-hosted git repository.
robertwb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 7d17f2ac537 [yaml] propogate error_handling to windowing composite config (#33443)
7d17f2ac537 is described below
commit 7d17f2ac537e22291781339a6b223e3526db82ba
Author: Jeff Kinard <je...@thekinards.com>
AuthorDate: Fri Jan 17 20:43:12 2025 -0500
[yaml] propogate error_handling to windowing composite config (#33443)
Signed-off-by: Jeffrey Kinard <je...@thekinards.com>
---
sdks/python/apache_beam/yaml/yaml_transform.py | 6 ++++++
sdks/python/apache_beam/yaml/yaml_transform_unit_test.py | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/sdks/python/apache_beam/yaml/yaml_transform.py b/sdks/python/apache_beam/yaml/yaml_transform.py
index 050a0dac8d0..4ee96f6081f 100644
--- a/sdks/python/apache_beam/yaml/yaml_transform.py
+++ b/sdks/python/apache_beam/yaml/yaml_transform.py
@@ -715,6 +715,9 @@ def preprocess_windowing(spec):
'transforms': [modified_spec] + windowing_transforms,
'input': spec['input'],
'output': modified_spec['__uuid__'],
+ 'config': {
+ 'error_handling': spec.get('config', {}).get('error_handling', {})
+ },
'__line__': spec['__line__'],
'__uuid__': spec['__uuid__'],
}
@@ -749,6 +752,9 @@ def preprocess_windowing(spec):
'name': spec.get('name', None) or spec['type'],
'transforms': [modified_spec] + windowing_transforms,
'output': windowed_outputs,
+ 'config': {
+ 'error_handling': spec.get('config', {}).get('error_handling', {})
+ },
'__line__': spec['__line__'],
'__uuid__': spec['__uuid__'],
}
diff --git a/sdks/python/apache_beam/yaml/yaml_transform_unit_test.py b/sdks/python/apache_beam/yaml/yaml_transform_unit_test.py
index 5bc9de24bb3..11ef2c5e22a 100644
--- a/sdks/python/apache_beam/yaml/yaml_transform_unit_test.py
+++ b/sdks/python/apache_beam/yaml/yaml_transform_unit_test.py
@@ -626,6 +626,8 @@ class MainTest(unittest.TestCase):
size: 4
input: {{input: input}}
output: {result['transforms'][0]['__uuid__']}
+ config:
+ error_handling: {{}}
'''
self.assertYaml(expected, result)
@@ -747,6 +749,8 @@ class MainTest(unittest.TestCase):
type: fixed
size: 4
output: {result['transforms'][1]["__uuid__"]}
+ config:
+ error_handling: {{}}
'''
self.maxDiff = 1e9