rgw/admin: support placement-tags for user creation/modification #1290
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 370 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.354
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1290"
general
weight: 0.35
ideepika
User.PlacementTagswas declared as[]interface{}and excluded fromthe accepted-fields list passed to
valueToURLParamsin bothCreateUserandModifyUser, so it was effectively a dead field —setting it never reached the RGW admin ops API.
This changes
PlacementTagsto[]string(tags are always strings inthe admin ops API), adds
placement-tagsto the accepted fields forCreateUser/ModifyUser, and updatesgetReflectin utils.go toencode a string-slice field as a single comma-separated URL param
(e.g.
placement-tags=fast,ssd).This single-value, comma-separated encoding is required by the server:
RGWOp_User_Create::execute()inrgw_rest_user.ccreadsplacement-tagsviaRESTArgs::get_string()into onestd::stringand splits it on
,.RGWHTTPArgsstores query params in astd::map<std::string,std::string>, so repeatedplacement-tags=...params would silently overwrite each other and only the last tag would
ever reach the server — verified this against the Ceph source and with
a live RGW integration test before settling on this approach.
Tests added:
TestValueToURLParams(utils_test.go): table cases coveringplacement-tags encoding (present and empty).
TestUser(user_test.go, live-cluster integration suite): createwith placement-tags, fetch and verify round-trip, and a dedicated
modify-placement-tags case that re-fetches to confirm persistence.
Checklist
<!--
Thank you for opening a pull request. Please provide:
"""
[topic]: [short description]
[Longer description]
Signed-off-by: [Your Name] <[your email]>
"""
Topic will generally be the go ceph package dir you are working in.
-->
Checklist
//go:build ceph_previewmake api-updateto record new APIsNew or infrequent contributors may want to review the go-ceph Developer's Guide including the section on how we track API Status and the API Stability Plan.
The go-ceph project uses mergify. View the mergify command guide for information on how to interact with mergify. Add a comment with
@Mergifyiorebaseto rebase your PR when github indicates that the PR is out of date with the base branch.