Repository navigation
[BUGFIX] alertmanager: accept sortMode status in the AlertTable schema - #940
Merged
Merged
Conversation
The AlertTable editor offers a "Status (firing → resolved)" column sort mode and the runtime sorts on it, but the CUE schema only allowed alphabetical, numeric and severity, so a panel saved with this mode failed schema validation. Add "status" to the schema, the Go SDK (StatusSort) and the model docs, with a valid and an invalid schema test. Signed-off-by: Joshua (OpenClaw) <s3onghyun@users.noreply.github.com>
jgbernalp
approved these changes
Nov 16, 2026
Contributor
|
Thnx @s3onghyun ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The AlertTable column editor offers a "Status (firing → resolved)" sort mode (
ColumnSortModeinalert-table-model.tsincludes'status', andalert-table-sorting.tshandlescase 'status'), butalert-table.cueonly allowed"alphabetical" | "numeric" | "severity". A panel saved with this sort mode fails schema validation:This PR:
"status"to the AlertTablesortModeschema;StatusSortconstant to the Go SDK;statusto thesortModelist indocs/alertmanager/model.md, as noted in the [DOC] alertmanager: add plugin documentation #934 review;alert-table/tests/valid/sort-mode-status.jsonandalert-table/tests/invalid/unknown-sort-mode.json.The fixtures use the
schemas/<schema>/tests/{valid,invalid}layout from #933, with file names that don't collide with it, so the two PRs merge in either order.Tests:
percli plugin test-schemas --plugin.path=alertmanager(percli v0.55.1) passes; with the old schema, the valid fixture fails with the error above.make test-schemas-pluginspasses, andgo vetpasses on the SDK.Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes