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

[Entity Store] Do not require full entity definition to execute enrich policy (remove magic number) #195961

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Oct 11, 2024

Summary

@machadoum pointed out some weirdness in the task code where we have to provide the fieldHistoryLength, I have changed the executeEnrichPolicy method signature to only require the 3 fields it needs, one of those fields is the entity definition version, I have added a method to just get the version of an entity defintion so the task can provide it.

@hop-dev hop-dev added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:Entity Analytics Security Entity Analytics Team labels Oct 11, 2024
@hop-dev hop-dev self-assigned this Oct 11, 2024
@hop-dev hop-dev requested a review from a team as a code owner October 11, 2024 16:05
@elasticmachine
Copy link
Contributor

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

const unitedDefinition = getUnitedEntityDefinition({
namespace,
entityType,
fieldHistoryLength: 10, // we are not using this value so it can be anything
Copy link
Contributor Author

Choose a reason for hiding this comment

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

getting rid of this magic number is the motivation of the changes

@hop-dev hop-dev changed the title do not require full entity definition for executing enrich policy [Entity Store] Do not require full entity definition to execute enrich policy (remove magic number) Oct 11, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @hop-dev

@hop-dev hop-dev enabled auto-merge (squash) October 11, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants