Fix 'airflow dags next-execution --table' crash when no next run exists#67642
Open
GayathriSrividya wants to merge 3 commits into
Open
Fix 'airflow dags next-execution --table' crash when no next run exists#67642GayathriSrividya wants to merge 3 commits into
GayathriSrividya wants to merge 3 commits into
Conversation
added 2 commits
May 28, 2026 15:15
… multiple DAGs When a single import-error file mapped to N DAGs, the previous query JOINed ParseImportError with file_dags_cte producing N rows per error. paginated_select then counted those N rows, inflating total_entries and applying LIMIT/OFFSET against joined rows rather than distinct errors. Fix uses a two-query approach: 1. dedup_stmt with DISTINCT - one row per import error for correct count and pagination via paginated_select 2. import_errors_stmt - full join only for the paginated IDs to gather dag_id associations for authorization/stacktrace redaction Closes apache#67525
Member
pierrejeambrun
left a comment
There was a problem hiding this comment.
Thanks you for the PR.
Can you clean the branch please, there seems to be an unrelated commit in here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
`airflow dags next-execution --table` crashes with `AttributeError` when the DAG has `schedule=None` or `@once` (when requesting more than one execution via `--num-executions`).
The `--table` code path applied `attrgetter` to every yielded object from `iter_next_dagrun_info()` without checking for `None` first. The non-table path already had the correct `if info is None` guard. This fix mirrors the same guard in the table path and prints a warning to stderr instead of crashing.
closes: #67394
Was generative AI tooling used to co-author this PR?
Generated-by: GitHub Copilot (Claude Sonnet 4.6) following the guidelines