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
According to the RuleGroup definition, the RuleGroup object inclues a title field but no name field. However, Grizzly expects the intermediate JSON representation of an AlertRuleGroup to contain a name field. As a result, processing AlertRuleGroup resources with Grizzly will fail unless a name field is manually added to the exported JSON.
This will generate a rule group:
import { RuleGroupBuilder } from "@grafana/grafana-foundation-sdk/alerting";
let rulegroup = new RuleGroupBuilder('rulegroup')
console.log(JSON.stringify(rulegroup.build(), null, 2))
Processing it with npx tsx rulegroup.ts > rulegroup.json will produce
{
"title": "rulegroup"
}
Exporting with grr export -k AlertRuleGroup rulegroup.json . will return FATAL parse error in 'rulegroup.json': UID not specified.
On the other hand, the following JSON can be exported successfully:
{
"name": "rulegroup"
}
What did you expect to happen?
A RuleGroup object defined according to specification should be exported using grizzly successfully and return AlertRuleGroup.rulegroup added.
The text was updated successfully, but these errors were encountered:
version
11.0.x
language
Describe your bug
According to the RuleGroup definition, the RuleGroup object inclues a
title
field but noname
field. However, Grizzly expects the intermediate JSON representation of an AlertRuleGroup to contain aname
field. As a result, processing AlertRuleGroup resources with Grizzly will fail unless aname
field is manually added to the exported JSON.This will generate a rule group:
Processing it with
npx tsx rulegroup.ts > rulegroup.json
will produceExporting with
grr export -k AlertRuleGroup rulegroup.json .
will returnFATAL parse error in 'rulegroup.json': UID not specified
.On the other hand, the following JSON can be exported successfully:
What did you expect to happen?
A RuleGroup object defined according to specification should be exported using grizzly successfully and return
AlertRuleGroup.rulegroup added
.The text was updated successfully, but these errors were encountered: