-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Set context inside templates #33645
Set context inside templates #33645
Conversation
6f52428
to
67c0ae0
Compare
ti._run_raw_task() | ||
assert ti.state == State.SUCCESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to actually run the task, or can we only test the rendering part? Less moving parts if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's implemented as setting a context for rendering templates inside _execute_task_with_callbacks
. I'm not aware perhaps, but is there a way to run _execute_task_with_callbacks
without actually running a task? Or do you think there is a better place to set up this context?
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@uranusjr thanks a lot for the review. Should someone else review it or it could be merged? |
Did. Merged. Marked for 2.7.1 |
I was actually wondering if the context should be set inside |
* Set context inside templates --------- Co-authored-by: Ivan Afonichkin <ivanafonichkin@Ivans-MacBook-Pro.local> Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> (cherry picked from commit 9fa782f)
Setting the context while rendering templates.
Closes: #33217.