seanghaeli commented on code in PR #77023:
URL: https://github.com/apache/airflow/pull/77023#discussion_r4730894402
##########
airflow-core/src/airflow/models/deadline.py:
##########
@@ -267,11 +285,261 @@ def prune_deadlines(cls, *, session: Session,
conditions: dict[Mapped, Any]) ->
return deleted_count
+ @property
+ def is_late(self) -> bool:
+ return self.missed and self.resolved_at is None
+
+ @classmethod
+ def _discover_asset_partition_keys(cls, *, session: Session, asset_id:
int) -> list[str | None]:
+ from airflow.models.asset import AssetEvent
+
+ keys: list[str] = []
+ seen: set[str] = set()
+ event_keys = session.scalars(
+ select(AssetEvent.partition_key)
Review Comment:
The expected keys come from the partition keys this asset has already
received, so a key that never arrives never gets a deadline, and every key that
did arrive gets a new deadline each window that it then misses. In Breeze with
`cron="* * * * *"` and keys 2026-11-01 to 2026-11-03 each delivered once, the
scheduler created and missed a deadline for all three every minute (4 missed
callbacks each in 5 minutes), started doing the same for 2026-11-04 once it
arrived, and never made one for a key that hadn't arrived. I think the expected
keys need to come from the producer's partition timetable, as the issue
suggests.
--
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]