Currently we use execution-date when generating the command to send via executor in https://github.com/apache/airflow/blob/9c94b72d440b18a9e42123d20d48b951712038f9/airflow/models/taskinstance.py#L420-L436

We should replace the execution_date in their to run_id instead and handle the corresponding changes needs on the executor and worker.
tests/models/test_taskinstance.py
with dag_maker(dag_id='test_failure_email'):
            task = BashOperator(
                task_id='test_email_alert_with_config',
                bash_command='exit 1',
                email='to',
            )
        dag_maker.create_dagrun()
        ti = TI(task=task, execution_date=timezone.utcnow())
        opener = mock_open(read_data='template: {{ti.task_id}}')
        with patch('airflow.models.taskinstance.open', opener, create=True):
            try:
                ti.run()
            except AirflowException:
                pass
        (email, title, body), _ = mock_send_email.call_args
        assert email == 'to'
        assert 'template: test_email_alert_with_config' == title
        assert 'template: test_email_alert_with_config' == body
    def test_set_duration(self):