vincbeck commented on PR #45562:
URL: https://github.com/apache/airflow/pull/45562#issuecomment-2598489688
I addressed your feedbacks but I also added something new. It was actually a
suggestion from @dstandish that I think is a great idea! I introduced the
concept of `AssetWatcher` that is a thin wrapper around trigger. Explanations:
Instead of having:
```
trigger = FileTrigger(....)
asset = Asset("<my_queue>", watchers=[trigger])
```
Now it is:
```
trigger = FileTrigger(....)
asset = Asset("<my_queue>", watchers=[AssetWatcher(name="my_queue_watcher",
trigger=trigger)])
```
`AssetWatcher` does not add much besides just a name, but I think it is
important because, in the future, we might want to surface the relations
between assets and triggers in the graph view in the UI. Representing a trigger
in the graph can be tricky because triggers have 2 pieces of information:
`classpath` and `kwargs`. None of them are very suitable for displaying
purposes. `classpath` is debatable but it is anyway not representable of the
trigger. Example: you might have an asset with 2 watchers: each one uses the
trigger `FileTrigger` to monitor a different file. Having only the classpath
displayed will not help the user to understand which one is which. Hence the
name.
--
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]