Skip to content

Commit

Permalink
Add instance_config to server-info endpoint output when in multi-…
Browse files Browse the repository at this point in the history
…tenant mode + fix tests wait for config (#6891)
  • Loading branch information
jaclarke authored Feb 20, 2024
1 parent f360342 commit 90b8b46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions edb/server/tenant.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,8 @@ def get_debug_info(self) -> dict[str, Any]:
suggested_client_pool_size=self._suggested_client_pool_size,
tenant_id=self._tenant_id,
),
instance_config=config.debug_serialize_config(
self.get_sys_config()),
user_roles=self._roles,
pg_addr={
k: v for k, v in self.get_pgaddr().items() if k not in ["ssl"]
Expand Down
6 changes: 3 additions & 3 deletions edb/testbase/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ async def _wait_for_db_config(
path="server-info",
)
data = json.loads(rdata)
if 'databases' not in data:
# multi-tenant instance - use the first tenant
data = next(iter(data['tenants'].values()))
if instance_config:
config = data['instance_config']
else:
if 'databases' not in data:
# multi-tenant instance - use the first tenant
data = next(iter(data['tenants'].values()))
config = data['databases'][dbname]['config']
if config_key not in config:
raise AssertionError('database config not ready')
Expand Down

0 comments on commit 90b8b46

Please sign in to comment.