Skip to content

Commit

Permalink
Remove deprecated legacy HighThroughEngine
Browse files Browse the repository at this point in the history
[sc-38557]
  • Loading branch information
khk-globus committed Jan 10, 2025
1 parent 338ff94 commit 20ee473
Show file tree
Hide file tree
Showing 31 changed files with 47 additions and 5,605 deletions.
6 changes: 6 additions & 0 deletions changelog.d/20250109_164900_kevin_remove_deprecated_htex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Removed
^^^^^^^

- Remove ``HighThroughputEngine``. This class was deprecated in :ref:`v2.27.0
<changelog-2.27.0>`. We recommend migrating relevant configurations to use
|GlobusComputeEngine|.

This file was deleted.

2 changes: 0 additions & 2 deletions compute_endpoint/globus_compute_endpoint/engines/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from .globus_compute import GlobusComputeEngine
from .globus_mpi import GlobusMPIEngine
from .high_throughput.engine import HighThroughputEngine
from .process_pool import ProcessPoolEngine
from .thread_pool import ThreadPoolEngine

Expand All @@ -9,5 +8,4 @@
"GlobusMPIEngine",
"ProcessPoolEngine",
"ThreadPoolEngine",
"HighThroughputEngine",
)
23 changes: 6 additions & 17 deletions compute_endpoint/globus_compute_endpoint/engines/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from globus_compute_common import messagepack
from globus_compute_common.messagepack.message_types import Result, Task, TaskTransition
from globus_compute_common.tasks import ActorName, TaskState
from globus_compute_endpoint.engines.high_throughput.messages import Message
from globus_compute_endpoint.exception_handling import (
get_error_string,
get_result_error_details,
Expand Down Expand Up @@ -135,22 +134,12 @@ def _unpack_messagebody(message: bytes) -> tuple[Task, str]:
-------
tuple(task, task_buffer)
"""
try:
task = messagepack.unpack(message)
if not isinstance(task, messagepack.message_types.Task):
raise CouldNotExecuteUserTaskError(
f"wrong type of message in worker: {type(task)}"
)
task_buffer = task.task_buffer
# on parse errors, failover to trying the "legacy" message reading
except (
messagepack.InvalidMessageError,
messagepack.UnrecognizedProtocolVersion,
):
task = Message.unpack(message)
assert isinstance(task, Task)
task_buffer = task.task_buffer.decode("utf-8") # type: ignore[attr-defined]
return task, task_buffer
task = messagepack.unpack(message)
if not isinstance(task, messagepack.message_types.Task):
raise CouldNotExecuteUserTaskError(
f"wrong type of message in worker: {type(task)}"
)
return task, task.task_buffer


def _call_user_function(task_buffer: str, serde: ComputeSerializer = _serde) -> str:
Expand Down
Empty file.

This file was deleted.

Loading

0 comments on commit 20ee473

Please sign in to comment.