-
Notifications
You must be signed in to change notification settings - Fork 163
feat(BA-3023): Add unified multi agent etcd client handling #6721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/BA-3026/agent-runtime
Are you sure you want to change the base?
Conversation
376a46d to
242db6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces EtcdClientRegistry, a new class designed to manage etcd clients for multiple agents within a single process. This enables clean separation of etcd client instances, each with appropriate scope prefixes for accessing agent-specific, scaling-group, and global configurations.
Key changes:
- Created
EtcdClientRegistryclass to centralize etcd client management with support for multiple agents - Refactored
AgentRPCServerto use the registry instead of a single etcd client - Updated all etcd access patterns to use either
global_etcdfor shared configuration or agent-specific clients
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/ai/backend/agent/etcd.py | New file introducing the EtcdClientRegistry class that manages etcd clients for multiple agents with proper scoping |
| src/ai/backend/agent/server.py | Refactored to use EtcdClientRegistry instead of a single AsyncEtcd instance; updated all etcd access to use appropriate client (global vs agent-specific) |
| tests/agent/test_agent.py | Updated test fixtures and mocks to use the new etcd_client_registry structure with global_etcd access pattern |
| changes/.feature.md | Added changelog entry documenting the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3318324 to
f0e60cc
Compare
242db6e to
272a4b4
Compare
f0e60cc to
ab573ad
Compare
1e4b560 to
5b9fb27
Compare
0c85e11 to
6ebc74f
Compare
7b409f1 to
daee31e
Compare
5b9fb27 to
fbe9d54
Compare
daee31e to
b96cb0b
Compare
fbe9d54 to
a7e29d5
Compare
b96cb0b to
14675fa
Compare
a7e29d5 to
0249c25
Compare
14675fa to
184737e
Compare
0249c25 to
9f6248c
Compare
184737e to
f3e6537
Compare
This change introduces AgentEtcdClientView, which is a class that acts as an adaptor layer for ensuring that the config scope of etcd is always in sync with the specific agent's scaling group and agent ID.
9f6248c to
33ecbc4
Compare
resolves #6720 (BA-3023)
This change introduces EtcdClientRegistry, which is a class that can contain etcd clients for multiple agents, each with its own prefix information at scaling group and individual node level.
Checklist: (if applicable)
ai.backend.testdocsdirectory