From 10b0a3a8a8440a41b3471e85143e32ac4cff07a1 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 11 Dec 2025 13:09:55 +0000 Subject: [PATCH] Respect conflict resolution In change I5dd9bc9743bea779ea1b4a71264c9a77c80033b3 we have started ignoring commands from plugins that have been migrated in-tree. Respect that here also. Change-Id: I70efa43341df982519afed0803a118126925e5a7 Signed-off-by: Stephen Finucane --- tests/check_osc_commands.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/check_osc_commands.py b/tests/check_osc_commands.py index 94b6d72..b98fe7d 100755 --- a/tests/check_osc_commands.py +++ b/tests/check_osc_commands.py @@ -20,6 +20,8 @@ with the purpose of detecting duplicate commands. import importlib.metadata import traceback +from openstackclient import shell + def find_duplicates(): """Find duplicates commands. @@ -60,6 +62,13 @@ def find_duplicates(): valid_cmds = {} duplicate_cmds = {} failed_cmds = {} + ignored_cmds = {} + + # TODO(stephenfin): We can remove this check once our minimum depends on + # a release including change I5dd9bc9743bea779ea1b4a71264c9a77c80033b3 + ignored_modules: tuple[str] = () + if hasattr(shell, 'IGNORED_MODULES'): + ignored_modules = shell.IGNORED_MODULES # find all modules on the system for dist in importlib.metadata.distributions(): @@ -81,6 +90,11 @@ def find_duplicates(): ep_name = ep.name.replace(' ', '_') + for ignored_module in ignored_modules: + if ep.value.startswith(ignored_module): + ignored_cmds.setdefault(ep_name, []).append(ep.group) + continue + try: ep.load() except Exception: @@ -114,6 +128,8 @@ def find_duplicates(): # Safely return False here with the full set of commands print("Final set of commands...") print(valid_cmds) + print("Ignored commands...") + print(ignored_cmds) print("Found no duplicate or overlapping commands, OK to merge!") return False