Skip to content

Switch config update DTO to Unset #14377

Description

@wngh4628

Scope

Target Change
DTO common/dto/manager/v2/config/request.py — 1 field
Adapter None
Tests tests/unit/common/dto/manager/v2/config/test_request.py and any other SENTINEL references

Common work

  • DTO: X | Sentinel | None = Field(default=SENTINEL)X | None | Unset = Field(default=UNSET), importing from ai.backend.common.tristate.unset
  • Adapter: TriState.from_unset for nullable columns, OptionalState.from_unset for non-nullable columns
  • Unify Field(description=...) wording to "Omit to leave unchanged; null clears." (drop "null clears" for non-nullable fields)
  • Tests: SENTINELUNSET, SentinelUnset
  • News fragment changes/<PR#>.enhance.md

Done when

  • Zero Sentinel / SENTINEL references remain in this domain
  • Verified with ./bai admin config update: field omitted → unchanged, null → cleared, value → updated

JIRA Issue: BA-7752

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions