Lee-W commented on code in PR #31999:
URL: https://github.com/apache/airflow/pull/31999#discussion_r1235352074
##########
airflow/jobs/triggerer_job_runner.py:
##########
@@ -676,11 +676,14 @@ def update_triggers(self, requested_trigger_ids:
set[int]):
try:
new_trigger_orm = new_triggers[new_id]
trigger_class =
self.get_trigger_by_classpath(new_trigger_orm.classpath)
- except BaseException as e:
- # Either the trigger code or the path to it is bad. Fail the
trigger.
- self.failed_triggers.append((new_id, e))
+ new_trigger_instance = trigger_class(**new_trigger_orm.kwargs)
+ except (BaseException, TypeError) as err:
+ # BaseException: Either the trigger code or the path to it is
bad. Fail the trigger.
+ # TypeError: The argument of the __init__ method in the
trigger might have been changed.
+ self.log.error("Trigger failed; message=%s", err)
+ self.failed_triggers.append((new_id, err))
continue
- new_trigger_instance = trigger_class(**new_trigger_orm.kwargs)
Review Comment:
After a second though, it's indeed more clear. let me revert back to that
version 🙂
--
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]