Repository navigation
Remove two Dag list sort options that never worked - #75025
Merged
Merged
Conversation
Pushkal-Gupta
requested review from
bbovenzi,
bugraoz93,
choo121600,
ephraimbuddy,
guan404ming,
henry3260,
jason810496,
pierrejeambrun,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
October 18, 2026 23:19
bbovenzi
approved these changes
Oct 19, 2026
Contributor
Backport successfully created: v3-4-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
github-actions Bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Oct 19, 2026
…apache#75025) (cherry picked from commit b8db2af) Co-authored-by: Pushkal Gupta <161060351+Pushkal-Gupta@users.noreply.github.com>
aws-airflow-bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Oct 19, 2026
…apache#75025) (cherry picked from commit b8db2af) Co-authored-by: Pushkal Gupta <161060351+Pushkal-Gupta@users.noreply.github.com>
vatsrahul1001
pushed a commit
that referenced
this pull request
Oct 20, 2026
vatsrahul1001
pushed a commit
that referenced
this pull request
Oct 20, 2026
vedntzz
added a commit
to vedntzz/Knack
that referenced
this pull request
Oct 27, 2026
KN-5: no-alias-sort-keys rule from apache/airflow#75025 with real-cod…
This was referenced Oct 27, 2026
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.
GET /api/v2/dagssays you can sort bystateandstart_date. Try either one and the request fails:Neither column exists on
DagModel.SortParamreturns a clean 400 for a name that is not on its allowed list, but these two are on the list, so it skips that check and goes straight togetattr(self.model, name), which raises.The UI endpoint behind
/ui/dagslists the same two names and fails the same way.Where they came from
#44345 moved the last-run sorts into
to_replace:The mapping is correct and both
last_run_*names work. The mistake was writing theDagRuncolumn names into the allowed list instead of deleting them. They have been advertised and broken ever since.What this does
Removes the two names from both endpoints. Sorting by them now gets the same 400 as any other unknown attribute, and the spec stops offering them.
last_run_stateandlast_run_start_dateare untouched and remain the way to sort by the latest run.I removed them rather than aliasing them onto
DagRun.stateandDagRun.start_date. Thelast_run_*spelling predates the refactor and already works, so a second name for the same sort felt worse than one. Happy to alias instead if you would rather keep the advertised names working.Checks
Six tests, three per endpoint, covering
state,start_dateand-state. All six fail without the change, each with thatAttributeErrorrather than a status code.test_dags.pyfor the public and UI routes is at 276 passed.I checked the other 32
SortParamcall sites the same way, 155 advertised attributes in all, including the keyword-argument form inhitl.pyand the two ingrid.pythat take their attributes fromtimetable.run_ordering. These two endpoints were the only mismatches.The spec, the private UI spec and the six generated UI files all come from their hooks and are stable on a second run. The only lines that change in them are the
order_bydescriptions.Was generative AI tooling used to co-author this PR?