From 9203a7b7d1c0a91ef6ff63809d87600af0dd33ff Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Thu, 18 Jun 2026 10:02:54 -0500 Subject: [PATCH 1/2] Update CODEOWNERS and stabilize fusion workspace-group drop test Add @mgiannakopoulos, @volodymyr-memsql, and @pmishchenko-ua as code owners (replacing @srinathnarayanan). Make the drop-workspace-group test tolerate eventual consistency between the per-resource and list endpoints by polling until the listed group is gone or terminated, instead of asserting immediately after WAIT ON TERMINATED. Co-Authored-By: Claude Opus 4.7 --- CODEOWNERS | 4 +++- singlestoredb/tests/test_fusion.py | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index b3710ddfe..34f596363 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,4 @@ * @kesmit13 -* @srinathnarayanan +* @mgiannakopoulos +* @volodymyr-memsql +* @pmishchenko-ua diff --git a/singlestoredb/tests/test_fusion.py b/singlestoredb/tests/test_fusion.py index 9f25f0cfa..1295cd87f 100644 --- a/singlestoredb/tests/test_fusion.py +++ b/singlestoredb/tests/test_fusion.py @@ -417,6 +417,22 @@ def test_create_drop_workspace(self): f'in group "A Fusion Testing {self.id}"', ) + def _wait_workspace_group_gone(self, mgr, wg_name, timeout=60, interval=2): + # WAIT ON TERMINATED polls /workspaceGroups/{id}; the LIST endpoint + # /workspaceGroups can lag briefly behind it, so poll until the listed + # record is either absent or shows terminated_at. + deadline = time.time() + timeout + while True: + wg = [x for x in mgr.workspace_groups if x.name == wg_name] + if not wg or all(x.terminated_at is not None for x in wg): + return + if time.time() >= deadline: + self.fail( + f'workspace group {wg_name!r} still active in list endpoint ' + f'after {timeout}s: {wg!r}', + ) + time.sleep(interval) + def test_create_drop_workspace_group(self): mgr = s2.manage_workspaces() @@ -436,8 +452,7 @@ def test_create_drop_workspace_group(self): f'drop workspace group "{wg_name}" ' 'wait on terminated', ) - wg = [x for x in mgr.workspace_groups if x.name == wg_name] - assert len(wg) == 0 + self._wait_workspace_group_gone(mgr, wg_name) # Create it again self.cur.execute( @@ -449,8 +464,7 @@ def test_create_drop_workspace_group(self): # Drop it by ID wg_id = wg[0].id self.cur.execute(f'drop workspace group id {wg_id} wait on terminated') - wg = [x for x in mgr.workspace_groups if x.name == wg_name] - assert len(wg) == 0 + self._wait_workspace_group_gone(mgr, wg_name) # Drop non-existent with self.assertRaises(KeyError): From bedbb8c7a8bcaf107ab7ff33e23d1fdb3fa6cfa4 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Thu, 18 Jun 2026 10:11:23 -0500 Subject: [PATCH 2/2] Address PR #128 review feedback - test_fusion: filter terminated rows when asserting workspace group list count, matching the wait helper's exit condition so a lingering terminated record from the previous drop doesn't skew len(wg) == 1. - CODEOWNERS: collapse four identical '*' rules into a single rule listing all four owners; CODEOWNERS uses last-match-wins, so the prior layout only routed reviews to the last-listed owner. Co-Authored-By: Claude Opus 4.7 --- CODEOWNERS | 5 +---- singlestoredb/tests/test_fusion.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 34f596363..368e31abc 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,4 +1 @@ -* @kesmit13 -* @mgiannakopoulos -* @volodymyr-memsql -* @pmishchenko-ua +* @kesmit13 @mgiannakopoulos @volodymyr-memsql @pmishchenko-ua diff --git a/singlestoredb/tests/test_fusion.py b/singlestoredb/tests/test_fusion.py index 1295cd87f..21a15beaa 100644 --- a/singlestoredb/tests/test_fusion.py +++ b/singlestoredb/tests/test_fusion.py @@ -444,7 +444,10 @@ def test_create_drop_workspace_group(self): f'create workspace group "{wg_name}" ' f'in region "{reg.name}"', ) - wg = [x for x in mgr.workspace_groups if x.name == wg_name] + wg = [ + x for x in mgr.workspace_groups + if x.name == wg_name and x.terminated_at is None + ] assert len(wg) == 1 # Drop it by name @@ -458,7 +461,10 @@ def test_create_drop_workspace_group(self): self.cur.execute( f'create workspace group "{wg_name}" in region "{reg.name}"', ) - wg = [x for x in mgr.workspace_groups if x.name == wg_name] + wg = [ + x for x in mgr.workspace_groups + if x.name == wg_name and x.terminated_at is None + ] assert len(wg) == 1 # Drop it by ID