-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Alerting] Improved type check for action variables #86506
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
I'm already working on this as part of: #83501 |
Hey @gmmorris What I was hoping was that based on kibana/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts Lines 70 to 79 in 17443d0
I'd get suggestions for the context in kibana/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts Lines 170 to 177 in 17443d0
But even if I delete everything in |
@sqren I think this is because you're using the Rule Registry and it seems to be overwriting the generics. kibana/x-pack/plugins/rule_registry/server/utils/create_lifecycle_rule_type_factory.ts Line 35 in 17443d0
From a framework perspective, what you're asking for should already work. |
Okay, that makes sense. Thanks for the explanation. Closing. |
Type: enhancement
Priority: Low
Currently it's easy to mess up the action variables by forgetting to either
actionVariables.context
(1)alertInstance.scheduleActions
(2)✅ Correct
The following declares action variables and specifies their values correctly:
❌ Incorrect
In the following the action variable declarations don't match the values specified in
scheduleActions
:Question
Would it be possible to narrow the types for
alertInstance.scheduleActions
so that action variables declared in (1) will be required?The text was updated successfully, but these errors were encountered: