diff --git a/airflow/www/views.py b/airflow/www/views.py index 8fef6aea588a1..fc65e066470ed 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -5450,7 +5450,6 @@ class TaskInstanceModelView(AirflowModelView): "action_clear": "edit", "action_clear_downstream": "edit", "action_muldelete": "delete", - "action_set_running": "edit", "action_set_failed": "edit", "action_set_success": "edit", "action_set_retry": "edit", @@ -5727,15 +5726,6 @@ def set_task_instance_state( except Exception: flash("Failed to set state", "error") - @action("set_running", "Set state to 'running'", "", single=False) - @auth.has_access_dag_entities("PUT", DagAccessEntity.TASK_INSTANCE) - @action_logging - def action_set_running(self, tis): - """Set state to 'running'.""" - self.set_task_instance_state(tis, TaskInstanceState.RUNNING) - self.update_redirect() - return redirect(self.get_redirect()) - @action("set_failed", "Set state to 'failed'", "", single=False) @auth.has_access_dag_entities("PUT", DagAccessEntity.TASK_INSTANCE) @action_logging diff --git a/tests/www/views/test_views_tasks.py b/tests/www/views/test_views_tasks.py index 8cd257d89e600..ae8ecfb78f2dc 100644 --- a/tests/www/views/test_views_tasks.py +++ b/tests/www/views/test_views_tasks.py @@ -943,13 +943,12 @@ def test_task_instance_clear_failure(admin_client): @pytest.mark.parametrize( "action, expected_state", [ - ("set_running", State.RUNNING), ("set_failed", State.FAILED), ("set_success", State.SUCCESS), ("set_retry", State.UP_FOR_RETRY), ("set_skipped", State.SKIPPED), ], - ids=["running", "failed", "success", "retry", "skipped"], + ids=["failed", "success", "retry", "skipped"], ) def test_task_instance_set_state(session, admin_client, action, expected_state): task_id = "runme_0" @@ -972,7 +971,6 @@ def test_task_instance_set_state(session, admin_client, action, expected_state): @pytest.mark.parametrize( "action", [ - "set_running", "set_failed", "set_success", "set_retry",