You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2025/07/21 18:38:55 UTC

(beam) branch users/damccorm/prismStat created (now f1b91709e36)

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

damccorm pushed a change to branch users/damccorm/prismStat
in repository https://gitbox.apache.org/repos/asf/beam.git


      at f1b91709e36 Dont fail pipeline on failed stat

This branch includes the following new commits:

     new f1b91709e36 Dont fail pipeline on failed stat

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(beam) 01/01: Dont fail pipeline on failed stat

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch users/damccorm/prismStat
in repository https://gitbox.apache.org/repos/asf/beam.git

commit f1b91709e36cc7f3d89dc50cac90921b67dffae2
Author: Danny Mccormick <da...@google.com>
AuthorDate: Mon Jul 21 14:38:35 2025 -0400

    Dont fail pipeline on failed stat
---
 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..d92d1b7cb50 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:
+      _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