Repository navigation
rgw/radosgw-admin: extract command types into a header - #71570
Conversation
Move SimpleCmd and the OPT command enum from radosgw-admin.cc into radosgw-admin.h so later translation units under radosgw-admin/ can share them without depending on the rest of the monolith. Keep command tables, usage text, and handler implementation in the .cc. Qualify SimpleCmd with std:: types for header hygiene. Signed-off-by: ramin.najarbashi <[email protected]>
|
@chardan — slice 2 of the incremental radosgw-admin landing plan (see PR description). After #71569 (dead locals), this PR only moves Next planned slices: per-domain Feedback on sequencing or anything that should land before the module splits is appreciated. |
|
Deferring this shared command-header slice while the CLI11 parser work in #69145 is still active. The account and user extraction slices use module-local command enums, so they do not depend on this PR. I will revisit the shared header after the parser direction is settled. |
chardan
left a comment
There was a problem hiding this comment.
Ok-- as you point out, this is reorganizing in facilitation of the other steps.
|
This PR has been added to main integration testing by anuchaithra started 2026-09-29-10:04. |
pr testing completed and approved by @ivancich, more details in : https://tracker.ceph.com/issues/81104. |
chardan
left a comment
There was a problem hiding this comment.
Not entirely a fan of SimpleCmd there (at least, I have questions), but as this is a /structural/ review that will wait for another day-- I think this is a good re-organization direction. I am partly wanting to suggest just pre-emptively putting things in a radosgw-cmds.h header, however that probably isn't quite warranted yet. It's IMO more important to get the reorganization done so such changes will be MUCH easier to focus on.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Context (incremental split from #71462)
This is slice 2 in the same incremental landing plan as #71569 and the larger modularization WIP in #71462.
After removing dead CLI locals (#71569), this change extracts shared command plumbing (
SimpleCmd,rgw_admin::OPT) intoradosgw-admin.hso follow-up PRs can add per-domain translation units without pulling in the full 12k-line.cc.No command behavior, tables, or handler bodies move yet—only type definitions.
cc @chardan — same staged approach as discussed on #71462; feedback on ordering is welcome.
Summary
src/rgw/radosgw-admin/radosgw-admin.hwithSimpleCmdandrgw_admin::OPTradosgw-admin.ccand include the new headerSimpleCmdmembers withstd::types for header hygieneTesting
Local build and tests (Release,
WITH_RADOSGW_RADOS=ON, vstart cluster):ninja radosgw-admincram src/test/cli/radosgw-admin/help.t— passedninja ceph_test_cls_rgw_log ceph_test_cls_rgw_meta ceph_test_cls_rgw_admin_account_quota_set— builtradosgw-admin user list,bucket listChecklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.