This is an automated email from the ASF dual-hosted git repository.

damccorm 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 c6549e71ea4 Fix exception sampling logic (#33076)
c6549e71ea4 is described below

commit c6549e71ea454a7efb80c890bacb257813a36be8
Author: Danny McCormick <[email protected]>
AuthorDate: Mon Nov 11 12:09:39 2024 -0500

    Fix exception sampling logic (#33076)
    
    * Fix exception sampling logic
    
    * Allow subclasses of BaseException
    
    * Mock cython if not present
    
    * Use correct types/names
    
    * format
---
 sdks/python/apache_beam/runners/common.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sdks/python/apache_beam/runners/common.py 
b/sdks/python/apache_beam/runners/common.py
index 8a4f26c18e8..c43870d55eb 100644
--- a/sdks/python/apache_beam/runners/common.py
+++ b/sdks/python/apache_beam/runners/common.py
@@ -1504,8 +1504,7 @@ class DoFnRunner:
       return []
 
   def _maybe_sample_exception(
-      self, exn: BaseException,
-      windowed_value: Optional[WindowedValue]) -> None:
+      self, exc_info: Tuple, windowed_value: Optional[WindowedValue]) -> None:
 
     if self.execution_context is None:
       return
@@ -1516,7 +1515,7 @@ class DoFnRunner:
 
     output_sampler.sample_exception(
         windowed_value,
-        exn,
+        exc_info,
         self.transform_id,
         self.execution_context.instruction_id)
 

Reply via email to