robertwb commented on a change in pull request #11174: [BEAM-7923] Pop failed
transform in CombineGlobally
URL: https://github.com/apache/beam/pull/11174#discussion_r395882293
##########
File path: sdks/python/apache_beam/transforms/core.py
##########
@@ -1811,6 +1811,8 @@ def add_input_types(transform):
return view
else:
if pcoll.windowing.windowfn != GlobalWindows():
+ # Remove the broken transform when running into value error.
+ pcoll.pipeline.transforms_stack.pop()
Review comment:
This is not the right place to pop this (internal) stack. Instead, we should
popping from the stack in a finally clause of a try block that pushes to the
stack. (Alternatively, we could manage the stack with a Python context, but
that might be overkill.)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services