Add ordering to AssetEvent query in SchedulerJobRunner#52231
Merged
kaxil merged 3 commits intoapache:mainfrom Aug 13, 2025
Merged
Add ordering to AssetEvent query in SchedulerJobRunner#52231kaxil merged 3 commits intoapache:mainfrom
kaxil merged 3 commits intoapache:mainfrom
Conversation
8d69d27 to
eb33a83
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds deterministic ordering to the AssetEvent query in SchedulerJobRunner so that events are processed chronologically.
- Introduces an
.order_by(AssetEvent.timestamp.asc())clause on theAssetEventselect. - Ensures asset events fetched in ascending timestamp order.
Comments suppressed due to low confidence (1)
airflow-core/src/airflow/jobs/scheduler_job_runner.py:1603
- Add or update a unit test to verify that asset events are returned in ascending timestamp order, ensuring the new ordering clause works as intended.
.order_by(AssetEvent.timestamp.asc())
eb33a83 to
dc6e838
Compare
dc6e838 to
f25b682
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
Lee-W
approved these changes
Aug 13, 2025
Backport failed to create: v3-0-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker c8336ec v3-0-testThis should apply the commit to the v3-0-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continue |
kaxil
pushed a commit
that referenced
this pull request
Aug 13, 2025
54 tasks
meldiner
pushed a commit
to faros-ai/airflow
that referenced
this pull request
Feb 6, 2026
closes: apache#52230 This change is adding ordering for selecting asset events to maintain the ordering. (cherry picked from commit c8336ec)
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.
closes: #52230
This change is adding ordering for selecting asset events to maintain the ordering.