ecodina commented on issue #46224:
URL: https://github.com/apache/airflow/issues/46224#issuecomment-2809899844
I can reproduce this issue. I've also found that the same happens when a
task outlets a dataset/asset.
If it helps anyone, my trigger receives an `end_from_trigger` argument,
which is created in my Operator in the `__init__` method:
```python
self.end_from_trigger = True
if len(kwargs.get("outlets", [])) > 0:
self.end_from_trigger = False
```
Then, my Trigger yields a `TriggerEvent` or a `TriggerSuccessEvent` based on
this argument, and whether what my trigger does has worked properly:
```python
if not self.end_from_trigger:
yield TriggerEvent({"finished_ok": finished_ok, "final_message":
final_message})
else:
if finished_ok: # this is a bool that has whether my Trigger
actually worked
self.log.info(final_message)
yield TaskSuccessEvent()
else:
yield TriggerEvent({"finished_ok": finished_ok, "final_message":
final_message})
```
--
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]