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

Avoid calling DAG.following_schedule() for TaskInstance.get_template_context() #20486

Merged
merged 2 commits into from Dec 28, 2021

Conversation

uranusjr
Copy link
Member

This can use a more modern mechanism since get_template_context() has enough context (namely, the current data interval).

Fix #20475.

This can use a more modern mechanism since get_template_context() has
enough context (namely, the current data interval).
@uranusjr
Copy link
Member Author

uranusjr commented Dec 24, 2021

I should add tests for this and all other context variables. Done

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@potiuk potiuk added this to the Airflow 2.2.4 milestone Dec 28, 2021
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Dec 28, 2021
@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.

@potiuk potiuk merged commit 9e315ff into apache:main Dec 28, 2021
@uranusjr uranusjr deleted the context-never-calls-deprecated branch January 3, 2022 14:25
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Jan 20, 2022
jedcunningham pushed a commit that referenced this pull request Jan 21, 2022
…context() (#20486)

This can use a more modern mechanism since get_template_context() has
enough context (namely, the current data interval).

(cherry picked from commit 9e315ff)
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.

Custom Timetable error with CeleryExecutor
3 participants