[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls#224831
[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls#224831lgestc merged 8 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
|
Maybe a dumb question, but would this work still be necessary if this other PR gets merged? |
I think while that linked PR might help, I see now that the changes in this PR are still valuable. Please ignore my previous comment :) |
PhilippeOberti
left a comment
There was a problem hiding this comment.
Left a non-blocker comment, otherwise LGTM!
...ions/security/plugins/security_solution/public/data_view_manager/hooks/use_data_view_spec.ts
Show resolved
Hide resolved
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/16024814601 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Starting backport for target branches: 8.19, 9.1 https://github.com/elastic/kibana/actions/runs/16024997022 |
…lls (elastic#224831) ## Summary As useDataViewSpec uses are expensive (due to toSpec method in the data view implementation), this PR adds in an optional switch to the hook and actually replaces it where we only need the data view id and not the full spec. ### Testing Set the FF, ``` xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled'] ``` verify that the app still works correctly (timelines) ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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 711ab70)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…lls (elastic#224831) ## Summary As useDataViewSpec uses are expensive (due to toSpec method in the data view implementation), this PR adds in an optional switch to the hook and actually replaces it where we only need the data view id and not the full spec. ### Testing Set the FF, ``` xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled'] ``` verify that the app still works correctly (timelines) ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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 711ab70)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…Spec calls (#224831) (#226186) # Backport This will backport the following commits from `main` to `8.19`: - [[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)](#224831) <!--- Backport version: 10.0.1 --> ### 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-07-02T12:14:35Z","message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat Hunting:Investigations","backport:version","9.1 candidate","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls","number":224831,"url":"https://github.com/elastic/kibana/pull/224831","mergeCommit":{"message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/226183","number":226183,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224831","number":224831,"mergeCommit":{"message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3"}}]}] BACKPORT-->
…pec calls (#224831) (#226184) # Backport This will backport the following commits from `main` to `9.1`: - [[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)](#224831) <!--- Backport version: 10.0.1 --> ### 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-07-02T12:14:35Z","message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat Hunting:Investigations","backport:version","9.1 candidate","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls","number":224831,"url":"https://github.com/elastic/kibana/pull/224831","mergeCommit":{"message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/226183","number":226183,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224831","number":224831,"mergeCommit":{"message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3"}}]}] BACKPORT-->
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
2 similar comments
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
3 similar comments
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
…pec calls (#224831) (#226183) # Backport This will backport the following commits from `main` to `9.1`: - [[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)](#224831) <!--- 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-07-02T12:14:35Z","message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat Hunting:Investigations","backport:version","9.1 candidate","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls","number":224831,"url":"https://github.com/elastic/kibana/pull/224831","mergeCommit":{"message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224831","number":224831,"mergeCommit":{"message":"[Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)\n\n## Summary\n\nAs useDataViewSpec uses are expensive (due to toSpec method in the data\nview implementation), this PR\nadds in an optional switch to the hook and actually replaces it where we\nonly need the data view id and not the full spec.\n\n### Testing\n\nSet the FF,\n\n```\nxpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']\n```\n\nverify that the app still works correctly (timelines)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\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":"711ab70b3770addcba8fa66b28af65ceda11e5e3"}}]}] BACKPORT--> --------- Co-authored-by: Luke Gmys <11671118+lgestc@users.noreply.github.com>
…lls (elastic#224831) ## Summary As useDataViewSpec uses are expensive (due to toSpec method in the data view implementation), this PR adds in an optional switch to the hook and actually replaces it where we only need the data view id and not the full spec. ### Testing Set the FF, ``` xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled'] ``` verify that the app still works correctly (timelines) ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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
As useDataViewSpec uses are expensive (due to toSpec method in the data view implementation), this PR
adds in an optional switch to the hook and actually replaces it where we only need the data view id and not the full spec.
Testing
Set the FF,
verify that the app still works correctly (timelines)
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.