rbankston opened a new issue #15234:
URL: https://github.com/apache/airflow/issues/15234
**Apache Airflow version**: 2.0.0
**Kubernetes version (if you are using kubernetes)** (use `kubectl
version`): Kubernetes 1.20.2
**Environment**: Debian Buster image running in Kubernetes 1.20.2
- **Cloud provider or hardware configuration**: Ubuntu on VMware on premise
- **OS** (e.g. from /etc/os-release): Buster
- **Kernel** (e.g. `uname -a`):4.15.0-129-generic
- **Install tools**: Docker with a helm chart
**What happened**: After enabling an SMTP back end and setting my DAG to
notify on failure with
```
'email_on_failure': True,
'email_on_retry': True,
'email': '<my email>'
```
The email is sent and the Mark success portion fails with a 404
**What you expected to happen**: When clicking the Mark Success link, expect
the link to mark the DAG as a success and forward on to some where in the
Airflow UI
**How to reproduce it**: Enable email on your server and have a DAG that
fails. Click the link in the email
As minimally and precisely as possible. Keep in mind we do not have access
to your cluster or dags.
Enable an SMTP connection for alerts. Use this DAG to always fail
Failure Dag:
```
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.bash_operator import BashOperator
from airflow.operators.python_operator import PythonOperator
from airflow.version import version
from datetime import datetime, timedelta
def error_function():
raise Exception('Something wrong')
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'email_on_failure': True,
'email_on_retry': True,
'email': '<your email>',
'retries': 0,
'retry_delay': timedelta(minutes=5)
}
with DAG('failure_dag',
start_date=datetime(2019, 1, 1),
max_active_runs=3,
schedule_interval=timedelta(minutes=30), #
https://airflow.apache.org/docs/stable/scheduler.html#dag-runs
default_args=default_args,
catchup=False) as dag:
t0 = PythonOperator(
task_id='failing_task',
python_callable=error_function
)
```
Receive the email and then click the Mark Success link generated from the
method
[here](https://github.com/apache/airflow/blob/bc5ced3e54b3cf855808e04f09543159fd3fa79f/airflow/models/taskinstance.py#L531-L543)
**Anything else we need to know**:
How often does this problem occur: Every time the link is created in email
Possible Causes: The mark success view requires a POST request but the link
produces a GET request.
@ephraimbuddy
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]