Commit bbca4a6
committed
fix: read alert pipelines that carry an
Bumps go-flashduty to v0.14.2, which decodes `rules[].if` and
`alert_inhibit.source_filters` as the flat AND-lists the server actually
returns. Before this, `alert pipeline-info` and `alert pipeline-list`
failed outright on any integration whose pipeline had an `if` condition:
json: cannot unmarshal object into Go struct field
AlertPipeline.rules.if of type []FilterCondition
Since `pipeline-upsert` replaces the whole pipeline and therefore has to
be preceded by a read, that made such pipelines unreachable from the CLI
entirely.
The cards carried the same wrong shape, so fix them in the same change:
- `alert.md` said both fields were OR-of-AND trees. They are flat
AND-lists; the nesting belongs to the silence / inhibit / drop /
escalation families only.
- `alert.md` described `settings.title` / `settings.description` as
`<template>` without saying what a template is. Document the `[TPL]`
prefix, the `${label}` and `{{.Labels.x}}` substitutions, the bare
`::` title form — and that `description_reset` without `[TPL]` is a
silent no-op.
- `filters.md` listed alert pipeline among the OR-of-AND families in its
shape table; split it out.
The v0.14.2 bump also drops `--priority` from `channel unsubscribe-rule-create`
and `-update` (drop rules have no priority server-side) and adds
`duty_version` to knowledge-pack rows.if condition1 parent 4a57616 commit bbca4a6
4 files changed
Lines changed: 61 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
152 | 200 | | |
153 | 201 | | |
154 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | | - | |
| 51 | + | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| |||
0 commit comments