seanghaeli commented on code in PR #77066:
URL: https://github.com/apache/airflow/pull/77066#discussion_r4733909349


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -2036,8 +2037,10 @@ async def run_trigger(
                             trigger_id=trigger_id,
                             key=shared_key,
                         )
-                with suppress(Exception):
+                try:
                     await trigger.cleanup()
+                except Exception:
+                    await self.log.awarning("cleanup() raised an exception", 
name=name, exc_info=True)

Review Comment:
   Under this PR the warning reaches the task's log, but without the traceback: 
`awarning` runs the call on another thread, where `exc_info=True` finds no 
exception. Passing the exception itself keeps it, and it's also why the new 
test fails in CI with `KeyError: 'exc_info'`.
   ```suggestion
                   except Exception as e:
                       await self.log.awarning("cleanup() raised an exception", 
name=name, exc_info=e)
   ```



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