Skip to content

rm: make controller config metadata update atomic #10335

@okJiang

Description

@okJiang

Development Task

Follow-up from PR #10246 review discussion: #10246 (comment)

Background:
POST /resource-manager/api/v1/config/controller currently validates controller-config keys before applying updates, but value/type validation and persistence still happen one field at a time through UpdateControllerConfigItem. If a request mixes one valid field with another invalid field, an earlier field may already have been persisted before the API returns 400.

This means the API is not fully all-or-nothing from the caller's perspective, even though the current test naming and review discussion expect atomic behavior.

This task is split out from PR #10246 as a follow-up instead of blocking that PR.

Expected work:

  • make controller config metadata updates atomic from the API perspective
  • avoid partial persistence when one field in a multi-field request is invalid
  • add regression coverage for mixed valid/invalid payloads, such as a valid boolean field plus an invalid duration value

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions