Repository navigation
Conversation
bbovenzi
left a comment
There was a problem hiding this comment.
Please provide real before/after screenshots. That is not the airflow UI
cf02d2d to
eca9736
Compare
bbovenzi
left a comment
There was a problem hiding this comment.
We need to fix the include_all_attempts and the png files.
Let's also add a test that includes a date range where a group has an old failed try and a current success at the same time to make sure we fix the bug from include_all_attempts
| or_( | ||
| TaskInstance.state != TaskInstanceState.UP_FOR_RETRY, TaskInstance.state.is_(None) | ||
| ) | ||
| ).execution_options(include_all_attempts=True) |
There was a problem hiding this comment.
include_all_attempts counts each archived attempt as a child, so when filtered child_states and the overall state can change.
| .execution_options(yield_per=1000) | ||
| ) | ||
| structure_version_id = None | ||
| if has_date_filter: |
There was a problem hiding this comment.
The structure shouldn’t change because a filter was added. Unfiltered, we build the tree from first.dag_version_id. Filtered, we use the newest live version. On a run whose TIs span Dag versions, adding a date pill can regroup tasks under different group bars.
Can we pick the version the same way in both paths (from live TIs only, ignoring archived attempts)?
| ) | ||
| if summary is None: | ||
| continue | ||
| if summary is None: |
There was a problem hiding this comment.
this is the same “filtered, but the run exists → return an empty result instead of nothing” check as filtered_existing_run in gantt.py
Let's make a shared util
Old tries can stretch aggregate bars across a month after clearing a run. Date filters must also constrain those aggregates so task durations remain readable. Related: apache#63715. Signed-off-by: Deepak Jain <deepujain@gmail.com>
eca9736 to
a9d8fe2
Compare
|
@bbovenzi, the PR description now has real before/after Airflow screenshots from eca9736, and a9d8fe2 removes both PNGs from the branch. In a9d8fe2, matching tries contribute timing but only the latest matching try contributes a child state, with a regression covering an old failure and current success in the same date range. That commit also makes filtered and unfiltered summaries choose the same newest live Dag version and shares the empty-filter existing-run check between Grid and Gantt. Drafted-by: OpenAI Codex (no human review before posting) |
After clearing and rerunning tasks, a Gantt date filter can hide old individual attempts while mapped task and task group bars still span the old dates. A December 31 filter can leave an aggregate bar starting on December 1. Summary bars now use the same date bounds as individual attempts, so the chart stays focused on the selected window.
Matching archived attempts contribute timing, while the latest matching try supplies each task instance's state and count. This prevents an old failed try and a current success from counting as two children. Filtered and unfiltered summaries use the same live Dag structure. When no attempts match, the empty summary clears the previous bars; Grid and Gantt share that existing-run check.
These real application captures use the same persisted SQLite example run with Start Date set to December 31, 2024. The scale changes from roughly a month to a few hours. No scheduler was run. The PNGs have been removed from this branch; the links retain the earlier application capture.
Before:
After:
Validation:
breeze build-docs apache-airflow common.compat fabpassed for all three packages.Local database checks used SQLite; hosted checks are pending. The initial broad-run timing failures and their passing targeted reruns are separate results.
closes: #63715
Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI Codex following the guidelines