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

Migrates security solution usage collector es client from legacy to new #86853

Conversation

TinaHeiligers
Copy link
Contributor

@TinaHeiligers TinaHeiligers commented Dec 22, 2020

Summary

Updates the security solution usage collector fetch method's elasticsearch client to the new client provided by the usage_collector's fetch context.
Part of #86358

Checklist

For maintainers

@TinaHeiligers TinaHeiligers changed the title Refactors usage collector to use the new elasticsearch client Migrates security solution usage collector es client from legacy to new Dec 22, 2020
@TinaHeiligers TinaHeiligers marked this pull request as ready for review December 23, 2020 01:28
@TinaHeiligers TinaHeiligers requested review from a team as code owners December 23, 2020 01:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers
Copy link
Contributor Author

@michaelolo24 would you mind taking a look at these changes or redirect the PR to someone who could please?

@michaelolo24
Copy link
Contributor

@michaelolo24 would you mind taking a look at these changes or redirect the PR to someone who could please?

Will do! @rylnd should be in the loop as well

@@ -4,12 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { SearchParams } from 'elasticsearch';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing this was an accidental import @rylnd?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its use was replaced by the custom RuleSearchParams below!

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@TinaHeiligers TinaHeiligers requested a review from rylnd January 4, 2021 18:39
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the update @TinaHeiligers !

@@ -4,12 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { SearchParams } from 'elasticsearch';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its use was replaced by the custom RuleSearchParams below!

};
};
}
interface RuleSearchParams {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: since ruleSearchOptions is an internal variable and its type is already constrained by its usage I would be inclined to make its type implicit and remove RuleSearchParams. However, there's nothing wrong with the explicit interface here, either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll keep it explicit for now and leave it up to your team to remove if that's what you prefer.

@TinaHeiligers TinaHeiligers merged commit 8b26907 into elastic:master Jan 4, 2021
@TinaHeiligers TinaHeiligers deleted the security-solution-migrate-fetch-esclient branch January 4, 2021 21:17
TinaHeiligers added a commit that referenced this pull request Jan 4, 2021
…y to new (#86853) (#87237)

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 22, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants