-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ResponseOps][Alerting] Decouple feature IDs from consumers #183756
Changes from 175 commits
ed3015e
82a1a65
c8ec120
1a02609
55f91fd
b3cea58
5184d21
3b7c89f
b1a0a63
8b5fd17
ac46730
c88e147
b69bff1
e7363b1
e1b9845
41e5491
a2b73f9
0bb255b
4c0c828
736a63e
0a6261e
c4094d0
516ac6c
83a8d41
c3b93c8
05f858e
7578b2b
835315f
c28823b
9915f67
7a66de3
87e0ef2
0251d48
9f84b35
4ff4c02
1bd6287
5d8065f
df5ed40
291b016
14cd879
9a4ddc0
9c6d2cc
85ccea0
6f65625
0c50971
49570ae
44cc854
5140a06
c2371d0
3d89a36
cca6966
52b472b
8ac5324
42c734a
a5335df
e19424d
cc944b0
c8fcf38
50c2812
fb38a4c
e40682c
90a225a
af70fd4
4efcced
11d50be
824c3b1
22cbb1e
d37760b
885d158
f155d55
2f8c646
c68f141
01fa579
f69402e
9389991
218eb3e
b47ab8d
cb84ab4
fcc6a48
f18ed29
e353051
3f1fc68
1c19bed
d2bb1d0
fdefdb6
c9a347e
fcb0cb7
cc2da8f
b7a68a2
8f4f1e0
fa0439f
4532eff
4129b93
fdd178a
1d5f50f
e09a12c
c27937f
29b3b8d
c1be282
46097ff
6005315
00db4c3
e0a9061
bd2827f
45fd8e4
bdc95c5
ddefd3b
8589fb5
b342221
60fa3aa
34bbac8
d2d9c27
a0b9b02
b284fda
301559e
ed02cad
b59577d
60292a6
e55e4e7
0430634
de75f29
eaf3376
3d9038d
d2e83a0
bb93726
4a03696
f5adf3e
e0aff95
5ca68f4
06b3f74
cd61a88
cfdb8a9
ef72303
ffbf250
31af86c
9870997
21201f1
c0a3b79
8e33dcc
8fe6190
963f4e9
005375d
a200984
24ec594
c33aaad
1f1ce53
9618c26
16cdf79
0ad199b
b0892c6
ba9bba3
cddb402
3bea3f5
0c5fabd
a42d662
a41e4a3
ad42ff1
31d2091
1c87365
c11de49
4d8afa9
b5d3015
a3faee6
11a171a
ec97660
5ad2a2c
4292a9b
10de2bf
6b8f1e7
2de3d0d
339de48
9e8e407
1e100de
c30b3e4
2b48809
3ef8d84
25738a4
65312aa
93f5962
1cf5ecc
2112262
734b9a2
5162350
f188d6a
66ca6c4
a70077a
77dbef8
8f9381a
ce8db3c
d666a2f
e3c4a60
887a58d
3c0b3cc
ed6b9c6
00b50fd
3bd91a6
850ef24
46b978e
c39f011
911a41b
7564ac5
52c76c9
3f3a91f
b8dc926
fa2a75b
c0d43f8
1ed4c79
6d984e0
9432aa3
643e04f
7758052
e7afb8e
a0c2dab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not understand why this was generated. Any ideas? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why this was generated for this PR. This is auto-generating an alerts schema for the Line 187 in 55da11e
It looks like the test Line 59 in 55da11e
/api/alerting/rule_types API so perhaps there was a bug before that prevented this rule type from being returned in the API?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yea, i just tried it out and on |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
// ---------------------------------- WARNING ---------------------------------- | ||
// this file was generated, and should not be edited by hand | ||
// ---------------------------------- WARNING ---------------------------------- | ||
import * as rt from 'io-ts'; | ||
import { Either } from 'fp-ts/lib/Either'; | ||
import { AlertSchema } from './alert_schema'; | ||
import { EcsSchema } from './ecs_schema'; | ||
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/; | ||
export const IsoDateString = new rt.Type<string, string, unknown>( | ||
'IsoDateString', | ||
rt.string.is, | ||
(input, context): Either<rt.Errors, string> => { | ||
if (typeof input === 'string' && ISO_DATE_PATTERN.test(input)) { | ||
return rt.success(input); | ||
} else { | ||
return rt.failure(input, context); | ||
} | ||
}, | ||
rt.identity | ||
); | ||
export type IsoDateStringC = typeof IsoDateString; | ||
export const schemaUnknown = rt.unknown; | ||
export const schemaUnknownArray = rt.array(rt.unknown); | ||
export const schemaString = rt.string; | ||
export const schemaStringArray = rt.array(schemaString); | ||
export const schemaNumber = rt.number; | ||
export const schemaNumberArray = rt.array(schemaNumber); | ||
export const schemaDate = rt.union([IsoDateString, schemaNumber]); | ||
export const schemaDateArray = rt.array(schemaDate); | ||
export const schemaDateRange = rt.partial({ | ||
gte: schemaDate, | ||
lte: schemaDate, | ||
}); | ||
export const schemaDateRangeArray = rt.array(schemaDateRange); | ||
export const schemaStringOrNumber = rt.union([schemaString, schemaNumber]); | ||
export const schemaStringOrNumberArray = rt.array(schemaStringOrNumber); | ||
export const schemaBoolean = rt.boolean; | ||
export const schemaBooleanArray = rt.array(schemaBoolean); | ||
const schemaGeoPointCoords = rt.type({ | ||
type: schemaString, | ||
coordinates: schemaNumberArray, | ||
}); | ||
const schemaGeoPointString = schemaString; | ||
const schemaGeoPointLatLon = rt.type({ | ||
lat: schemaNumber, | ||
lon: schemaNumber, | ||
}); | ||
const schemaGeoPointLocation = rt.type({ | ||
location: schemaNumberArray, | ||
}); | ||
const schemaGeoPointLocationString = rt.type({ | ||
location: schemaString, | ||
}); | ||
export const schemaGeoPoint = rt.union([ | ||
schemaGeoPointCoords, | ||
schemaGeoPointString, | ||
schemaGeoPointLatLon, | ||
schemaGeoPointLocation, | ||
schemaGeoPointLocationString, | ||
]); | ||
export const schemaGeoPointArray = rt.array(schemaGeoPoint); | ||
// prettier-ignore | ||
const ObservabilityThresholdAlertRequired = rt.type({ | ||
}); | ||
// prettier-ignore | ||
const ObservabilityThresholdAlertOptional = rt.partial({ | ||
'kibana.alert.context': schemaUnknown, | ||
'kibana.alert.evaluation.threshold': schemaStringOrNumber, | ||
'kibana.alert.evaluation.value': schemaStringOrNumber, | ||
'kibana.alert.evaluation.values': schemaStringOrNumberArray, | ||
'kibana.alert.group': rt.array( | ||
rt.partial({ | ||
field: schemaStringArray, | ||
value: schemaStringArray, | ||
}) | ||
), | ||
}); | ||
|
||
// prettier-ignore | ||
export const ObservabilityThresholdAlertSchema = rt.intersection([ObservabilityThresholdAlertRequired, ObservabilityThresholdAlertOptional, AlertSchema, EcsSchema]); | ||
// prettier-ignore | ||
export type ObservabilityThresholdAlert = rt.TypeOf<typeof ObservabilityThresholdAlertSchema>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why this was generated.