diff --git a/airflow/models/taskinstance.py b/airflow/models/taskinstance.py index 7ae7ff9536724..123b4ddea38a2 100644 --- a/airflow/models/taskinstance.py +++ b/airflow/models/taskinstance.py @@ -803,13 +803,12 @@ def log_url(self): @property def mark_success_url(self): """URL to mark TI success""" - iso = quote(self.execution_date.isoformat()) base_url = conf.get('webserver', 'BASE_URL') return base_url + ( "/confirm" f"?task_id={self.task_id}" f"&dag_id={self.dag_id}" - f"&execution_date={iso}" + f"&dag_run_id={quote(self.run_id)}" "&upstream=false" "&downstream=false" "&state=success" diff --git a/tests/models/test_taskinstance.py b/tests/models/test_taskinstance.py index d104e798353d1..e53b52e11b1c3 100644 --- a/tests/models/test_taskinstance.py +++ b/tests/models/test_taskinstance.py @@ -1312,7 +1312,8 @@ def test_mark_success_url(self, create_task_instance): ) assert query['dag_id'][0] == 'dag' assert query['task_id'][0] == 'op' - assert pendulum.parse(query['execution_date'][0]) == now + assert query['dag_run_id'][0] == 'test' + assert ti.execution_date == now def test_overwrite_params_with_dag_run_conf(self, create_task_instance): ti = create_task_instance()