kibana/x-pack/plugins/timelines/server
Jatin Kathuria 476335ab08
[8.16] [Security Solution] Fix timeline dynamic batching (#204034) | [ Security Solution ] Fix Refetch logic with new timeline batching (#205893) (#205674)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution] Fix timeline dynamic batching
(#204034)](https://github.com/elastic/kibana/pull/204034)
 - https://github.com/elastic/kibana/pull/205893

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jatin
Kathuria","email":"jatin.kathuria@elastic.co"},"sourceCommit":{"committedDate":"2025-01-07T06:20:30Z","message":"[Security
Solution] Fix timeline dynamic batching (#204034)\n\n##
Summary\r\n\r\nHandles :\r\n\r\n\r\n### Issue with Batches\r\n-
https://github.com/elastic/kibana/issues/201405\r\n- Timeline had a bug
where if users fetched multiple batches and then if\r\nuser adds a new
column, the value of this new columns will only be\r\nfetched for the
latest batch and not old batches.\r\n- This PR fixes that  by
cumulatively fetching the data for old batches\r\ntill current batch
`iff a new column has been added`.\r\n- For example, if user has already
fetched the 3rd batch, data for\r\n1st,2nd and 3rd will be fetched
together when a column has been added,\r\notherwise, data will be
fetched incrementally.\r\n\r\n### Issue with Elastic search
limit\r\n\r\n- Elastic search has a limit of 10K hits at max but we
throw error at\r\n10K which should be allowed.\r\n - Error should be
thrown at anything `>10K`. 10001 for example.\r\n -  This PR fixes that
just for timeline by allowing 10K hits.\r\n\r\n### Removal of obsolete
code\r\n\r\nBelow files related to old Timeline code are removed as
well:\r\n-\r\nx-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.test.tsx\r\n-\r\nx-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx\r\n\r\n---------\r\n\r\nCo-authored-by:
Philippe Oberti
<philippe.oberti@elastic.co>","sha":"088169f446788f9fa8800d77817881524514943e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Threat
Hunting:Investigations","backport:prev-minor","v8.16.3"],"number":204034,"url":"https://github.com/elastic/kibana/pull/204034","mergeCommit":{"message":"[Security
Solution] Fix timeline dynamic batching (#204034)\n\n##
Summary\r\n\r\nHandles :\r\n\r\n\r\n### Issue with Batches\r\n-
https://github.com/elastic/kibana/issues/201405\r\n- Timeline had a bug
where if users fetched multiple batches and then if\r\nuser adds a new
column, the value of this new columns will only be\r\nfetched for the
latest batch and not old batches.\r\n- This PR fixes that  by
cumulatively fetching the data for old batches\r\ntill current batch
`iff a new column has been added`.\r\n- For example, if user has already
fetched the 3rd batch, data for\r\n1st,2nd and 3rd will be fetched
together when a column has been added,\r\notherwise, data will be
fetched incrementally.\r\n\r\n### Issue with Elastic search
limit\r\n\r\n- Elastic search has a limit of 10K hits at max but we
throw error at\r\n10K which should be allowed.\r\n - Error should be
thrown at anything `>10K`. 10001 for example.\r\n -  This PR fixes that
just for timeline by allowing 10K hits.\r\n\r\n### Removal of obsolete
code\r\n\r\nBelow files related to old Timeline code are removed as
well:\r\n-\r\nx-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.test.tsx\r\n-\r\nx-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx\r\n\r\n---------\r\n\r\nCo-authored-by:
Philippe Oberti
<philippe.oberti@elastic.co>","sha":"088169f446788f9fa8800d77817881524514943e"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204034","number":204034,"mergeCommit":{"message":"[Security
Solution] Fix timeline dynamic batching (#204034)\n\n##
Summary\r\n\r\nHandles :\r\n\r\n\r\n### Issue with Batches\r\n-
https://github.com/elastic/kibana/issues/201405\r\n- Timeline had a bug
where if users fetched multiple batches and then if\r\nuser adds a new
column, the value of this new columns will only be\r\nfetched for the
latest batch and not old batches.\r\n- This PR fixes that  by
cumulatively fetching the data for old batches\r\ntill current batch
`iff a new column has been added`.\r\n- For example, if user has already
fetched the 3rd batch, data for\r\n1st,2nd and 3rd will be fetched
together when a column has been added,\r\notherwise, data will be
fetched incrementally.\r\n\r\n### Issue with Elastic search
limit\r\n\r\n- Elastic search has a limit of 10K hits at max but we
throw error at\r\n10K which should be allowed.\r\n - Error should be
thrown at anything `>10K`. 10001 for example.\r\n -  This PR fixes that
just for timeline by allowing 10K hits.\r\n\r\n### Removal of obsolete
code\r\n\r\nBelow files related to old Timeline code are removed as
well:\r\n-\r\nx-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.test.tsx\r\n-\r\nx-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx\r\n\r\n---------\r\n\r\nCo-authored-by:
Philippe Oberti
<philippe.oberti@elastic.co>","sha":"088169f446788f9fa8800d77817881524514943e"}},{"branch":"8.16","label":"v8.16.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-02-06 11:08:47 -06:00
..
search_strategy [8.16] [Security Solution] Fix timeline dynamic batching (#204034) | [ Security Solution ] Fix Refetch logic with new timeline batching (#205893) (#205674) 2025-02-06 11:08:47 -06:00
utils Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
config.ts [Security Solution] Support experimental features in timelines (#189028) 2024-07-26 10:46:40 -05:00
index.ts [Security Solution] Support experimental features in timelines (#189028) 2024-07-26 10:46:40 -05:00
plugin.ts [Security Solution] Support experimental features in timelines (#189028) 2024-07-26 10:46:40 -05:00
types.ts fix all violations 2022-04-16 01:37:30 -05:00