uranusjr commented on code in PR #58993:
URL: https://github.com/apache/airflow/pull/58993#discussion_r2623386290


##########
airflow-core/src/airflow/serialization/definitions/assets.py:
##########
@@ -18,10 +18,292 @@
 
 from __future__ import annotations
 
-from airflow.sdk import AssetWatcher  # TODO: Implement serialized assets.
+import json
+from typing import TYPE_CHECKING, Any, ClassVar, Literal
 
+import attrs
 
-class SerializedAssetWatcher(AssetWatcher):
-    """JSON serializable representation of an asset watcher."""
+from airflow.api_fastapi.execution_api.datamodels.asset import AssetProfile
+from airflow.serialization.dag_dependency import DagDependency
 
+if TYPE_CHECKING:
+    from collections.abc import Callable, Iterable, Iterator, MutableSequence
+
+    from typing_extensions import Self
+
+    from airflow.models.asset import AssetModel
+
+    AttrsInstance = attrs.AttrsInstance
+else:
+    AttrsInstance = object
+
+
[email protected](frozen=True)

Review Comment:
   This is a good question—and there isn’t. The problem is further complicated 
by the two definitions don’t _need_ to be in sync; the Core types should only 
implement minimal things that make sense in Core. In practice, this should be 
pretty easy to catch in tests since things simply won’t work if you missed a 
field that’s needed, but well-written tests still require manual care. 
_Eventually_, once Core and SDK separation is completed, CI should help catch 
these things with the same approach as provider compat is handled, by testing 
different Core and SDK combinations.



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