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 event log] change ES access functions to use callCluster types #55644

Closed
pmuellr opened this issue Jan 23, 2020 · 3 comments
Closed
Labels
Feature:EventLog Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture

Comments

@pmuellr
Copy link
Member

pmuellr commented Jan 23, 2020

Currently all the ES calls made by event log are done via a single function:

async callEs(operation: string, body?: any): Promise<any> {
try {
this.debug(`callEs(${operation}) calls:`, body);
const result = await this.clusterClient.callAsInternalUser(operation, body);
this.debug(`callEs(${operation}) result:`, result);
return result;
} catch (err) {
this.debug(`callEs(${operation}) error:`, {
message: err.message,
statusCode: err.statusCode,
});
throw err;
}
}

This function is largely not needed in this form, it was useful during initial development to debug the calls to ES, but we can use debug logging where needed, instead.

The originating request for this came from a PR comment indicating we weren't making use of the existing callCluster type signatures. So, we'll get that back if we just start calling it directly.

Given the number of calls we are likely to have (few), we could also just write wrappers for the ones that we need ...

@pmuellr pmuellr added Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Jan 23, 2020
@elasticmachine
Copy link
Contributor

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

@mikecote mikecote added this to Bugs & Code Debt in Make it Action Jan 27, 2020
@mikecote mikecote removed this from Bugs & Tech Debt in Make it Action Jan 27, 2021
@mikecote mikecote added this to Bugs & Tech Debt in Kibana Alerting Jan 27, 2021
@YulNaumenko YulNaumenko moved this from Bugs & Tech Debt to Backlog in Kibana Alerting Mar 10, 2021
@YulNaumenko
Copy link
Contributor

@pmuellr I don't think this issue is relevant since we migrated to the new ES client and don't use callCluster

@YulNaumenko YulNaumenko added the technical debt Improvement of the software architecture and operational architecture label Mar 11, 2021
@pmuellr
Copy link
Member Author

pmuellr commented Mar 18, 2021

@YulNaumenko Ya, you're right, so closing. Thx!

@pmuellr pmuellr closed this as completed Mar 18, 2021
Kibana Alerting automation moved this from Backlog to Done (Ordered by most recent) Mar 18, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:EventLog Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture
Projects
No open projects
Kibana Alerting
Done (Ordered by most recent)
Development

No branches or pull requests

5 participants