← Back to Pull requests

rgw/admin: support placement-tags for user creation/modification #1290

Closed
unknown closed this pull request without merging on Jul 09, 2026 12:22 UTC
View on GitHub
unknown unknown commented on Jul 02, 2026 08:21 UTC
Author

User.PlacementTags was declared as []interface{} and excluded from
the accepted-fields list passed to valueToURLParams in both
CreateUser and ModifyUser, so it was effectively a dead field —
setting it never reached the RGW admin ops API.

This changes PlacementTags to []string (tags are always strings in
the admin ops API), adds placement-tags to the accepted fields for
CreateUser/ModifyUser, and updates getReflect in utils.go to
encode 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() in rgw_rest_user.cc reads
placement-tags via RESTArgs::get_string() into one std::string
and splits it on ,. RGWHTTPArgs stores query params in a
std::map<std::string,std::string>, so repeated placement-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 covering

  • placement-tags encoding (present and empty).
  • TestUser (user_test.go, live-cluster integration suite): create

  • with placement-tags, fetch and verify round-trip, and a dedicated
    modify-placement-tags case that re-fetches to confirm persistence.

    Checklist


  • Added tests for features and functional changes

  • Public functions and types are documented
  • <!--
    Thank you for opening a pull request. Please provide:

  • A clear summary of your changes
  • Descriptive and succinct commit messages with the format:

  • """
    [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.

  • Ensure checklist items listed below are accounted for

  • -->

    Checklist


  • Added tests for features and functional changes

  • Public functions and types are documented

  • Standard formatting is applied to Go code

  • Is this a new API? Added a new file that begins with //go:build ceph_preview

  • Ran make api-update to record new APIs
  • New 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 @Mergifyio rebase to rebase your PR when github indicates that the PR is out of date with the base branch.

    Diff: 370 lines (+277 / -93) across 4 files Reviewer: ideepika Review duration: 10321m
    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
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.8% (MEDIUM) · Higher = larger blast radius
    42.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%
    Repository