Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-09-15 Thread via GitHub


zachliu commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3294637050

   > > just a heads-up, this fix is in `apache-airflow-providers-smtp==2.2.1` 
yet the [airflow 3.0.6 
constraints](https://raw.githubusercontent.com/apache/airflow/constraints-3.0.6/constraints-3.12.txt)
 still uses 2.2.0 😿
   > 
   > Constraints are fixed at release time and almost never change. You can 
generate your own constraints file. It's pretty easy.
   
   that's okay though. what's more interesting is i didn't realize 
`mark_success_url` is the same as `log_url`...
   glad we just deprecated the former 🚀 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-09-11 Thread via GitHub


eladkal commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3283463602

   > just a heads-up, this fix is in `apache-airflow-providers-smtp==2.2.1` yet 
the [airflow 3.0.6 
constraints](https://raw.githubusercontent.com/apache/airflow/constraints-3.0.6/constraints-3.12.txt)
 still uses 2.2.0 😿
   
   Constraints are fixed in release time and almost never change.
   You can generate your own constraints file. It's pretty easy.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-09-11 Thread via GitHub


zachliu commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3283456410

   just a heads-up, this fix is in `apache-airflow-providers-smtp==2.2.1` yet 
the [airflow 3.0.6 
constraints](https://raw.githubusercontent.com/apache/airflow/constraints-3.0.6/constraints-3.12.txt)
 still uses 2.2.0 😿 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-08-22 Thread via GitHub


potiuk closed issue #53135: RuntimeTaskInstance object' has no attribute 
'mark_success_url'
URL: https://github.com/apache/airflow/issues/53135


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-08-12 Thread via GitHub


ersalil commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3178706767

   I was able to work around the issue by overriding the default template in 
SmtpNotifier and providing a custom html_content.
   
   Here’s an example snippet you can add to your DAG:
   ```
   # Custom SMTP notifier
   failure_notifier = SmtpNotifier(
   to=["[email protected]"],
   subject="Airflow Task Failed: {{ ti.task_id }} in DAG {{ ti.dag_id }}",
   html_content="""
   Airflow Task Failure
   DAG: {{ ti.dag_id }}
   Task: {{ ti.task_id }}
   Execution Date: {{ ts }}
   Log URL: {{ ti.log_url 
}}
   """
   )
   ```
   Use the notifier in default_args
   ```
   default_args = {
   "on_failure_callback": failure_notifier,
   }
   
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-08-12 Thread via GitHub


gbonazzoli commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3178142353

   In Airflow 3.0.4 with `SmtpNotifier` and the configuration written down to 
`smtp_default` (in the Extra Fields), **it works !!!**
   
   https://github.com/user-attachments/assets/7cbfe6b9-16a8-45ba-bc08-6a04bdcb2899";
 />
   
   I do not know if it works also in previous versions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-08-11 Thread via GitHub


dshvedchenko commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3176233748

   or copy default templates to inlcude and refer to them from 
   
   https://github.com/user-attachments/assets/837917f6-3823-48a8-804d-292f81f50f87";
 />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-08-02 Thread via GitHub


gbonazzoli commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3146960355

   In Airflow 3.0.3, as work around, you can use the following recipe.
   
   Go to the root of the airflow installed package, in my installation is:
   
   ```bash
   cd /root/venv/lib/python3.12/site-packages/airflow
   ```
   
   and edit the default html email template with:
   
   ```bash
   vi ./providers/smtp/notifications/templates/email.html
   ```
   
   and delete the lines that refer to `mark_success_url`.
   
   By the way in Airflow 3.0.3 the configuration written down in airflow.cfg 
regarding custom email template is completely ignored (see my previous post on 
this #53135).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-08-02 Thread via GitHub


gbonazzoli commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3146952589

   @eladkal 
   
   In Airflow 3.0.3 the problem arises also using SmtpNotifier:
   
   ```python
   email_notifier = SmtpNotifier(to=['[email protected]'])
   
   default_args = {
   'owner': 'gbonazzoli',
   'retries': 0,
   'start_date' : datetime(2023, 7, 1, 0, 0),
   'catchup' : False,  # The catchup defines if the DAG should run for 
every interval from it’s start time until the current time or not
   'on_failure_callback': [email_notifier],
   }
   ```
   
   I can force the error with a BashOperator pointing to a non existing path 
(/usr/bin/javaZZ):
   
   ```python
   Show_Java_Version = BashOperator(
   task_id = 'Show_Java_Version',
   bash_command = '/usr/bin/javaZZ --version'
   )
   ```
   
   and the log is:
   
   ```
   [2025-08-03, 05:27:20] INFO - Connection Retrieved 'smtp_default': 
source="airflow.hooks.base"
   [2025-08-03, 05:27:20] ERROR - Failed to send notification: 
'airflow.sdk.execution_time.task_runner.RuntimeTaskInstance object' has no 
attribute 'mark_success_url': 
source="airflow.providers.smtp.notifications.smtp.SmtpNotifier"
   UndefinedError: 'airflow.sdk.execution_time.task_runner.RuntimeTaskInstance 
object' has no attribute 'mark_success_url'
   File 
"/root/venv/lib/python3.12/site-packages/airflow/sdk/bases/notifier.py", line 
105 in __call__
   File 
"/root/venv/lib/python3.12/site-packages/airflow/providers/smtp/notifications/smtp.py",
 line 139 in notify
   File 
"/root/venv/lib/python3.12/site-packages/airflow/sdk/definitions/_internal/templater.py",
 line 121 in _do_render_template_fields
   File 
"/root/venv/lib/python3.12/site-packages/airflow/sdk/definitions/_internal/templater.py",
 line 177 in render_template
   File 
"/root/venv/lib/python3.12/site-packages/airflow/sdk/bases/notifier.py", line 
57 in _render
   File 
"/root/venv/lib/python3.12/site-packages/airflow/sdk/definitions/_internal/templater.py",
 line 133 in _render
   File "/root/venv/lib/python3.12/site-packages/airflow/utils/helpers.py", 
line 244 in render_template_to_string
   File "/root/venv/lib/python3.12/site-packages/airflow/utils/helpers.py", 
line 239 in render_template
   File "", line 41 in root
   File "/root/venv/lib/python3.12/site-packages/jinja2/runtime.py", line 859 
in _fail_with_undefined_error
   ```
   
   The problem remains also if you try to force in airflow.cfg the use of 
custom templates with:
   
   ```python
   subject_template = /root/airflow/airflow.cfg.subject_template
   html_content_template = /root/airflow/airflow.cfg.html_content_template
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-07-12 Thread via GitHub


eladkal commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3064947857

   `email_on_failure` and `email` are deprecated in Airflow 3 and will be 
removed in Airflow 4.
   
   
https://github.com/apache/airflow/blob/379c478a010631aafc57f461088f965e7acda27c/task-sdk/src/airflow/sdk/bases/operator.py#L1051-L1062
   
   can you please try to use SmtpNotifier and let us know if it solves the 
problem?
   regardless it should work but migrating to SmtpNotifier can resolve your 
issue till we fix the underlying cause


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] RuntimeTaskInstance object' has no attribute 'mark_success_url' [airflow]

2025-07-10 Thread via GitHub


boring-cyborg[bot] commented on issue #53135:
URL: https://github.com/apache/airflow/issues/53135#issuecomment-3057456603

   Thanks for opening your first issue here! Be sure to follow the issue 
template! If you are willing to raise PR to address this issue please do so, no 
need to wait for approval.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]