Repository navigation
tentacle: pybind/mgr: update modules to use independent CLICommand subtypes with distinct COMMAND attributes - #67511
Merged
Conversation
NitzanMordhai
force-pushed
the
wip-66467-tentacle
branch
from
February 26, 2026 16:27
ad98fc8 to
e05c5f5
Compare
NitzanMordhai
force-pushed
the
wip-66467-tentacle
branch
2 times, most recently
from
March 2, 2026 09:34
ceae8d4 to
d67297d
Compare
This was referenced Mar 22, 2026
NitzanMordhai
marked this pull request as ready for review
April 6, 2026 14:48
Contributor
Author
|
jenkins test make check |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
NitzanMordhai
force-pushed
the
wip-66467-tentacle
branch
2 times, most recently
from
April 16, 2026 17:15
5fb972e to
dd13111
Compare
Signed-off-by: Samuel Just <[email protected]> (cherry picked from commit ff86398)
…obals Otherwise, the class members on MgrModule and CLICommand are global to all modules in the same interpreter. Following commits will introduce a per-module CLICommand types for each module. Signed-off-by: Samuel Just <[email protected]> (cherry picked from commit 2d79ae6)
The next commit will introduce module specific CLICommand classes. Signed-off-by: Samuel Just <[email protected]> (cherry picked from commit 9099c68)
orchestrator and cephadm relied on CLICommandMeta to bypass the global behavior of CLICommand. That is no longer a problem, so replace CLICommandMeta with OrchestratorCLICommandBase to preserve the magic error wrapping. Signed-off-by: Samuel Just <[email protected]> (cherry picked from commit 776abe4)
NitzanMordhai
force-pushed
the
wip-66467-tentacle
branch
from
April 16, 2026 17:20
dd13111 to
0fdac39
Compare
Member
|
retest this please |
NitzanMordhai
force-pushed
the
wip-66467-tentacle
branch
from
April 17, 2026 06:08
0fdac39 to
8fe871f
Compare
Signed-off-by: Samuel Just <[email protected]> (cherry picked from commit a58d20c)
…Command Signed-off-by: Samuel Just <[email protected]> (cherry picked from commit d8acddc)
Also moves Command from mgr_module to DBCommand in dashboard/cli.py since dashboard is the only user and this way it can directly use DBCLICommand. Signed-off-by: Samuel Just <[email protected]> (cherry picked from commit 9fe5a64)
Signed-off-by: Samuel Just <[email protected]> (cherry picked from commit 4aa9e24) Conflicts: - src/pybind/mgr/prometheus/module.py CLIReadCommand/CLIWriteCommand removed from imports, not yet in tentacle - kept tentacle version - src/pybind/mgr/orchestrator/module.py _cert_store_key_ls, _cert_store_cert_ls - signature changed in main, kept tentacle version _cert_store_entity_ls - function renamed in main, kept tentacle name _cert_store_entity_ls - function name changed in main but not in tentacle - src/pybind/mgr/smb/cli.py typing imports differ between main and tentacle - manually reconciled error_wrapper not backported to tentacle - removed from cherry-pick - src/pybind/mgr/mirroring/module.py import differs between main and tentacle - manually kept tentacle imports - src/pybind/mgr/pg_autoscaler/module.py get_scaling_threshold not backported to tentacle - removed that change
NitzanMordhai
force-pushed
the
wip-66467-tentacle
branch
from
April 17, 2026 06:13
8fe871f to
bb69cca
Compare
Contributor
Author
|
jenkins test make check |
Contributor
Author
|
jenkins test windows |
Contributor
Author
|
jenkins test docs |
Member
|
jenkins test make check |
Member
|
jenkins test docs |
Member
|
Contributor
|
We need to backport #67254. |
After commit 4aa9e24, mgr modules migrated from using a class-level COMMANDS list to decorator-based command registration using per-module CLICommand instances (e.g., @BalancerCLICommand.Read('balancer status')). This broke the ceph_commands.py Sphinx extension which was hardcoded to expect m.COMMANDS to be a list, causing documentation builds to fail. But not all modules are using this per-module CLICommand. Some modules are fully migrated (balancer, hello, etc.) and use decorators, while others are partially migrated (volumes, progress, stats, influx, k8sevents, osd_perf_query, osd_support) - they have CLICommand defined but still use the old COMMANDS list. This fix updates _collect_module_commands() to handle three scenarios: 1. Fully migrated modules: Check CLICommand.dump_cmd_list() and use it if it returns commands 2. Partially migrated modules: Fall back to the old COMMANDS list if dump_cmd_list() returns empty 3. Legacy modules: Use COMMANDS list if CLICommand doesn't exist This ensures the Sphinx extension works with modules in any migration state, maintaining backwards compatibility while supporting the new decorator pattern. Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 77efb41)
4 of 14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #66467 and #67254