dstandish commented on code in PR #39513:
URL: https://github.com/apache/airflow/pull/39513#discussion_r1602049604
##########
tests/providers/smtp/notifications/test_smtp.py:
##########
@@ -129,7 +133,7 @@ def test_notifier_with_defaults(self, mock_smtphook_hook,
create_task_instance):
from_email=conf.get("smtp", "smtp_mail_from"),
to="[email protected]",
subject="DAG dag - Task op - Run ID test in State None",
- html_content="""<!DOCTYPE html>\n<html>\n <head>\n <meta
http-equiv="Content-Type" content="text/html; charset=utf-8" />\n <meta
name="viewport" content="width=device-width">\n </head>\n<body>\n <table
role="presentation">\n \n <tr>\n <td>Run ID:</td>\n
<td>test</td>\n </tr>\n <tr>\n <td>Try:</td>\n
<td>0 of 1</td>\n </tr>\n <tr>\n <td>Task
State:</td>\n <td>None</td>\n </tr>\n <tr>\n
<td>Host:</td>\n <td></td>\n </tr>\n <tr>\n
<td>Log Link:</td>\n <td><a
href="http://localhost:8080/dags/dag/grid?dag_run_id=test&task_id=op&map_index=-1&tab=logs"
style="text-decoration:underline;">http://localhost:8080/dags/dag/grid?dag_run_id=test&task_id=op&map_index=-1&tab=logs</a></td>\n
</tr>\n <tr>\n <td>Mark Success Link:</td>\n
<td><a href="http:
//localhost:8080/confirm?task_id=op&dag_id=dag&dag_run_id=test&upstream=false&downstream=false&state=success"
style="text-decoration:underline;">http://localhost:8080/confirm?task_id=op&dag_id=dag&dag_run_id=test&upstream=false&downstream=false&state=success</a></td>\n
</tr>\n \n </table>\n</body>\n</html>""",
+ html_content=f"""<!DOCTYPE html>\n<html>\n <head>\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width">\n </head>\n<body>\n
<table role="presentation">\n \n <tr>\n <td>Run
ID:</td>\n <td>test</td>\n </tr>\n <tr>\n
<td>Try:</td>\n <td>{NUM_TRY} of 1</td>\n </tr>\n
<tr>\n <td>Task State:</td>\n <td>None</td>\n
</tr>\n <tr>\n <td>Host:</td>\n <td></td>\n
</tr>\n <tr>\n <td>Log Link:</td>\n <td><a
href="http://localhost:8080/dags/dag/grid?dag_run_id=test&task_id=op&map_index=-1&tab=logs"
style="text-decoration:underline;">http://localhost:8080/dags/dag/grid?dag_run_id=test&task_id=op&map_index=-1&tab=logs</a></td>\n
</tr>\n <tr>\n <td>Mark Success Link:</td>\n
<td><a hr
ef="http://localhost:8080/confirm?task_id=op&dag_id=dag&dag_run_id=test&upstream=false&downstream=false&state=success"
style="text-decoration:underline;">http://localhost:8080/confirm?task_id=op&dag_id=dag&dag_run_id=test&upstream=false&downstream=false&state=success</a></td>\n
</tr>\n \n </table>\n</body>\n</html>""",
Review Comment:
if you were to inspect this ti, you would see that the ti is showing
try_number 0 because it was never scheduled, and was never run.
but this isn't a situation that would occur in real life AFAIK
let me know if have any concerns.
--
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]