hussein-awala opened a new pull request, #77668:
URL: https://github.com/apache/airflow/pull/77668

   The "Rollup mappers" example in the asset docs pairs `StartOfHourMapper` 
with `DayWindow` for an hourly-to-daily rollup. That Dag parses fine but is 
never scheduled. `RollupMapper.to_downstream` delegates to the upstream mapper, 
so each hourly event opens its own pending run keyed by the hour (e.g. 
`2026-03-10T09`), and none of those runs can ever collect the 24 keys 
`DayWindow` expects. The bundled `daily_team_a_rollup` example Dag already uses 
`StartOfDayMapper` with `DayWindow`, which works.
   
   This PR:
   
   - switches the example to `StartOfDayMapper()`,
   - restates the pairing rule as "the mapper of the same downstream period" 
(`StartOfHourMapper` + `HourWindow`, `StartOfDayMapper` + `DayWindow`, 
`StartOfMonthMapper` + `MonthWindow`, ...),
   - corrects the paragraph on key normalization: expected members are encoded 
in the mapper's `input_format` (e.g. `2026-03-10T00:00:00`), not as 
`2026-03-10T09`,
   - notes that the parse-time decoded-type check does not catch a temporal 
mapper of the wrong period, and what that looks like.
   
   Docs only, so no newsfragment.
   
   Testing:
   
   - Reproduced on `main` by running the real mapper classes through the 
scheduler's routing (one pending run per `to_downstream` key) and wait-policy 
check, with 24 hourly keys. `StartOfHourMapper` + `DayWindow` gives 24 pending 
runs and none fires. `StartOfDayMapper` + `DayWindow` gives one run 
(`2026-03-10`), which fires. All six `StartOf<Period>Mapper` + `<Period>Window` 
pairs fire the same way.
   - On a local stack, a consumer copied from the docs never fired. The 
`example_asset_partition.py` version fired once all 24 hours arrived.
   - `prek` (pre-commit and manual stages) passes.
   - `breeze build-docs apache-airflow task-sdk` passes.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5.5)
   
   Generated-by: Claude Code (Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to