[SLO] Allow null values for maxBurnRateThreshold (#161268)

## Summary

This PR fixes #161101 by changing the server side validation to allow a
null value for `maxBurnRateThreshold`. This value is only used on the
client side to display the `X hours until error budget exhaustion.`
message. This value is also used in the client validation but due to the
architecture of how client side validation works, we have to add this to
the params.
This commit is contained in:
Chris Cowan 2023-07-06 07:59:01 -06:00 committed by GitHub
parent c843c97193
commit 7b86444a4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ const durationSchema = schema.object({
const windowSchema = schema.object({
id: schema.string(),
burnRateThreshold: schema.number(),
maxBurnRateThreshold: schema.number(),
maxBurnRateThreshold: schema.nullable(schema.number()),
longWindow: durationSchema,
shortWindow: durationSchema,
actionGroup: schema.string(),

View file

@ -25,7 +25,7 @@ export enum AlertStates {
export interface WindowSchema {
id: string;
burnRateThreshold: number;
maxBurnRateThreshold: number;
maxBurnRateThreshold: number | null;
longWindow: { value: number; unit: string };
shortWindow: { value: number; unit: string };
actionGroup: string;