Add missing dag_id filter on DagRun query#62750
Conversation
a951cb7 to
aabbb61
Compare
pierrejeambrun
left a comment
There was a problem hiding this comment.
Nice looking good overall, just one adjustment needed.
aabbb61 to
dab3a45
Compare
dab3a45 to
438d82d
Compare
|
Thank you very much for the quick fix! I'm impressed by how fast this issue was addressed and how quickly the PR was created. (Apologies if this isn't the standard place for thanks—I'm still getting familiar with the workflow, so please let me know if I should use a different channel next time). Thanks again for the amazing work! |
I just happened to be running into the same problem around the same time as you. Great job documenting the problem on your issue! I had forgotten to look for open issues before just diving into a PR, but yours was very easy to find and confirm all the details on. |
|
@jvstein Hello, please tell me in which version this problem is fixed. Just yesterday we updated to 3.1.7 from 3.0.0, and some tasks were completed successfully, but this error is still present and the logs cannot be viewed. |
If you click on the merged commit to In this case, the fix was first included in 3.2.0. |
We are upgrading an Airflow 2.11.0 system to 3.1.7 and encountered a problem where clicking a Task Group in the grid UI was giving a 404 response in the Task Instance detail pane.
I traced it back to a missing
dag_idfilter when building the list of task instances. The initial query ondag_runhappens without adag_idfilter, which is very likely to return a different DAG sharing a similar schedule (e.g. run_idscheduled__2026-02-03T04:00:00+00:00). That DagRun is then subsequently used for later filtering and the relevant downstream logic can't find the task group being used for filtering.This change adds the
dag_idfilter when querying and rejects inputs that don't include a validdag_idto filter whendag_run_idis specified.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.5 model)