-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Handle content stream errors in report pre-deletion #173792
Handle content stream errors in report pre-deletion #173792
Conversation
buildkite build this |
c1cd33b
to
ad94f1d
Compare
|
||
describe('successful downloads', () => { |
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.
changes above this line are to just restructure the tests
|
||
describe('successful downloads', () => { |
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.
changes above this line are to just restructure the tests
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
// passed to the `stream.end` callback from | ||
// the _final method of the ContentStream. | ||
// This event must be handled. | ||
stream.on('error', (err) => { |
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.
noice!!
Re-addresses elastic#171363 The bug was still evident, especially when using network throttling to add slight lag to the request turnaround times. This PR adds more handling of errors that could be thrown slightly prior to deleting the report document, when we try to clear all chunks of the report using the content stream. <details> <summary>Before</summary> https://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f </details> <details> <summary>After</summary> https://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78 </details> ### Checklist - [x] Unit tests (cherry picked from commit dc813c3)
Re-addresses elastic#171363 The bug was still evident, especially when using network throttling to add slight lag to the request turnaround times. This PR adds more handling of errors that could be thrown slightly prior to deleting the report document, when we try to clear all chunks of the report using the content stream. <details> <summary>Before</summary> https://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f </details> <details> <summary>After</summary> https://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78 </details> ### Checklist - [x] Unit tests (cherry picked from commit dc813c3)
💔 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 |
Re-addresses elastic#171363 The bug was still evident, especially when using network throttling to add slight lag to the request turnaround times. This PR adds more handling of errors that could be thrown slightly prior to deleting the report document, when we try to clear all chunks of the report using the content stream. <details> <summary>Before</summary> https://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f </details> <details> <summary>After</summary> https://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78 </details> ### Checklist - [x] Unit tests (cherry picked from commit dc813c3) # Conflicts: # x-pack/plugins/reporting/server/routes/common/jobs/get_job_routes.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…174139) # Backport This will backport the following commits from `main` to `8.12`: - [Handle content stream errors in report pre-deletion (#173792)](#173792) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Tim Sullivan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-02T23:00:53Z","message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:prev-minor","backport:prev-MAJOR","v8.13.0"],"title":"Handle content stream errors in report pre-deletion","number":173792,"url":"https://github.com/elastic/kibana/pull/173792","mergeCommit":{"message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173792","number":173792,"mergeCommit":{"message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c"}}]}] BACKPORT--> Co-authored-by: Tim Sullivan <[email protected]>
* main: (4129 commits) [Logs Explorer] Change the default link for "Discover" in the serverless nav (#173420) [Fleet] fix unhandled error in agent details when components are missing (#174152) [Obs UX] Unskip transaction duration alerts test (#174069) [Fleet] Fix keep policies up to date after package install (#174093) [Profiling] Stack traces embeddable (#173905) [main] Sync bundled packages with Package Storage (#174115) [SLO Form] Refactor to use kibana data view component (#173513) [Obs UX] Unskip APM Service Inventory Journey (#173510) [Obs UX] Unskip preview_chart_error_count test (#173624) [api-docs] 2024-01-03 Daily api_docs build (#174142) Update babel runtime helpers (#171745) Handle content stream errors in report pre-deletion (#173792) [Cloud Posture] [Quick wins] Enable edit DataView on the Misconfigurations Findings Table (#173870) [ftr] abort retry on invalid webdriver session (#174092) Upgrade openai to 4.24.1 (#173934) chore(NA): bump node into v20 (#173461) [Security Solution][Endpoint] Fix index name pattern in SentinelOne dev. script (#174105) fix versions.json [Obs AI Assistant] Add guardrails (#174060) [ML] Transforms: Refactor validators and add unit tests. (#173736) ...
…174140) # Backport This will backport the following commits from `main` to `8.11`: - [Handle content stream errors in report pre-deletion (#173792)](#173792) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Tim Sullivan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-02T23:00:53Z","message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:prev-minor","backport:prev-MAJOR","v8.12.0","v8.13.0","v8.11.4"],"number":173792,"url":"https://github.com/elastic/kibana/pull/173792","mergeCommit":{"message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c"}},"sourceBranch":"main","suggestedTargetBranches":["8.12","8.11"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173792","number":173792,"mergeCommit":{"message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c"}},{"branch":"8.11","label":"v8.11.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…174141) # Backport This will backport the following commits from `main` to `7.17`: - [Handle content stream errors in report pre-deletion (#173792)](#173792) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Tim Sullivan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-02T23:00:53Z","message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:prev-minor","backport:prev-MAJOR","v8.12.0","v8.13.0","v8.11.4"],"number":173792,"url":"https://github.com/elastic/kibana/pull/173792","mergeCommit":{"message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c"}},"sourceBranch":"main","suggestedTargetBranches":["8.12","8.11"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173792","number":173792,"mergeCommit":{"message":"Handle content stream errors in report pre-deletion (#173792)\n\nRe-addresses https://github.com/elastic/kibana/issues/171363\r\n\r\nThe bug was still evident, especially when using network throttling to\r\nadd slight lag to the request turnaround times.\r\n\r\nThis PR adds more handling of errors that could be thrown slightly prior\r\nto deleting the report document, when we try to clear all chunks of the\r\nreport using the content stream.\r\n\r\n<details>\r\n<summary>Before</summary>\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/c27fe314-0f93-42b4-8076-99a1e30b8d2f\r\n\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>After</summary>\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/908371/4c1f5edd-73f1-4ca4-a40a-f900ca5f9c78\r\n\r\n\r\n</details>\r\n\r\n### Checklist\r\n- [x] Unit tests","sha":"dc813c351fe111c895e85a188372ad31625d8c8c"}},{"branch":"8.11","label":"v8.11.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Re-addresses #171363
The bug was still evident, especially when using network throttling to add slight lag to the request turnaround times.
This PR adds more handling of errors that could be thrown slightly prior to deleting the report document, when we try to clear all chunks of the report using the content stream.
Before
byugyhgaslisdtur-before.mp4
After
byugyhgaslisdtur-after.mp4
Checklist