You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2025/11/19 08:55:55 UTC
Re: [PR] fix(asset-alias): Preserve `Asset.extra` when using `AssetAlias` [airflow]
uranusjr commented on code in PR #58038:
URL: https://github.com/apache/airflow/pull/58038#discussion_r2541097044
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -1401,31 +1401,38 @@ def _asset_event_extras_from_aliases() -> dict[tuple[AssetUniqueKey, str], set[s
if alias_name not in outlet_alias_names:
continue
asset_key = AssetUniqueKey(**event["dest_asset_key"])
- extra_json = json.dumps(event["extra"], sort_keys=True)
- d[asset_key, extra_json].add(alias_name)
+ # fallback for backward compatibility
+ asset_extra_json = json.dumps(event.get("dest_asset_extra", {}), sort_keys=True)
Review Comment:
Is using `get()` here (and some other places) for backward compatibility?
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org