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
If a PD service has data inside svc.AlerGroupingParameters.Config.Timeout it doesn't appear to be correctly sent when updating, for example if there was an indefinite time-based alert grouping configured.
POC:
package main
import (
"context""fmt""github.com/PagerDuty/go-pagerduty"
)
var (
authToken="<REDACTED>"serviceId="<REDACTED>"
)
funcmain() {
client:=pagerduty.NewClient(authToken)
svc, err:=client.GetServiceWithContext(context.TODO(), serviceId, nil)
iferr!=nil {
panic(err)
}
// If the service has data inside svc.AlertGroupingParameters.Config.Timeout it doesn't appear to be respected, e.g.// if there was an indefinite time-based alert grouping configured.// pagerduty.AlertGroupingParameters{Type:"time", Config:(*pagerduty.AlertGroupParamsConfig)(0x140001810e0)}// pagerduty.AlertGroupParamsConfig{Timeout:0x0, Aggregate:"", Fields:[]string(nil)}_, err=client.UpdateServiceWithContext(context.TODO(), *svc)
iferr!=nil {
// Results in panic: HTTP response failed with status code 400,// message: Invalid Input Provided (code: 2001): Config is invalid.panic(err)
}
}
The text was updated successfully, but these errors were encountered:
If a PD service has data inside svc.AlerGroupingParameters.Config.Timeout it doesn't appear to be correctly sent when updating, for example if there was an indefinite time-based alert grouping configured.
POC:
The text was updated successfully, but these errors were encountered: