You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/unit/common/dto/manager/v2/resource_policy/test_request.py, tests/unit/manager/api/gql/resource_policy_v2/test_max_priority.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: SENTINEL → UNSET, Sentinel → Unset
News fragment changes/<PR#>.enhance.md
Done when
Zero Sentinel / SENTINEL references remain in this domain
Verified with ./bai admin resource-policy update: field omitted → unchanged, null → cleared, value → updated
Scope
common/dto/manager/v2/resource_policy/request.py— 10 fieldsmanager/api/adapters/resource_policy/adapter.py— 10 branchestests/unit/common/dto/manager/v2/resource_policy/test_request.py,tests/unit/manager/api/gql/resource_policy_v2/test_max_priority.pyand any otherSENTINELreferencesCommon work
X | Sentinel | None = Field(default=SENTINEL)→X | None | Unset = Field(default=UNSET), importing fromai.backend.common.tristate.unsetTriState.from_unsetfor nullable columns,OptionalState.from_unsetfor non-nullable columnsField(description=...)wording to "Omit to leave unchanged; null clears." (drop "null clears" for non-nullable fields)SENTINEL→UNSET,Sentinel→Unsetchanges/<PR#>.enhance.mdDone when
Sentinel/SENTINELreferences remain in this domain./bai admin resource-policy update: field omitted → unchanged,null→ cleared, value → updatedJIRA Issue: BA-7765