[Security_Solution][Endpoint] Refactor resolver generator for ancestry array#70129
Merged
jonathan-buttner merged 8 commits intoelastic:masterfrom Jul 1, 2020
Merged
Conversation
Contributor
|
Pinging @elastic/endpoint-data-visibility-team (Team:Endpoint Data Visibility) |
Contributor
|
Pinging @elastic/endpoint-app-team (Feature:Endpoint) |
| */ | ||
| public generateEvent(options: EventOptions = {}): EndpointEvent { | ||
| let ancestry: string[] | undefined; | ||
| if (options?.useAncestryArray === true || options?.ancestry !== undefined) { |
Contributor
There was a problem hiding this comment.
why do we need a useAncestryArray option separate from the ancestry option?
Contributor
Author
There was a problem hiding this comment.
Yeah good point. I'll remove it. We can accomplish the same thing with ancestry = 0 👍
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
michaelolo24
approved these changes
Jul 1, 2020
jonathan-buttner
added a commit
that referenced
this pull request
Jul 2, 2020
…y array (#70129) (#70518) * Refactor generator for ancestry support * Adding optional ancestry array * Fixing tests and type errors * Removing useAncestry field * Fixing test * An empty array will be returned because that's how ES will do it too Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors how the generator passes in options for building the tree. This makes assigning options like how large of an ancestry array to use easier to use throughout the generator.
I also added a
levelsfield in the tree response to make it easier to access the levels of the tree when using the generator in tests.These are changes I've made while implementing msearch for resolver's backend and needed extra functionality for the tests.