andreahlert commented on code in PR #61629:
URL: https://github.com/apache/airflow/pull/61629#discussion_r2795357379


##########
providers/standard/src/airflow/providers/standard/utils/python_virtualenv_script.jinja2:
##########
@@ -55,7 +55,10 @@ else:
   #}
   reinit_supervisor_comms = getattr(task_runner, "reinit_supervisor_comms", 
None)
   if reinit_supervisor_comms:
-      reinit_supervisor_comms()
+      try:
+          reinit_supervisor_comms()
+      except Exception:
+          pass

Review Comment:
   Good call, I missed that this block sits outside expect_airflow.
   
   I'll restructure it: move reinit_supervisor_comms() inside the 
expect_airflow block with no try/except, so a failure is loud and visible. For 
the not-expect_airflow path I'll keep the import attempt but just skip reinit 
entirely since the user explicitly opted out of depending on Airflow.
   
   Will also keep the (ModuleNotFoundError, ImportError) on the import itself 
since that's purely defensive for broken installs.
   
   Pushing a v2 shortly.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to