Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stray order_by(TaskInstance.execution_date) #21705

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

uranusjr
Copy link
Member

Fix #21656.

Nobody noticed this exists because the function BaseOperator.get_task_instances() is not used anywhere in the code base. But since this is public API, we should still fix it.

A quick search for order_by(TaskInstance.execution_date) and order_by(TI.execution_date) yielded no other results; this is probably the only one we missed.

@uranusjr uranusjr added this to the Airflow 2.2.5 milestone Feb 21, 2022
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Feb 21, 2022
@TidesMind
Copy link

Thank you for fixing this!

@uranusjr uranusjr force-pushed the avoid-order-by-ti-execution-date branch from e96650b to 6497ffb Compare February 22, 2022 18:27
@uranusjr uranusjr merged commit bb577a9 into apache:main Feb 22, 2022
@uranusjr uranusjr deleted the avoid-order-by-ti-execution-date branch February 22, 2022 20:12
@ashb
Copy link
Member

ashb commented Feb 23, 2022

Change looks good, but I thought this would work through theh association_proxy anyway?

Obviously not by the error report

@uranusjr
Copy link
Member Author

uranusjr commented Feb 23, 2022

filter() works, but not order_by(). There were other occurrences I fixed before 2.2 on this. It’s quite annoying (I would’ve said surprising but I know too much about SQLAlchemy to be surprised).

@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Feb 28, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 16, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 20, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 24, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Airflow >= 2.2.0 execution date change is failing TaskInstance get_task_instances method and possibly others
5 participants