-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make readWithPit integration tests less sensitive to ES response size #180261
Make readWithPit integration tests less sensitive to ES response size #180261
Conversation
/ci |
if (Either.isRight(rightResponse)) { | ||
await expect(Either.isRight(rightResponse)).toBe(true); | ||
} else { | ||
console.log( | ||
'got a left: ', | ||
(rightResponse as Either.Left<EsResponseTooLargeError>).left.type | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also fail the test. Perhaps this logic could be:
const rightResponse = await readWithPitTask()
if (Either.isLeft(rightResponse)) {
fail(`Expected a successful response but got ${rightResponse.left}`);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this was meant as a throw-away debugging PR but CI won't run when there's console.log's and I think it'd be better for the future to have your suggestion, should be enough to find the cause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it looks like my suggestion was wrong, the fail
function does not actually exist in runtime (despite TS thinking it does). Looks it was removed in jest 27. Should probably just use throw new Error(...)
!
console.log(e); | ||
console.log(e.message); | ||
console.log(JSON.stringify(e.meta)); | ||
console.log(JSON.stringify(e.body)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this should be reverted?
Oh wait, was this intended to be merged? Ignore my review in that case! |
/ci |
/ci |
Pinging @elastic/kibana-core (Team:Core) |
Make sure to backport this to 8.13, as we've also skipped the test there. |
/ci |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
…elastic#180261) ## Summary Stateless ES increased their `pit_id` length from 185 to 465 chars. Our tests were quite sensitive to response sizes so these started failing. This PR makes tests less sensitive to the exact response size because I don't think it matters that much, as long as we know that `batchSize: 1` is ✅ while a `batchSize: 1000` is 🔴 . ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit c912174)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…se size (#180261) (#181522) # Backport This will backport the following commits from `main` to `8.14`: - [Make readWithPit integration tests less sensitive to ES response size (#180261)](#180261) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Rudolf Meijering","email":"skaapgif@gmail.com"},"sourceCommit":{"committedDate":"2024-04-24T07:34:42Z","message":"Make readWithPit integration tests less sensitive to ES response size (#180261)\n\n## Summary\r\n\r\nStateless ES increased their `pit_id` length from 185 to 465 chars. Our\r\ntests were quite sensitive to response sizes so these started failing.\r\nThis PR makes tests less sensitive to the exact response size because I\r\ndon't think it matters that much, as long as we know that `batchSize: 1`\r\nis ✅ while a `batchSize: 1000` is 🔴 .\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"c91217463713d90ff454b7cb968151e3a2caa533","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","backport:prev-minor","v8.15.0"],"title":"Make readWithPit integration tests less sensitive to ES response size","number":180261,"url":"https://github.com/elastic/kibana/pull/180261","mergeCommit":{"message":"Make readWithPit integration tests less sensitive to ES response size (#180261)\n\n## Summary\r\n\r\nStateless ES increased their `pit_id` length from 185 to 465 chars. Our\r\ntests were quite sensitive to response sizes so these started failing.\r\nThis PR makes tests less sensitive to the exact response size because I\r\ndon't think it matters that much, as long as we know that `batchSize: 1`\r\nis ✅ while a `batchSize: 1000` is 🔴 .\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"c91217463713d90ff454b7cb968151e3a2caa533"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/180261","number":180261,"mergeCommit":{"message":"Make readWithPit integration tests less sensitive to ES response size (#180261)\n\n## Summary\r\n\r\nStateless ES increased their `pit_id` length from 185 to 465 chars. Our\r\ntests were quite sensitive to response sizes so these started failing.\r\nThis PR makes tests less sensitive to the exact response size because I\r\ndon't think it matters that much, as long as we know that `batchSize: 1`\r\nis ✅ while a `batchSize: 1000` is 🔴 .\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"c91217463713d90ff454b7cb968151e3a2caa533"}}]}] BACKPORT--> Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
## Summary Fixes #152677 It seems that CI eventually times out whilst creating SO indices for testing purposes. The PR aims at preventing this by increasing that timeout from `5.5s` to `10s`. Last 4 CI failures report the exact same `Request timed out` error: <img width="1037" alt="image" src="https://github.com/elastic/kibana/assets/25349407/8b4856f7-d667-4e95-b623-a085ab756e84"> --- Fixes #167288 The PIT ids are much longer on serverless. This causes issues with some our tests, which were checking response sizes. PR #180261 attempted at fixing it, but the parameters were not properly adjusted, because the tests first do a valid request, followed by an invalid one.
## Summary Fixes elastic#152677 It seems that CI eventually times out whilst creating SO indices for testing purposes. The PR aims at preventing this by increasing that timeout from `5.5s` to `10s`. Last 4 CI failures report the exact same `Request timed out` error: <img width="1037" alt="image" src="https://github.com/elastic/kibana/assets/25349407/8b4856f7-d667-4e95-b623-a085ab756e84"> --- Fixes elastic#167288 The PIT ids are much longer on serverless. This causes issues with some our tests, which were checking response sizes. PR elastic#180261 attempted at fixing it, but the parameters were not properly adjusted, because the tests first do a valid request, followed by an invalid one. (cherry picked from commit 75c228c)
#181676) # Backport This will backport the following commits from `main` to `8.14`: - [Adjust esClient parameters to prevent flaky behaviors (#181566)](#181566) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gerard Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2024-04-25T09:37:37Z","message":"Adjust esClient parameters to prevent flaky behaviors (#181566)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/152677\r\n\r\nIt seems that CI eventually times out whilst creating SO indices for\r\ntesting purposes.\r\nThe PR aims at preventing this by increasing that timeout from `5.5s` to\r\n`10s`.\r\n\r\n\r\nLast 4 CI failures report the exact same `Request timed out` error:\r\n\r\n<img width=\"1037\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/25349407/8b4856f7-d667-4e95-b623-a085ab756e84\">\r\n\r\n---\r\n\r\nFixes https://github.com/elastic/kibana/issues/167288\r\n\r\nThe PIT ids are much longer on serverless. This causes issues with some\r\nour tests, which were checking response sizes.\r\nPR #180261 attempted at fixing it,\r\nbut the parameters were not properly adjusted, because the tests first\r\ndo a valid request, followed by an invalid one.","sha":"75c228c4ea5eea1c6c87218382bafea827a185b9","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","test-failure-flaky","backport:prev-minor","v8.15.0"],"title":"Adjust esClient parameters to prevent flaky behaviors","number":181566,"url":"https://github.com/elastic/kibana/pull/181566","mergeCommit":{"message":"Adjust esClient parameters to prevent flaky behaviors (#181566)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/152677\r\n\r\nIt seems that CI eventually times out whilst creating SO indices for\r\ntesting purposes.\r\nThe PR aims at preventing this by increasing that timeout from `5.5s` to\r\n`10s`.\r\n\r\n\r\nLast 4 CI failures report the exact same `Request timed out` error:\r\n\r\n<img width=\"1037\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/25349407/8b4856f7-d667-4e95-b623-a085ab756e84\">\r\n\r\n---\r\n\r\nFixes https://github.com/elastic/kibana/issues/167288\r\n\r\nThe PIT ids are much longer on serverless. This causes issues with some\r\nour tests, which were checking response sizes.\r\nPR #180261 attempted at fixing it,\r\nbut the parameters were not properly adjusted, because the tests first\r\ndo a valid request, followed by an invalid one.","sha":"75c228c4ea5eea1c6c87218382bafea827a185b9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181566","number":181566,"mergeCommit":{"message":"Adjust esClient parameters to prevent flaky behaviors (#181566)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/152677\r\n\r\nIt seems that CI eventually times out whilst creating SO indices for\r\ntesting purposes.\r\nThe PR aims at preventing this by increasing that timeout from `5.5s` to\r\n`10s`.\r\n\r\n\r\nLast 4 CI failures report the exact same `Request timed out` error:\r\n\r\n<img width=\"1037\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/25349407/8b4856f7-d667-4e95-b623-a085ab756e84\">\r\n\r\n---\r\n\r\nFixes https://github.com/elastic/kibana/issues/167288\r\n\r\nThe PIT ids are much longer on serverless. This causes issues with some\r\nour tests, which were checking response sizes.\r\nPR #180261 attempted at fixing it,\r\nbut the parameters were not properly adjusted, because the tests first\r\ndo a valid request, followed by an invalid one.","sha":"75c228c4ea5eea1c6c87218382bafea827a185b9"}}]}] BACKPORT--> Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
## Summary Fixes elastic#152677 It seems that CI eventually times out whilst creating SO indices for testing purposes. The PR aims at preventing this by increasing that timeout from `5.5s` to `10s`. Last 4 CI failures report the exact same `Request timed out` error: <img width="1037" alt="image" src="https://github.com/elastic/kibana/assets/25349407/8b4856f7-d667-4e95-b623-a085ab756e84"> --- Fixes elastic#167288 The PIT ids are much longer on serverless. This causes issues with some our tests, which were checking response sizes. PR elastic#180261 attempted at fixing it, but the parameters were not properly adjusted, because the tests first do a valid request, followed by an invalid one.
Summary
Stateless ES increased their
pit_id
length from 185 to 465 chars. Our tests were quite sensitive to response sizes so these started failing. This PR makes tests less sensitive to the exact response size because I don't think it matters that much, as long as we know thatbatchSize: 1
is ✅ while abatchSize: 1000
is 🔴 .Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers