Skip to content
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] TypeScript checking for actionVariable definitions #62483

Closed
Zacqary opened this issue Apr 3, 2020 · 3 comments
Closed

[Alerting] TypeScript checking for actionVariable definitions #62483

Zacqary opened this issue Apr 3, 2020 · 3 comments
Labels
enhancement New value added to drive a business result estimate:small Small Estimated Level of Effort Feature:Alerting NeededFor:logs-metrics-ui Project:MoreRuleTypes Alerting team project for providing more ways to construct rules. Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture

Comments

@Zacqary
Copy link
Contributor

Zacqary commented Apr 3, 2020

Let's say we have an alert type defined with:

actionVariables: {
  context: [
    { name: 'foo', description: 'Foo' },
    { name: 'bar', description: 'Bar' },
  ]
}

and then we write code to schedule actions like:

alertInstance.scheduleActions('default', {
  foo: 1,
  baz: 2
})

Can we make TypeScript throw an error about the missing bar and the present baz? Either with full type inferencing or just disallowing us from using any types in these functions.

@Zacqary Zacqary added enhancement New value added to drive a business result Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Apr 3, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@gmmorris
Copy link
Contributor

Hi @Zacqary ,
I think this was addressed by #72716 back in July last year.

Am I right? Can this issue be closed?

@gmmorris gmmorris added Project:MoreRuleTypes Alerting team project for providing more ways to construct rules. technical debt Improvement of the software architecture and operational architecture labels Jun 30, 2021
@gmmorris gmmorris added the loe:medium Medium Level of Effort label Jul 14, 2021
@gmmorris gmmorris added the estimate:small Small Estimated Level of Effort label Aug 18, 2021
@gmmorris gmmorris removed the loe:medium Medium Level of Effort label Sep 2, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
@mikecote
Copy link
Contributor

Closing as solved with #72716.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result estimate:small Small Estimated Level of Effort Feature:Alerting NeededFor:logs-metrics-ui Project:MoreRuleTypes Alerting team project for providing more ways to construct rules. Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

5 participants