no longer pass related event stats to process node component#72435
no longer pass related event stats to process node component#72435oatkiller merged 3 commits intoelastic:masterfrom
Conversation
| * This returns a map of entity_ids to stats for the related events and alerts. | ||
| */ | ||
| export function relatedEventsStats(tree: ResolverTree): Map<string, ResolverNodeStats> { | ||
| export function relatedEventStats(tree: ResolverTree): Map<string, ResolverNodeStats> { |
There was a problem hiding this comment.
❔ Isn't more correct to say events? Using the singular implies you are providing stats about one related event, which isn't really the case, right?
There was a problem hiding this comment.
I see your point. My motivation for changing this was just because I kept typing it as relatedEventStats. How do you feel about nodeStats? @bkimmel
There was a problem hiding this comment.
nvm, putting back the original name
There was a problem hiding this comment.
To be consistent with our naming in a few other places, should we add a ByEntityId at the end, too? Like nodeStatsByEntityId
| const nodeID = processEventModel.uniquePidForProcess(event); | ||
|
|
||
| /** | ||
| * A collection of events related to the current node and statistics (e.g. counts indexed by event type) |
There was a problem hiding this comment.
🔴 ResolverNodeStats does not contain a collection of events related to the current node unless I'm missing something. I'd suggest we either: 1) Change the comment here or 2) If it does have a collection of events, the selector name should be something more broad like relatedEventsAndStats
There was a problem hiding this comment.
i'll remove the comment. fwiw, that was the existing comment for relatedEventStatsForProcess, which contained exactly what relatedEventStats now contains.
There was a problem hiding this comment.
Maybe at one point it did have that collection with it in whatever form it was being consumed here.
bkimmel
left a comment
There was a problem hiding this comment.
Maybe respond to that one 🔴 but looks good otherwise.
💚 Build SucceededBuild metricsasync chunks size
History
To update your PR or re-run it, just comment with: |
* master: (60 commits) [SIEM][Detection Engine][Lists] Adds list permissions (elastic#72335) [SIEM][Detection Engine][Lists] Adds conflict versioning and io-ts improvements to lists (elastic#72337) [Resolver] no longer pass related event stats to process node component (elastic#72435) Revert "skip flaky suite (elastic#72146)" [Security Solution] Cleanup endpoint telemetry (elastic#71950) Unskip dashboard embeddable rendering tests (elastic#71824) [ENDPOINT] Added unerolling status for host. (elastic#72303) [Alerting][Connectors] Increase the size of the logos (elastic#72419) [SECURITY] [Timeline] Raw events not displayed (elastic#72387) [ML] Fixes display of regression stop stats if one is NaN (elastic#72412) [Ingest Pipelines] Processor Editor Move Tooltip (elastic#72239) Fix match phrase and not match phrase comparators (elastic#71850) [Plugin Generator] Generate tsconfig and useDefaultBehaviors (elastic#72040) [Security Solution][Timeline] Fix timeline styling and createFrom beh… (elastic#72152) [Resolver] Selector performance (elastic#72380) [Ingest Manager] Set `_meta` in the index.mappings (elastic#72026) [Ingest Manager] Do not bumb config revision during config creation (elastic#72270) [ML] Adding missing index pattern name to new job wizards (elastic#72400) [ML] improve annotation flyout performance (elastic#72299) [APM] Testing error rate API and restructuring folders (elastic#72257) ...
* master: (26 commits) [SIEM][Detection Engine][Lists] Adds list permissions (elastic#72335) [SIEM][Detection Engine][Lists] Adds conflict versioning and io-ts improvements to lists (elastic#72337) [Resolver] no longer pass related event stats to process node component (elastic#72435) Revert "skip flaky suite (elastic#72146)" [Security Solution] Cleanup endpoint telemetry (elastic#71950) Unskip dashboard embeddable rendering tests (elastic#71824) [ENDPOINT] Added unerolling status for host. (elastic#72303) [Alerting][Connectors] Increase the size of the logos (elastic#72419) [SECURITY] [Timeline] Raw events not displayed (elastic#72387) [ML] Fixes display of regression stop stats if one is NaN (elastic#72412) [Ingest Pipelines] Processor Editor Move Tooltip (elastic#72239) Fix match phrase and not match phrase comparators (elastic#71850) [Plugin Generator] Generate tsconfig and useDefaultBehaviors (elastic#72040) [Security Solution][Timeline] Fix timeline styling and createFrom beh… (elastic#72152) [Resolver] Selector performance (elastic#72380) [Ingest Manager] Set `_meta` in the index.mappings (elastic#72026) [Ingest Manager] Do not bumb config revision during config creation (elastic#72270) [ML] Adding missing index pattern name to new job wizards (elastic#72400) [ML] improve annotation flyout performance (elastic#72299) [APM] Testing error rate API and restructuring folders (elastic#72257) ...
…feature-privileges * alerting/consumer-based-rbac: (45 commits) fixed alerts test [SIEM][Detection Engine][Lists] Adds list permissions (elastic#72335) [SIEM][Detection Engine][Lists] Adds conflict versioning and io-ts improvements to lists (elastic#72337) [Resolver] no longer pass related event stats to process node component (elastic#72435) Revert "skip flaky suite (elastic#72146)" [Security Solution] Cleanup endpoint telemetry (elastic#71950) Unskip dashboard embeddable rendering tests (elastic#71824) [ENDPOINT] Added unerolling status for host. (elastic#72303) [Alerting][Connectors] Increase the size of the logos (elastic#72419) [SECURITY] [Timeline] Raw events not displayed (elastic#72387) [ML] Fixes display of regression stop stats if one is NaN (elastic#72412) [Ingest Pipelines] Processor Editor Move Tooltip (elastic#72239) Fix match phrase and not match phrase comparators (elastic#71850) [Plugin Generator] Generate tsconfig and useDefaultBehaviors (elastic#72040) [Security Solution][Timeline] Fix timeline styling and createFrom beh… (elastic#72152) allow user to disable alert even if they dont have privileges to the underlying action [Resolver] Selector performance (elastic#72380) [Ingest Manager] Set `_meta` in the index.mappings (elastic#72026) [Ingest Manager] Do not bumb config revision during config creation (elastic#72270) [ML] Adding missing index pattern name to new job wizards (elastic#72400) ...
Summary
The purpose of this PR is to remove props from the process node component.
relatedEventsStatsselector now returns a thunk that takes anodeIDstring and returns statsrelatedEventStatsForProcessselector no longer needed as it has the same signature asrelatedEventsStatsnow has.relatedEventsStatsForProcessNo changes in behaviour were intended.
Still works:

Checklist
Delete any items that are not applicable to this PR.
For maintainers