Description Scope
Target
Change
DTO
common/dto/manager/v2/prometheus_query_preset/request.py — 3 fields
Adapter
manager/api/adapters/prometheus_query_preset/adapter.py — 3 branches; manager/api/adapters/idle_checker/adapter.py — 1 branch
Note
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 prometheus-query-preset update: field omitted → unchanged, null → cleared, value → updated
JIRA Issue: BA-7744
Reactions are currently unavailable
You can’t perform that action at this time.
Scope
common/dto/manager/v2/prometheus_query_preset/request.py— 3 fieldsmanager/api/adapters/prometheus_query_preset/adapter.py— 3 branches;manager/api/adapters/idle_checker/adapter.py— 1 branchNote
common/dto/manager/prometheus_query_preset/request.py. The 3 fields in the DTO above remain.Common 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 prometheus-query-preset update: field omitted → unchanged,null→ cleared, value → updatedJIRA Issue: BA-7744