Skip to content

Commit a4dfa0b

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 9073a2f commit a4dfa0b

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
@@ -1517,6 +1517,11 @@ def reset_port_pool(self, used_ports: Iterable[int]) -> None:
15171517
}
15181518
self.port_pool = original_port_pool
15191519

1520+
def update_scaling_group(self, scaling_group: str) -> None:
1521+
self.local_config = self.local_config.with_updates(
1522+
agent_update={"scaling_group": scaling_group}
1523+
)
1524+
15201525
async def purge_containers(self, containers: Iterable[ContainerKernelId]) -> None:
15211526
tasks = [self._purge_container(container) for container in containers]
15221527
await asyncio.gather(*tasks, return_exceptions=True)

0 commit comments

Comments
 (0)