amoghrajesh commented on code in PR #64243:
URL: https://github.com/apache/airflow/pull/64243#discussion_r2992860458
##########
airflow-core/src/airflow/serialization/decoders.py:
##########
@@ -106,6 +105,8 @@ def _decode_asset(var: dict[str, Any]):
)
for watcher in watchers
],
+ # TODO: Deprecated in SDK. Remove in Airflow 4.0.
Review Comment:
```suggestion
# TODO: Deprecated in SDK in 3.2. Remove in Airflow 4.0.
```
##########
airflow-core/src/airflow/serialization/definitions/assets.py:
##########
@@ -118,9 +119,11 @@ class SerializedAsset(SerializedAssetBase):
name: str
uri: str
group: str
- extra: dict[str, Any]
watchers: MutableSequence[SerializedAssetWatcher]
+ # TODO: Deprecated in SDK. Remove in Airflow 4.0.
+ extra: dict[str, JsonValue]
Review Comment:
```suggestion
# TODO: Deprecated in SDK in 3.2. Remove in Airflow 4.0.
extra: dict[str, JsonValue]
```
##########
task-sdk/src/airflow/sdk/definitions/asset/__init__.py:
##########
@@ -404,6 +407,20 @@ def normalized_uri(self) -> str | None:
except ValueError:
return None
+ @property
+ def extra(self) -> dict[str, JsonValue]:
+ # No warning here; a warning is shown when the value is set.
+ return self._extra
+
+ @extra.setter
+ def extra(self, value: dict[str, JsonValue]) -> None:
+ warnings.warn(
+ "Asset.extra is deprecated and will be removed in the future.",
+ RemovedInAirflow4Warning,
+ stacklevel=2,
+ )
+ self._extra = value
Review Comment:
No complaint but we use `RemovedInAirflow4Warning` and
`DeprecatedImportWarning` randomly, so just flagging that here if that one's
more relevant, but in this case since we know we want to nuke in AF4, I think
we are OK?
--
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]