vincbeck commented on code in PR #43826: URL: https://github.com/apache/airflow/pull/43826#discussion_r1843963894
########## airflow/assets/__init__.py: ########## @@ -276,20 +279,43 @@ class Asset(os.PathLike, BaseAsset): uri: str group: str extra: dict[str, Any] + watchers: list[BaseTrigger] asset_type: ClassVar[str] = "asset" __version__: ClassVar[int] = 1 @overload - def __init__(self, name: str, uri: str, *, group: str = "", extra: dict | None = None) -> None: + def __init__( + self, + name: str, + uri: str, + *, + group: str = "", + extra: dict | None = None, + watchers: list[BaseTrigger] | None = None, Review Comment: Naming ... so hard haha. I see your point. The reason why I called it `watchers` is because the triggers will `watch` some external resource and send event on updates. In that sense, to me, the triggers are watchers. I am not strongly again `watch` if you think it makes more sense. To be very honest, between `watchers` and `watch` I dont mind, I think the both of them makes sense. However, I definitely want the attribute on the asset class, I think it makes more sense and a more deliberate choice for the user to say, I have this asset and I want this asset to be updated when these triggers fire. -- 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