-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix SMTP email template when mark_success_url is undefined for RuntimeTaskInstance objects #54680
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 SMTP email template when mark_success_url is undefined for RuntimeTaskInstance objects #54680
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
|
Would it be possible to add a unit test ? |
I don't think that's necessary for this change. I just added some guard rails with an existence check, if there are already some unit tests for the |
…eTaskInstance objects
Na.. It's ok . Templating is not as crucial to be tested. |
Okay, I guess it's ready to be merged now. |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
…eTaskInstance objects (apache#54680)
Closes: #53135
Added an existence check for
mark_success_urlin the default SMTP html template.The
TaskInstanceclass properly defines amark_success_urlproperty, while theRuntimeTaskInstanceclass used during task execution does not. This results in anUndefinedErrorwhen the email template tries to accessti.mark_success_urlon aRuntimeTaskInstanceobject.This change makes sure:
TaskInstanceobjects (which have the property)RuntimeTaskInstanceobjects (which don't have the property)