Uh oh!
There was an error while loading. Please reload this page.
fix: read alert pipelines that carry an if condition - #163
Merged
Conversation
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.Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Bumps go-flashduty to v0.14.2, which decodes
rules[].ifandalert_inhibit.source_filtersas the flat AND-lists the server actually returns.Before this,
alert pipeline-info/alert pipeline-listfailed outright on any integration whose pipeline had anifcondition:Since
pipeline-upsertreplaces the whole pipeline and so must be preceded by a read, that made those pipelines unreachable from the CLI entirely.Cards carried the same wrong shape
alert.mdclaimed both fields were OR-of-AND trees. They are flat AND-lists — the nesting belongs to the silence / inhibit / drop / escalation families only.alert.mddescribedsettings.title/settings.descriptionas<template>without saying what a template is. Now documents the[TPL]prefix,${label}and{{.Labels.x}}substitution, the bare::title form, and thatdescription_resetwithout[TPL]is a silent no-op.filters.mdlisted alert pipeline among the OR-of-AND families; split out with a pointer to the flat shape.Also from the v0.14.2 bump
channel unsubscribe-rule-create/-updatelose--priority— drop rules have no priority server-side.duty_version.Verification
Against a live integration, with a rule carrying an
ifcondition:make fmt testgreen;make check-cardsgreen.