potiuk commented on code in PR #36986:
URL: https://github.com/apache/airflow/pull/36986#discussion_r1466708415


##########
airflow/models/taskinstance.py:
##########
@@ -2393,6 +2393,12 @@ def _run_raw_task(
                 self.handle_failure(e, test_mode, context, session=session)
                 session.commit()
                 raise
+            except SystemExit as code:
+                self.handle_failure(
+                    f"Task failed due to SystemExit({code})", test_mode, 
context, session=session
+                )
+                session.commit()
+                raise

Review Comment:
   And just to add- likey somewhere in our stack we do not save the state of 
task in "finally" clause - that's the most probable reason why it happens. I'd 
say it falls in the scope of this PR rather nicely.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to