[Security Solution][Sourcerer] Fix timeline filters for DV manager#224834
[Security Solution][Sourcerer] Fix timeline filters for DV manager#224834lgestc merged 1 commit intoelastic:mainfrom
Conversation
|
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
💚 Build Succeeded
Metrics [docs]Async chunks
|
PhilippeOberti
left a comment
There was a problem hiding this comment.
I actually do not understand what this fixes. I went back and forth between this branch and main and didn't really see any issues in timeline cell actions?
|
|
||
| const { dataViewSpec: experimentalDataViewSpec } = useDataViewSpec(SourcererScopeName.timeline); | ||
| const { newDataViewPickerEnabled } = useEnableExperimental(); | ||
| const { sourcererDataView: dataViewSpec } = useSourcererDataView(SourcererScopeName.timeline); |
There was a problem hiding this comment.
any reason for renaming oldSourcererDataViewSpec to dataViewSpec?
There was a problem hiding this comment.
No longer using the spec, just using the dataView, so it can have it's old name back 😄
There was a problem hiding this comment.
Then why renaming it to dataViewSpec?
Why not renaming it oldDataView to show that it's different from experimentalDataView? 😛
| () => (newDataViewPickerEnabled ? experimentalDataViewSpec : oldSourcererDataViewSpec), | ||
| [experimentalDataViewSpec, newDataViewPickerEnabled, oldSourcererDataViewSpec] | ||
| ); | ||
| const { dataView: experimentalDataView } = useDataView(SourcererScopeName.timeline); |
There was a problem hiding this comment.
here also, any reason for renaming experimentalDataViewSpec to experimentalDataView?
There was a problem hiding this comment.
No longer using the spec, using the dataview directly as the toSpec() can be expensive verses just relying on the dataView cache
Ignore that comment, I must have done a full reset and the feature flag was not enabled when I checked out |
PhilippeOberti
left a comment
There was a problem hiding this comment.
Left a couple of comments but none are blockers. Approving as this fixes the issue I saw in main.
Thanks!
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15844606915 |
…lastic#224834) ## Summary Filters we applied but no listed in the timeline, again - some mismatch in how the data view object was passed around. ## Testing Set the feature flag: ``` xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled'] ``` Then, adding a filter via cell action should render the correct pill in the top level filters pane. ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit ba6b874)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ager (#224834) (#225010) # Backport This will backport the following commits from `main` to `8.19`: - [[Security Solution][Sourcerer] Fix timeline filters for DV manager (#224834)](#224834) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Luke Gmys","email":"11671118+lgestc@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-24T07:52:23Z","message":"[Security Solution][Sourcerer] Fix timeline filters for DV manager (#224834)\n\n## Summary\n\nFilters we applied but no listed in the timeline, again - some mismatch\nin how the data view object was passed around.\n\n## Testing\n\nSet the feature flag:\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\nThen, adding a filter via cell action should render the correct pill in\nthe top level filters pane.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"ba6b87418178acaa89ec9e578b45161bc8944552","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat Hunting:Investigations","backport:version","v9.1.0","v8.19.0"],"title":"[Security Solution][Sourcerer] Fix timeline filters for DV manager","number":224834,"url":"https://github.com/elastic/kibana/pull/224834","mergeCommit":{"message":"[Security Solution][Sourcerer] Fix timeline filters for DV manager (#224834)\n\n## Summary\n\nFilters we applied but no listed in the timeline, again - some mismatch\nin how the data view object was passed around.\n\n## Testing\n\nSet the feature flag:\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\nThen, adding a filter via cell action should render the correct pill in\nthe top level filters pane.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"ba6b87418178acaa89ec9e578b45161bc8944552"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224834","number":224834,"mergeCommit":{"message":"[Security Solution][Sourcerer] Fix timeline filters for DV manager (#224834)\n\n## Summary\n\nFilters we applied but no listed in the timeline, again - some mismatch\nin how the data view object was passed around.\n\n## Testing\n\nSet the feature flag:\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\nThen, adding a filter via cell action should render the correct pill in\nthe top level filters pane.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"ba6b87418178acaa89ec9e578b45161bc8944552"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Luke Gmys <11671118+lgestc@users.noreply.github.com>
…lastic#224834) ## Summary Filters we applied but no listed in the timeline, again - some mismatch in how the data view object was passed around. ## Testing Set the feature flag: ``` xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled'] ``` Then, adding a filter via cell action should render the correct pill in the top level filters pane. ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
Summary
Filters we applied but no listed in the timeline, again - some mismatch in how the data view object was passed around.
Testing
Set the feature flag:
Then, adding a filter via cell action should render the correct pill in the top level filters pane.
Checklist
Check the PR satisfies following conditions.