Fix workspace filtering logic in get_all_update_flags_status
• Handle namespaces with/without prefixes • Fix workspace matching logic
This commit is contained in:
parent
78689e8837
commit
7ed0eac4c9
1 changed files with 13 additions and 5 deletions
|
|
@ -1371,11 +1371,19 @@ async def get_all_update_flags_status(workspace: str | None = None) -> Dict[str,
|
||||||
result = {}
|
result = {}
|
||||||
async with get_internal_lock():
|
async with get_internal_lock():
|
||||||
for namespace, flags in _update_flags.items():
|
for namespace, flags in _update_flags.items():
|
||||||
namespace_split = namespace.split(":")
|
# Check if namespace has a workspace prefix (contains ':')
|
||||||
if workspace and not namespace_split[0] == workspace:
|
if ":" in namespace:
|
||||||
continue
|
# Namespace has workspace prefix like "space1:pipeline_status"
|
||||||
if not workspace and namespace_split[0]:
|
# Only include if workspace matches the prefix
|
||||||
continue
|
namespace_split = namespace.split(":", 1)
|
||||||
|
if not workspace or namespace_split[0] != workspace:
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
# Namespace has no workspace prefix like "pipeline_status"
|
||||||
|
# Only include if we're querying the default (empty) workspace
|
||||||
|
if workspace:
|
||||||
|
continue
|
||||||
|
|
||||||
worker_statuses = []
|
worker_statuses = []
|
||||||
for flag in flags:
|
for flag in flags:
|
||||||
if _is_multiprocess:
|
if _is_multiprocess:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue