hussein-awala opened a new pull request, #54891: URL: https://github.com/apache/airflow/pull/54891
This PR extends the asset events API client and inlet events accessor to support additional query options while keeping the accessor **lazy**, meaning events are only fetched when accessed. ## Changes - Updated `InletEventsAccessors.__getitem__` to accept optional filtering arguments (`after`, `before`, `ascending`, `limit`) without breaking existing usage (new key type is `tuple[<existing key type>, dict]`) - The accessor continues to **lazily fetch events** from `SUPERVISOR_COMMS` only when accessed, but it will only fetch the events that match the filters when they are provided. ## Impact - Existing calls like `accessors[asset]` continue to work as before. - New functionality allows **lazy, filtered queries** by time range, limit, and sort order. - Enables more efficient and flexible retrieval of asset event history without eager fetching. ## Use Cases - Useful when the asset is used as input and not as a trigger source. - Easily retrieve the latest available value (`ascending=False` and `limit=1`). - Filter by date range for backfill scenarios without fetching the full history and filtering locally. -- 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]
