Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Shared plugin configs for multi-group plugins #40

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
7 changes: 4 additions & 3 deletions src/ai/backend/common/plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ def discover_plugins(
async def init(self) -> None:
hook_plugins = self.discover_plugins(self.plugin_group)
for plugin_name, plugin_entry in hook_plugins:
plugin_config = await self.etcd.get_prefix(
f"config/plugins/{self._group_key}/{plugin_name}/"
)
plugin_config = {
**(await self.etcd.get_prefix(f"config/plugins/_/{plugin_name}/")),
**(await self.etcd.get_prefix(f"config/plugins/{self._group_key}/{plugin_name}/")),
}
try:
plugin_instance = plugin_entry(plugin_config, self.local_config)
await plugin_instance.init()
Expand Down