kibana/packages
Jatin Kathuria 45f6001978
[8.18] [Security Solution] Fix timeline dynamic batching (#204034) | [ Security Solution ] Fix Refetch logic with new timeline batching (#205893) (#210066)
# Backport

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

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/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","backport
missing","v9.0.0","Team:Threat
Hunting:Investigations","backport:prev-minor","v8.16.3","v8.19.0"],"title":"[Security
Solution] Fix timeline dynamic
batching","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":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^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","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/205674","number":205674,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"url":"https://github.com/elastic/kibana/pull/205676","number":205676,"branch":"8.17","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/205702","number":205702,"branch":"8.x","state":"MERGED","mergeCommit":{"sha":"e480de112ae6bc121c4415e2e1726dd551805672","message":"[8.x]
[Security Solution] Fix timeline dynamic batching (#204034)
(#205702)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.x`:\n- [[Security Solution] Fix timeline dynamic
batching\n(#204034)](https://github.com/elastic/kibana/pull/204034)\n -
https://github.com/elastic/kibana/pull/205893\n\n<!--- Backport version:
8.9.8 -->\n\n### Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Jatin\nKathuria\",\"email\":\"jatin.kathuria@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2025-01-07T06:20:30Z\",\"message\":\"[Security\nSolution]
Fix timeline dynamic batching
(#204034)\\n\\n##\nSummary\\r\\n\\r\\nHandles :\\r\\n\\r\\n\\r\\n###
Issue with
Batches\\r\\n-\nhttps://github.com/elastic/kibana/issues/201405\\r\\n-
Timeline had a bug\nwhere if users fetched multiple batches and then
if\\r\\nuser adds a new\ncolumn, the value of this new columns will only
be\\r\\nfetched for the\nlatest batch and not old batches.\\r\\n- This
PR fixes that  by\ncumulatively fetching the data for old
batches\\r\\ntill current batch\n`iff a new column has been
added`.\\r\\n- For example, if user has already\nfetched the 3rd batch,
data for\\r\\n1st,2nd and 3rd will be fetched\ntogether when a column
has been added,\\r\\notherwise, data will be\nfetched
incrementally.\\r\\n\\r\\n### Issue with Elastic
search\nlimit\\r\\n\\r\\n- Elastic search has a limit of 10K hits at max
but we\nthrow error at\\r\\n10K which should be allowed.\\r\\n - Error
should be\nthrown at anything `>10K`. 10001 for example.\\r\\n -  This
PR fixes that\njust for timeline by allowing 10K hits.\\r\\n\\r\\n###
Removal of obsolete\ncode\\r\\n\\r\\nBelow files related to old Timeline
code are removed
as\nwell:\\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:\nPhilippe
Oberti\n<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\nHunting:Investigations\",\"backport:prev-minor\",\"v8.16.3\"],\"number\":204034,\"url\":\"https://github.com/elastic/kibana/pull/204034\",\"mergeCommit\":{\"message\":\"[Security\nSolution]
Fix timeline dynamic batching
(#204034)\\n\\n##\nSummary\\r\\n\\r\\nHandles :\\r\\n\\r\\n\\r\\n###
Issue with
Batches\\r\\n-\nhttps://github.com/elastic/kibana/issues/201405\\r\\n-
Timeline had a bug\nwhere if users fetched multiple batches and then
if\\r\\nuser adds a new\ncolumn, the value of this new columns will only
be\\r\\nfetched for the\nlatest batch and not old batches.\\r\\n- This
PR fixes that  by\ncumulatively fetching the data for old
batches\\r\\ntill current batch\n`iff a new column has been
added`.\\r\\n- For example, if user has already\nfetched the 3rd batch,
data for\\r\\n1st,2nd and 3rd will be fetched\ntogether when a column
has been added,\\r\\notherwise, data will be\nfetched
incrementally.\\r\\n\\r\\n### Issue with Elastic
search\nlimit\\r\\n\\r\\n- Elastic search has a limit of 10K hits at max
but we\nthrow error at\\r\\n10K which should be allowed.\\r\\n - Error
should be\nthrown at anything `>10K`. 10001 for example.\\r\\n -  This
PR fixes that\njust for timeline by allowing 10K hits.\\r\\n\\r\\n###
Removal of obsolete\ncode\\r\\n\\r\\nBelow files related to old Timeline
code are removed
as\nwell:\\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:\nPhilippe
Oberti\n<philippe.oberti@elastic.co>\",\"sha\":\"088169f446788f9fa8800d77817881524514943e\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"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\nSolution]
Fix timeline dynamic batching
(#204034)\\n\\n##\nSummary\\r\\n\\r\\nHandles :\\r\\n\\r\\n\\r\\n###
Issue with
Batches\\r\\n-\nhttps://github.com/elastic/kibana/issues/201405\\r\\n-
Timeline had a bug\nwhere if users fetched multiple batches and then
if\\r\\nuser adds a new\ncolumn, the value of this new columns will only
be\\r\\nfetched for the\nlatest batch and not old batches.\\r\\n- This
PR fixes that  by\ncumulatively fetching the data for old
batches\\r\\ntill current batch\n`iff a new column has been
added`.\\r\\n- For example, if user has already\nfetched the 3rd batch,
data for\\r\\n1st,2nd and 3rd will be fetched\ntogether when a column
has been added,\\r\\notherwise, data will be\nfetched
incrementally.\\r\\n\\r\\n### Issue with Elastic
search\nlimit\\r\\n\\r\\n- Elastic search has a limit of 10K hits at max
but we\nthrow error at\\r\\n10K which should be allowed.\\r\\n - Error
should be\nthrown at anything `>10K`. 10001 for example.\\r\\n -  This
PR fixes that\njust for timeline by allowing 10K hits.\\r\\n\\r\\n###
Removal of obsolete\ncode\\r\\n\\r\\nBelow files related to old Timeline
code are removed
as\nwell:\\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:\nPhilippe
Oberti\n<philippe.oberti@elastic.co>\",\"sha\":\"088169f446788f9fa8800d77817881524514943e\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.3\",\"labelRegex\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"url\":\"https://github.com/elastic/kibana/pull/205674\",\"number\":205674,\"state\":\"OPEN\"},{\"url\":\"https://github.com/elastic/kibana/pull/205676\",\"number\":205676,\"branch\":\"8.17\",\"state\":\"OPEN\"}]}]\nBACKPORT-->\n\n---------\n\nCo-authored-by:
Philippe Oberti <philippe.oberti@elastic.co>\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>"}}]},{"author":{"name":"Jatin
Kathuria","email":"jatin.kathuria@elastic.co"},"sourceCommit":{"committedDate":"2025-02-05T21:12:38Z","message":"[
Security Solution ] Fix Refetch logic with new timeline batching
(#205893)\n\n## Summary\n\nPR :
https://github.com/elastic/kibana/pull/204034 fixed some issues\nwith
timeline batching. It was not able to fix one of the issue
with\n`Refetch` logic which exists in `main` ( resulting in a flaky test
) and\ncausing some tests to fail in `8.16`, `8.17` and `8.x`.\n\n##
Issue Description\n\nThere are 2 issues with below video:\n\n1. When
user updates a status of an alert, the `Refetch` only happens on\nthe
first `batch`. This behaviour is flaky currently. Even if the user\nis
on nth batch, table will fetch 0th batch and reset the user's page\nback
to
1.\n\n\n\nhttps://github.com/user-attachments/assets/eaf88a82-0e9b-4743-8b2d-60fd327a2443\n
\n\n\n3. When user clicks `Refresh` manually, then also only first
(0th)\n`batch` is fetched, which should have rather fetched all the
present\nbatches.\n\n\n\n\nhttps://github.com/user-attachments/assets/8d578ce3-4f24-4e70-bc3a-ed6ba99167a0\n\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\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":"54b4fac705c231b52396d70906f3259f9b129a3b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat
Hunting:Investigations","v9.1.0"],"title":"[ Security Solution ] Fix
Refetch logic with new timeline
batching","number":205893,"url":"https://github.com/elastic/kibana/pull/205893","mergeCommit":{"message":"[
Security Solution ] Fix Refetch logic with new timeline batching
(#205893)\n\n## Summary\n\nPR :
https://github.com/elastic/kibana/pull/204034 fixed some issues\nwith
timeline batching. It was not able to fix one of the issue
with\n`Refetch` logic which exists in `main` ( resulting in a flaky test
) and\ncausing some tests to fail in `8.16`, `8.17` and `8.x`.\n\n##
Issue Description\n\nThere are 2 issues with below video:\n\n1. When
user updates a status of an alert, the `Refetch` only happens on\nthe
first `batch`. This behaviour is flaky currently. Even if the user\nis
on nth batch, table will fetch 0th batch and reset the user's page\nback
to
1.\n\n\n\nhttps://github.com/user-attachments/assets/eaf88a82-0e9b-4743-8b2d-60fd327a2443\n
\n\n\n3. When user clicks `Refresh` manually, then also only first
(0th)\n`batch` is fetched, which should have rather fetched all the
present\nbatches.\n\n\n\n\nhttps://github.com/user-attachments/assets/8d578ce3-4f24-4e70-bc3a-ed6ba99167a0\n\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\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":"54b4fac705c231b52396d70906f3259f9b129a3b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/209916","number":209916,"state":"MERGED","mergeCommit":{"sha":"aeaff4957aded708fecfa0e57f16b3cba5f77485","message":"[9.0]
[ Security Solution ] Fix Refetch logic with new timeline batching
(#205893) (#209916)\n\n# Backport\n\nThis will backport the following
commits from `main` to `9.0`:\n- [[ Security Solution ] Fix Refetch
logic with new timeline
batching\n(#205893)](https://github.com/elastic/kibana/pull/205893)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Jatin\nKathuria\",\"email\":\"jatin.kathuria@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2025-02-05T21:12:38Z\",\"message\":\"[\nSecurity
Solution ] Fix Refetch logic with new timeline
batching\n(#205893)\\n\\n## Summary\\n\\nPR
:\nhttps://github.com/elastic/kibana/pull/204034 fixed some
issues\\nwith\ntimeline batching. It was not able to fix one of the
issue\nwith\\n`Refetch` logic which exists in `main` ( resulting in a
flaky test\n) and\\ncausing some tests to fail in `8.16`, `8.17` and
`8.x`.\\n\\n##\nIssue Description\\n\\nThere are 2 issues with below
video:\\n\\n1. When\nuser updates a status of an alert, the `Refetch`
only happens on\\nthe\nfirst `batch`. This behaviour is flaky currently.
Even if the user\\nis\non nth batch, table will fetch 0th batch and
reset the user's
page\\nback\nto\n1.\\n\\n\\n\\nhttps://github.com/user-attachments/assets/eaf88a82-0e9b-4743-8b2d-60fd327a2443\\n\n\\n\\n\\n3.
When user clicks `Refresh` manually, then also only
first\n(0th)\\n`batch` is fetched, which should have rather fetched all
the\npresent\\nbatches.\\n\\n\\n\\n\\nhttps://github.com/user-attachments/assets/8d578ce3-4f24-4e70-bc3a-ed6ba99167a0\\n\\n\\n\\n###\nChecklist\\n\\nCheck
the PR satisfies following conditions. \\n\\nReviewers\nshould verify
this PR satisfies this list as well.\\n\\n\\n- [x] [Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"54b4fac705c231b52396d70906f3259f9b129a3b\",\"branchLabelMapping\":{\"^v9.1.0$\":\"main\",\"^v8.19.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"backport\",\"release_note:skip\",\"Team:Threat\nHunting:Investigations\",\"v8.9.1\",\"v9.1.0\"],\"title\":\"[
Security Solution\n] Fix Refetch logic with new
timeline\nbatching\",\"number\":205893,\"url\":\"https://github.com/elastic/kibana/pull/205893\",\"mergeCommit\":{\"message\":\"[\nSecurity
Solution ] Fix Refetch logic with new timeline
batching\n(#205893)\\n\\n## Summary\\n\\nPR
:\nhttps://github.com/elastic/kibana/pull/204034 fixed some
issues\\nwith\ntimeline batching. It was not able to fix one of the
issue\nwith\\n`Refetch` logic which exists in `main` ( resulting in a
flaky test\n) and\\ncausing some tests to fail in `8.16`, `8.17` and
`8.x`.\\n\\n##\nIssue Description\\n\\nThere are 2 issues with below
video:\\n\\n1. When\nuser updates a status of an alert, the `Refetch`
only happens on\\nthe\nfirst `batch`. This behaviour is flaky currently.
Even if the user\\nis\non nth batch, table will fetch 0th batch and
reset the user's
page\\nback\nto\n1.\\n\\n\\n\\nhttps://github.com/user-attachments/assets/eaf88a82-0e9b-4743-8b2d-60fd327a2443\\n\n\\n\\n\\n3.
When user clicks `Refresh` manually, then also only
first\n(0th)\\n`batch` is fetched, which should have rather fetched all
the\npresent\\nbatches.\\n\\n\\n\\n\\nhttps://github.com/user-attachments/assets/8d578ce3-4f24-4e70-bc3a-ed6ba99167a0\\n\\n\\n\\n###\nChecklist\\n\\nCheck
the PR satisfies following conditions. \\n\\nReviewers\nshould verify
this PR satisfies this list as well.\\n\\n\\n- [x] [Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"54b4fac705c231b52396d70906f3259f9b129a3b\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.9\"],\"targetPullRequestStates\":[{\"branch\":\"8.9\",\"label\":\"v8.9.1\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v9.1.0\",\"branchLabelMappingKey\":\"^v9.1.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/205893\",\"number\":205893,\"mergeCommit\":{\"message\":\"[\nSecurity
Solution ] Fix Refetch logic with new timeline
batching\n(#205893)\\n\\n## Summary\\n\\nPR
:\nhttps://github.com/elastic/kibana/pull/204034 fixed some
issues\\nwith\ntimeline batching. It was not able to fix one of the
issue\nwith\\n`Refetch` logic which exists in `main` ( resulting in a
flaky test\n) and\\ncausing some tests to fail in `8.16`, `8.17` and
`8.x`.\\n\\n##\nIssue Description\\n\\nThere are 2 issues with below
video:\\n\\n1. When\nuser updates a status of an alert, the `Refetch`
only happens on\\nthe\nfirst `batch`. This behaviour is flaky currently.
Even if the user\\nis\non nth batch, table will fetch 0th batch and
reset the user's
page\\nback\nto\n1.\\n\\n\\n\\nhttps://github.com/user-attachments/assets/eaf88a82-0e9b-4743-8b2d-60fd327a2443\\n\n\\n\\n\\n3.
When user clicks `Refresh` manually, then also only
first\n(0th)\\n`batch` is fetched, which should have rather fetched all
the\npresent\\nbatches.\\n\\n\\n\\n\\nhttps://github.com/user-attachments/assets/8d578ce3-4f24-4e70-bc3a-ed6ba99167a0\\n\\n\\n\\n###\nChecklist\\n\\nCheck
the PR satisfies following conditions. \\n\\nReviewers\nshould verify
this PR satisfies this list as well.\\n\\n\\n- [x] [Unit
or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"54b4fac705c231b52396d70906f3259f9b129a3b\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Jatin Kathuria
<jatin.kathuria@elastic.co>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205893","number":205893,"mergeCommit":{"message":"[
Security Solution ] Fix Refetch logic with new timeline batching
(#205893)\n\n## Summary\n\nPR :
https://github.com/elastic/kibana/pull/204034 fixed some issues\nwith
timeline batching. It was not able to fix one of the issue
with\n`Refetch` logic which exists in `main` ( resulting in a flaky test
) and\ncausing some tests to fail in `8.16`, `8.17` and `8.x`.\n\n##
Issue Description\n\nThere are 2 issues with below video:\n\n1. When
user updates a status of an alert, the `Refetch` only happens on\nthe
first `batch`. This behaviour is flaky currently. Even if the user\nis
on nth batch, table will fetch 0th batch and reset the user's page\nback
to
1.\n\n\n\nhttps://github.com/user-attachments/assets/eaf88a82-0e9b-4743-8b2d-60fd327a2443\n
\n\n\n3. When user clicks `Refresh` manually, then also only first
(0th)\n`batch` is fetched, which should have rather fetched all the
present\nbatches.\n\n\n\n\nhttps://github.com/user-attachments/assets/8d578ce3-4f24-4e70-bc3a-ed6ba99167a0\n\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\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":"54b4fac705c231b52396d70906f3259f9b129a3b"}},{"url":"https://github.com/elastic/kibana/pull/205676","number":205676,"branch":"8.17","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/205702","number":205702,"branch":"8.x","state":"MERGED","mergeCommit":{"sha":"e480de112ae6bc121c4415e2e1726dd551805672","message":"[8.x]
[Security Solution] Fix timeline dynamic batching (#204034)
(#205702)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.x`:\n- [[Security Solution] Fix timeline dynamic
batching\n(#204034)](https://github.com/elastic/kibana/pull/204034)\n -
https://github.com/elastic/kibana/pull/205893\n\n<!--- Backport version:
8.9.8 -->\n\n### Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Jatin\nKathuria\",\"email\":\"jatin.kathuria@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2025-01-07T06:20:30Z\",\"message\":\"[Security\nSolution]
Fix timeline dynamic batching
(#204034)\\n\\n##\nSummary\\r\\n\\r\\nHandles :\\r\\n\\r\\n\\r\\n###
Issue with
Batches\\r\\n-\nhttps://github.com/elastic/kibana/issues/201405\\r\\n-
Timeline had a bug\nwhere if users fetched multiple batches and then
if\\r\\nuser adds a new\ncolumn, the value of this new columns will only
be\\r\\nfetched for the\nlatest batch and not old batches.\\r\\n- This
PR fixes that  by\ncumulatively fetching the data for old
batches\\r\\ntill current batch\n`iff a new column has been
added`.\\r\\n- For example, if user has already\nfetched the 3rd batch,
data for\\r\\n1st,2nd and 3rd will be fetched\ntogether when a column
has been added,\\r\\notherwise, data will be\nfetched
incrementally.\\r\\n\\r\\n### Issue with Elastic
search\nlimit\\r\\n\\r\\n- Elastic search has a limit of 10K hits at max
but we\nthrow error at\\r\\n10K which should be allowed.\\r\\n - Error
should be\nthrown at anything `>10K`. 10001 for example.\\r\\n -  This
PR fixes that\njust for timeline by allowing 10K hits.\\r\\n\\r\\n###
Removal of obsolete\ncode\\r\\n\\r\\nBelow files related to old Timeline
code are removed
as\nwell:\\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:\nPhilippe
Oberti\n<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\nHunting:Investigations\",\"backport:prev-minor\",\"v8.16.3\"],\"number\":204034,\"url\":\"https://github.com/elastic/kibana/pull/204034\",\"mergeCommit\":{\"message\":\"[Security\nSolution]
Fix timeline dynamic batching
(#204034)\\n\\n##\nSummary\\r\\n\\r\\nHandles :\\r\\n\\r\\n\\r\\n###
Issue with
Batches\\r\\n-\nhttps://github.com/elastic/kibana/issues/201405\\r\\n-
Timeline had a bug\nwhere if users fetched multiple batches and then
if\\r\\nuser adds a new\ncolumn, the value of this new columns will only
be\\r\\nfetched for the\nlatest batch and not old batches.\\r\\n- This
PR fixes that  by\ncumulatively fetching the data for old
batches\\r\\ntill current batch\n`iff a new column has been
added`.\\r\\n- For example, if user has already\nfetched the 3rd batch,
data for\\r\\n1st,2nd and 3rd will be fetched\ntogether when a column
has been added,\\r\\notherwise, data will be\nfetched
incrementally.\\r\\n\\r\\n### Issue with Elastic
search\nlimit\\r\\n\\r\\n- Elastic search has a limit of 10K hits at max
but we\nthrow error at\\r\\n10K which should be allowed.\\r\\n - Error
should be\nthrown at anything `>10K`. 10001 for example.\\r\\n -  This
PR fixes that\njust for timeline by allowing 10K hits.\\r\\n\\r\\n###
Removal of obsolete\ncode\\r\\n\\r\\nBelow files related to old Timeline
code are removed
as\nwell:\\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:\nPhilippe
Oberti\n<philippe.oberti@elastic.co>\",\"sha\":\"088169f446788f9fa8800d77817881524514943e\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"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\nSolution]
Fix timeline dynamic batching
(#204034)\\n\\n##\nSummary\\r\\n\\r\\nHandles :\\r\\n\\r\\n\\r\\n###
Issue with
Batches\\r\\n-\nhttps://github.com/elastic/kibana/issues/201405\\r\\n-
Timeline had a bug\nwhere if users fetched multiple batches and then
if\\r\\nuser adds a new\ncolumn, the value of this new columns will only
be\\r\\nfetched for the\nlatest batch and not old batches.\\r\\n- This
PR fixes that  by\ncumulatively fetching the data for old
batches\\r\\ntill current batch\n`iff a new column has been
added`.\\r\\n- For example, if user has already\nfetched the 3rd batch,
data for\\r\\n1st,2nd and 3rd will be fetched\ntogether when a column
has been added,\\r\\notherwise, data will be\nfetched
incrementally.\\r\\n\\r\\n### Issue with Elastic
search\nlimit\\r\\n\\r\\n- Elastic search has a limit of 10K hits at max
but we\nthrow error at\\r\\n10K which should be allowed.\\r\\n - Error
should be\nthrown at anything `>10K`. 10001 for example.\\r\\n -  This
PR fixes that\njust for timeline by allowing 10K hits.\\r\\n\\r\\n###
Removal of obsolete\ncode\\r\\n\\r\\nBelow files related to old Timeline
code are removed
as\nwell:\\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:\nPhilippe
Oberti\n<philippe.oberti@elastic.co>\",\"sha\":\"088169f446788f9fa8800d77817881524514943e\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.3\",\"labelRegex\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"url\":\"https://github.com/elastic/kibana/pull/205674\",\"number\":205674,\"state\":\"OPEN\"},{\"url\":\"https://github.com/elastic/kibana/pull/205676\",\"number\":205676,\"branch\":\"8.17\",\"state\":\"OPEN\"}]}]\nBACKPORT-->\n\n---------\n\nCo-authored-by:
Philippe Oberti <philippe.oberti@elastic.co>\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>"}},{"url":"https://github.com/elastic/kibana/pull/205674","number":205674,"branch":"8.16","state":"OPEN"}]}]
BACKPORT-->
2025-02-08 21:52:50 +01:00
..
kbn-ambient-common-types Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-ambient-ftr-types Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-ambient-storybook-types Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-ambient-ui-types Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-apm-synthtrace [8.18] [Synthtrace] Introducing teardown for scenarios (#209739) (#209798) 2025-02-05 18:24:26 +01:00
kbn-apm-synthtrace-client [8.x] [One Discover] Display stacktrace in the logs overview tab (#204521) (#208115) 2025-01-28 15:05:59 +02:00
kbn-axe-config Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-babel-preset [8.18] [Security Solution] Fix timeline dynamic batching (#204034) | [ Security Solution ] Fix Refetch logic with new timeline batching (#205893) (#210066) 2025-02-08 21:52:50 +01:00
kbn-babel-register [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-operations (#202739) (#205320) 2024-12-31 19:01:38 +01:00
kbn-babel-transform [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-bazel-runner Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-capture-oas-snapshot-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-check-mappings-update-cli [8.x] [Entity Analytics] [Entity Store] [API] Changes to support event.ingested as a configurable timestamp field for init and enable endpoints (#208201) (#208866) 2025-01-30 10:11:36 +05:30
kbn-check-prod-native-modules-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-ci-stats-core [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-ci-stats-performance-metrics Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-ci-stats-reporter [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-ci-stats-shipper-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-cli-dev-mode [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-presentation (#204843) (#205120) 2024-12-24 08:44:32 +01:00
kbn-code-owners [8.x] [code-owners] Add area information to code owner entries (#205143) (#205147) 2024-12-24 12:11:18 -06:00
kbn-cypress-config [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-dependency-usage [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-security (#202748) (#205569) 2025-01-06 16:48:09 +03:00
kbn-dev-cli-errors [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-dev-cli-runner [8.x] SKA: Update broken references and URLs (#206836) (#208479) 2025-01-28 10:09:09 +01:00
kbn-dev-proc-runner [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-dev-utils [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-docs-utils [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-visualizations (#202754) (#205974) 2025-01-13 10:53:37 +00:00
kbn-es [8.x] [SecuritySolution][Endpoint] Update serverless roles to include stack connector sub-privilege (#208155) (#208420) 2025-01-27 19:18:21 +00:00
kbn-es-archiver [8.x] [ES &#x60;body&#x60; removal] &#x60;@elastic/appex-qa&#x60; (#204878) (#204916) 2024-12-19 06:55:11 -06:00
kbn-eslint-config [8.x] Upgrade EUI to v98.2.1-borealis.1 (#204783) 2025-01-08 09:59:50 +00:00
kbn-eslint-plugin-css [8.x] Resolve false positives with eslint no color rule (#204848) (#204906) 2024-12-19 06:23:17 -06:00
kbn-eslint-plugin-disable [8.x] Add ESLINT constraints to detect inter-group dependencies (#194810) (#197670) 2024-10-24 13:20:30 -07:00
kbn-eslint-plugin-eslint Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-eslint-plugin-i18n [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-visualizations (#202754) (#205974) 2025-01-13 10:53:37 +00:00
kbn-eslint-plugin-imports [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-operations (#202739) (#205320) 2024-12-31 19:01:38 +01:00
kbn-eslint-plugin-telemetry [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/obs-ux-infra_services-team (#202830) (#205231) 2024-12-29 13:10:37 -06:00
kbn-expect [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-failed-test-reporter-cli [8.x] [kbn-scout-reporting] add failed test reporter (#205096) (#206849) 2025-01-17 13:56:18 +00:00
kbn-find-used-node-modules Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-ftr-common-functional-services [8.x] [kbn-test] add forceNewSession option to re-generate session cookie (#199018) (#204583) 2024-12-18 08:43:32 -06:00
kbn-ftr-common-functional-ui-services [8.x] [Data Usage] functional tests (#203166) (#204019) 2024-12-12 09:07:51 -06:00
kbn-ftr-screenshot-filename [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-gen-ai-functional-testing [8.x] Add base FTR test coverage for inference APIs (#198000) (#202916) 2024-12-05 07:03:22 -06:00
kbn-generate [8.x] SKA: Cleanup and follow-up tasks (1 of many) (#206420) (#206656) 2025-01-14 20:02:02 +00:00
kbn-generate-console-definitions [8.x] SKA: Categorise remaining packages (#205875) (#205973) 2025-01-08 23:32:22 +00:00
kbn-get-repo-files [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-import-locator Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-import-resolver [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-io-ts-utils [8.x] [Perfomance] Track time range picker with onPageReady function (#202889) (#204564) 2024-12-17 08:17:58 -06:00
kbn-jest-serializers [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-journeys [8.18] [Journeys] Set traceparent for Playwright (#189800) (#209859) 2025-02-05 20:52:54 +01:00
kbn-json-ast Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-kibana-manifest-schema [8.x] Kibana Sustainable Architecture: Force &#x60;visibility: &#x27;private&#x27;&#x60; for solutions in manifest (#199452) (#199488) 2024-11-08 10:26:58 -06:00
kbn-lint-packages-cli [8.x] [codeowners] Filter kibanamachine (#199404) (#199864) 2024-11-12 14:38:18 -06:00
kbn-lint-ts-projects-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-managed-vscode-config Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-managed-vscode-config-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-management [8.x] Sustainable Kibana Architecture: Move the rest of shared-ux modules (#205924) (#206269) 2025-01-10 14:51:47 +00:00
kbn-manifest [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-mock-idp-plugin [8.x] Preparation for High Contrast Mode, Security domains (#202609) (#203493) 2024-12-09 16:43:23 -06:00
kbn-mock-idp-utils [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-openapi-bundler Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-openapi-generator [8.x] SKA: Relocate modules owned by @elastic/security-solution (#204523) 2024-12-17 20:13:10 +01:00
kbn-optimizer [8.18] [SLO]: require instance id in slo details schema (#209020) (#209568) 2025-02-04 18:07:25 +01:00
kbn-optimizer-webpack-helpers [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-peggy [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-peggy-loader Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-performance-testing-dataset-extractor [8.x] [ES &#x60;body&#x60; removal] &#x60;@elastic/appex-qa&#x60; (#204878) (#204916) 2024-12-19 06:55:11 -06:00
kbn-picomatcher Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-plugin-check [8.x] SKA: Categorise remaining packages (#205875) (#205973) 2025-01-08 23:32:22 +00:00
kbn-plugin-generator [8.x] Sustainable Kibana Architecture: Update tooling to take into account the new folders (#202327) (#202419) 2024-12-02 06:01:43 -06:00
kbn-plugin-helpers fix(NA): fixtures at packages/kbn-plugin-helpers/src/integration_tests/build.test.ts 2025-01-30 20:28:59 +00:00
kbn-relocate [8.x] SKA: Follow-up relocation (#208474) 2025-01-28 09:30:59 +01:00
kbn-repo-file-maps Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-repo-linter Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-repo-path [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-repo-source-classifier [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-visualizations (#202754) (#205974) 2025-01-13 10:53:37 +00:00
kbn-repo-source-classifier-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-scout [8.18] [scout] unique runId for reporting, disabled failed test reporter locally (#209507) (#210087) 2025-02-06 20:42:25 +01:00
kbn-scout-info [8.x] [kbn-scout] Scout reporter updates (#206431) (#208651) 2025-01-29 13:50:25 +01:00
kbn-scout-reporting [8.18] [scout] unique runId for reporting, disabled failed test reporter locally (#209507) (#210087) 2025-02-06 20:42:25 +01:00
kbn-set-map [8.x] SKA: Categorise remaining packages (#205875) (#205973) 2025-01-08 23:32:22 +00:00
kbn-some-dev-log [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-sort-package-json Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-spec-to-console Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-stdio-dev-helpers [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-storybook [8.x] Sustainable Kibana Architecture: Move plugins owned by @elastic/appex-sharedux (#204959) (#205508) 2025-01-05 19:48:48 +00:00
kbn-styled-components-mapping-cli [8.x] Update styled_components_files.js to include all files that import styled-components (#206084) 2025-01-10 22:11:34 +00:00
kbn-telemetry-tools [8.x] Fix telemetry CLI to write empty properties collection (#205746) (#205786) 2025-01-07 18:39:53 +00:00
kbn-test [8.x] [kbn-scout] Scout reporter updates (#206431) (#208651) 2025-01-29 13:50:25 +01:00
kbn-test-eui-helpers [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-test-jest-helpers [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-test-subj-selector [8.x] [scout] migrate more Discover tests (#201842) (#204748) 2024-12-18 08:50:13 -06:00
kbn-tooling-log [8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340) 2024-11-22 09:47:23 -06:00
kbn-ts-projects [Backport] Dependency Usage CLI (#201815) 2024-11-26 21:48:26 +01:00
kbn-ts-type-check-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-validate-next-docs-cli [8.x] [ci] Work around docosaurus errors (#206097) (#206150) 2025-01-10 00:31:36 +00:00
kbn-web-worker-stub Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-whereis-pkg-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-yarn-lock-validator Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
serverless/storybook/config [8.x] Sustainable Kibana Architecture: Move the rest of shared-ux modules (#205924) (#206269) 2025-01-10 14:51:47 +00:00
README.md [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-core (#201653) (#205563) 2025-01-05 16:32:00 +01:00

Kibana-related packages

This folder contains packages that are intended for use in Kibana and Kibana plugins.

tl;dr:

  • Don't publish to npm registry
  • Always use the @kbn namespace
  • Always set "private": true in package.json

Using these packages

We no longer publish these packages to the npm registry. Now, instead of specifying a version when including these packages, we rely on yarn workspaces, which sets up a symlink to the package.

For example if you want to use the @kbn/i18n package in Kibana itself, you can specify the dependency like this:

"@kbn/i18n": "1.0.0"

However, if you want to use this from a Kibana plugin, you need to use a link: dependency and account for the relative location of the Kibana repo, so it would instead be:

"@kbn/i18n": "link:../../kibana/src/platform/packages/shared/kbn-i18n"

then run yarn kbn bootstrap from the plugin directory.

Creating a new package

Run the following command from the root of the Kibana repo:

node scripts/generate package @kbn/<PACKAGE_NAME> --web --owner @elastic/<TEAM_NAME>

Unit tests for a package

Currently there is only one tool being used in order to test packages which is Jest. Below we will explain how it should be done.

Jest

A package should follow the pattern of having .test.js files as siblings of the source code files, and these run by Jest.

A package using the .test.js naming convention will have those tests automatically picked up by Jest and run by the unit test runner, currently mapped to the Kibana test script in the root package.json.

  • yarn test runs all unit tests.
  • yarn jest runs all Jest tests in Kibana.

In order for the plugin or package to use Jest, a jest.config.js file must be present in it's root. However, there are safeguards for this in CI should a test file be added without a corresponding config file.


Each package can also specify its own test script in the package's package.json, for cases where you'd prefer to run the tests from the local package directory.