Skip to content

rgw/radosgw-admin: extract command types into a header - #71570

Merged
anrao19 merged 1 commit into
ceph:mainfrom
RaminNietzsche:wip-rgw-admin-header-split
Oct 13, 2026
Merged

anrao19 merged 1 commit into
ceph:mainfrom
RaminNietzsche:wip-rgw-admin-header-split

Conversation

@RaminNietzsche

Copy link
Copy Markdown
Member

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 x between 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) into radosgw-admin.h so 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

  • Add src/rgw/radosgw-admin/radosgw-admin.h with SimpleCmd and rgw_admin::OPT
  • Remove those definitions from radosgw-admin.cc and include the new header
  • Qualify SimpleCmd members with std:: types for header hygiene

Testing

Local build and tests (Release, WITH_RADOSGW_RADOS=ON, vstart cluster):

  • ninja radosgw-admin
  • cram src/test/cli/radosgw-admin/help.t — passed
  • ninja ceph_test_cls_rgw_log ceph_test_cls_rgw_meta ceph_test_cls_rgw_admin_account_quota_set — built
  • Manual smoke: radosgw-admin user list, bucket list

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

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]>
@RaminNietzsche
RaminNietzsche requested a review from a team as a code owner September 6, 2026 17:36
@RaminNietzsche

Copy link
Copy Markdown
Member Author

@chardan — slice 2 of the incremental radosgw-admin landing plan (see PR description).

After #71569 (dead locals), this PR only moves SimpleCmd and rgw_admin::OPT into radosgw-admin.h. Command tables, usage text, and all handler code stay in the .cc — no modularization yet, no intended CLI/output change.

Next planned slices: per-domain .cc extractions from #71462, in small reviewable steps.

Feedback on sequencing or anything that should land before the module splits is appreciated.

@RaminNietzsche

Copy link
Copy Markdown
Member Author

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 chardan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok-- as you point out, this is reorganizing in facilitation of the other steps.

@anrao19

anrao19 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-29-10:04.

@anrao19

anrao19 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

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.
@RaminNietzsche, if no further testing needed then this can be merged

@anrao19
anrao19 merged commit 89694c5 into ceph:main Oct 13, 2026
20 checks passed

@chardan chardan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants