uranusjr commented on code in PR #65447:
URL: https://github.com/apache/airflow/pull/65447#discussion_r3217057986
##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -488,6 +488,13 @@ class OutletEventAccessor(_AssetRefResolutionMixin):
key: BaseAssetUniqueKey
extra: dict[str, JsonValue] = attrs.Factory(dict)
asset_alias_events: list[AssetAliasEvent] = attrs.field(factory=list)
+ partition_keys: list[str] = attrs.field(factory=list)
+
+ def add_partitions(self, keys: str | list[str]) -> None:
+ """Append a partition key to :attr:`partition_keys`."""
+ if isinstance(keys, str):
+ keys = [keys]
+ self.partition_keys.extend(keys)
Review Comment:
What happens if the same key is added multiple times here? (both in the same
ti, or in different runs)
--
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]