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 80734b7d62a Dont fail pipeline on failed stat (#35640)
80734b7d62a is described below

commit 80734b7d62a7686aca103cd7a973c06fc58a176e
Author: Danny McCormick <[email protected]>
AuthorDate: Wed Jul 23 08:34:20 2025 -0400

    Dont fail pipeline on failed stat (#35640)
    
    * Dont fail pipeline on failed stat
    
    * scope error
---
 sdks/python/apache_beam/runners/portability/prism_runner.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sdks/python/apache_beam/runners/portability/prism_runner.py 
b/sdks/python/apache_beam/runners/portability/prism_runner.py
index 14854ca14a3..6a6e7d6d9a4 100644
--- a/sdks/python/apache_beam/runners/portability/prism_runner.py
+++ b/sdks/python/apache_beam/runners/portability/prism_runner.py
@@ -181,8 +181,13 @@ class PrismJobServer(job_server.SubprocessJobServer):
 
     _LOGGER.info("Prism binary path resolved to: %s", target_url)
     # Make sure the binary is executable.
-    st = os.stat(target_url)
-    os.chmod(target_url, st.st_mode | stat.S_IEXEC)
+    try:
+      st = os.stat(target_url)
+      os.chmod(target_url, st.st_mode | stat.S_IEXEC)
+    except PermissionError:
+      _LOGGER.warning(
+          'Could not change permissions of prism binary; invoking may fail if '
+          + 'current process does not have exec permissions on binary.')
     return target_url
 
   @staticmethod

Reply via email to