Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2356,13 +2356,7 @@ def test_get_task_log(self, mock_get_kube_client, create_task_instance_of_operat
]

def test_init_does_not_create_manager_process(self):
"""
Constructing the executor must not spawn a ``multiprocessing.Manager``.

The API server builds a ``KubernetesExecutor`` purely to call ``get_task_log()`` for
RUNNING tasks and never starts it. Eagerly creating the Manager in ``__init__`` leaked an
orphaned ``serve_forever`` process per API-server worker.
Comment thread
shahar1 marked this conversation as resolved.
"""
"""Constructing the executor must not spawn a ``multiprocessing.Manager``."""
executor = KubernetesExecutor()

assert executor._manager is None
Expand Down Expand Up @@ -2391,7 +2385,6 @@ def test_end_without_start_is_noop(self):
"""``end()`` on an executor that was never started must not raise."""
executor = KubernetesExecutor()

# Must not raise even though no Manager/queues were ever created.
executor.end()

assert executor._manager is None
Expand Down Expand Up @@ -2954,7 +2947,6 @@ def test_multiple_team_executors_isolation(
team_b_executor.job_id = 2

try:
# Queues are created lazily in start(), so each team executor gets its own.
team_a_executor.start()
team_b_executor.start()

Expand Down
Loading