Skip to content

Commit 59da9af

Browse files
committed
Remove new exposure of plugins
1 parent 298cdd9 commit 59da9af

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

temporalio/client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,6 @@ def api_key(self, value: Optional[str]) -> None:
350350
self.service_client.config.api_key = value
351351
self.service_client.update_api_key(value)
352352

353-
@property
354-
def plugins(self) -> Sequence[Plugin]:
355-
"""Plugins used by this client."""
356-
return self._config["plugins"]
357-
358353
# Overload for no-param workflow
359354
@overload
360355
async def start_workflow(

temporalio/worker/_worker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ def __init__(
376376
f"The same plugin type {type(client_plugin)} is present from both client and worker. It may run twice and may not be the intended behavior."
377377
)
378378
plugins = plugins_from_client + list(plugins)
379-
config["plugins"] = plugins
380379

381380
self.plugins = plugins
382381
for plugin in plugins:
@@ -557,7 +556,9 @@ def check_activity(activity):
557556
)
558557

559558
worker_plugins = [plugin.name() for plugin in config.get("plugins", [])]
560-
client_plugins = [plugin.name() for plugin in config["client"].plugins]
559+
client_plugins = [
560+
plugin.name() for plugin in config["client"].config()["plugins"]
561+
]
561562
plugins = list(set(worker_plugins + client_plugins))
562563

563564
# Create bridge worker last. We have empirically observed that if it is

tests/test_plugins.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ async def test_worker_plugin_basic_config(client: Client) -> None:
152152
)
153153
task_queue = worker.config().get("task_queue")
154154
assert task_queue is not None and task_queue.startswith("replaced_queue")
155-
assert [p.name() for p in worker.config().get("plugins", [])] == [
156-
MyWorkerPlugin().name()
157-
]
158155

159156
# Test client plugin propagation to worker plugins
160157
new_config = client.config()
@@ -165,9 +162,6 @@ async def test_worker_plugin_basic_config(client: Client) -> None:
165162
)
166163
task_queue = worker.config().get("task_queue")
167164
assert task_queue is not None and task_queue.startswith("combined")
168-
assert [p.name() for p in worker.config().get("plugins", [])] == [
169-
MyCombinedPlugin().name()
170-
]
171165

172166
# Test both. Client propagated plugins are called first, so the worker plugin overrides in this case
173167
worker = Worker(
@@ -178,10 +172,6 @@ async def test_worker_plugin_basic_config(client: Client) -> None:
178172
)
179173
task_queue = worker.config().get("task_queue")
180174
assert task_queue is not None and task_queue.startswith("replaced_queue")
181-
assert [p.name() for p in worker.config().get("plugins", [])] == [
182-
MyCombinedPlugin().name(),
183-
MyWorkerPlugin().name(),
184-
]
185175

186176

187177
async def test_worker_duplicated_plugin(client: Client) -> None:

0 commit comments

Comments
 (0)