Skip to content

Commit 2b706f0

Browse files
committed
fix(BA-2752): Move incorrectly placed agent config
This change moves any incorrectly placed agent config into the correct location. Correct here means that the shared configs are supposed to be shared, and per-agent unique fields are placed in the overridables classes. This change also fixes a pre-existing issue with how scaling group is updated, where the local config stored in the agent server is updated, but the change does not get propagated to the individual AbstractAgent. This issue already existed, but prior to this change this PR also did not address it. This change fixes it.
1 parent 57643a1 commit 2b706f0

File tree

3 files changed

+86
-263
lines changed

3 files changed

+86
-263
lines changed

src/ai/backend/agent/agent.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,11 @@ def reset_port_pool(self, used_ports: Iterable[int]) -> None:
15201520
}
15211521
self.port_pool = original_port_pool
15221522

1523+
def update_scaling_group(self, scaling_group: str) -> None:
1524+
self.local_config = self.local_config.with_updates(
1525+
agent_update={"scaling_group": scaling_group}
1526+
)
1527+
15231528
async def purge_containers(self, containers: Iterable[ContainerKernelId]) -> None:
15241529
tasks = [self._purge_container(container) for container in containers]
15251530
await asyncio.gather(*tasks, return_exceptions=True)

0 commit comments

Comments
 (0)