Skip to content
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

Fix some unhandledRejections #168009

Merged
merged 3 commits into from
Oct 6, 2023
Merged

Fix some unhandledRejections #168009

merged 3 commits into from
Oct 6, 2023

Conversation

afharo
Copy link
Member

@afharo afharo commented Oct 4, 2023

Summary

While stress-testing Kibana, I noticed that it triggered a few unhandled rejections.

Some of them were caused because we provided an async method to RxJS.Observable.subscribe. Subscribe can only run synchronous methods. If any async operations are needed, they should be done via (switch|concat|merge)Map. There are a bunch of other usages, but all of them are in the public codebase. While we'll need to spend time fixing those, a failure there wouldn't crash the server.

I also noticed that UI Settings read method might throw an unhandled rejection. But I was not able to find the caller that calls it without handling the rejection. cc @elastic/kibana-core, we should look further into that.

For maintainers

@afharo afharo added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc performance Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! :ml Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:ML Team label for ML (also use :ml) Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Team:Performance labels Oct 4, 2023
@afharo afharo self-assigned this Oct 4, 2023
@afharo afharo force-pushed the unhandled-rejections branch from 65081c9 to 1195c19 Compare October 4, 2023 15:29
@afharo
Copy link
Member Author

afharo commented Oct 4, 2023

@elasticmachine merge upstream

@afharo
Copy link
Member Author

afharo commented Oct 5, 2023

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
links 32.0KB 32.0KB +22.0B
telemetry 19.4KB 19.5KB +28.0B
total +50.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @afharo

@afharo afharo marked this pull request as ready for review October 5, 2023 11:27
@afharo afharo requested review from a team as code owners October 5, 2023 11:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@afharo afharo added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Oct 5, 2023
Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response ops changes lgtm

@kc13greiner kc13greiner self-requested a review October 5, 2023 11:58
Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ML/AIOps related changes LGTM.

Copy link
Member

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

presentation changes lgtm! thanks for resolving this! 😄

code review and tested links embeddable

Copy link
Contributor

@kc13greiner kc13greiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@afharo afharo enabled auto-merge (squash) October 5, 2023 22:46
@afharo afharo merged commit baff0eb into elastic:main Oct 6, 2023
@afharo afharo deleted the unhandled-rejections branch October 6, 2023 11:44
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 6, 2023
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.11

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 6, 2023
# Backport

This will backport the following commits from `main` to `8.11`:
- [Fix some unhandledRejections
(#168009)](#168009)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2023-10-06T11:44:52Z","message":"Fix
some unhandledRejections
(#168009)","sha":"baff0eb32c894eed537bb563068c9743e98e2412","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","performance","Team:Security",":ml","Team:Presentation","Team:uptime","release_note:skip","Team:ResponseOps","Team:ML","Team:SharedUX","backport:prev-minor","Team:Performance","v8.12.0"],"number":168009,"url":"https://github.com/elastic/kibana/pull/168009","mergeCommit":{"message":"Fix
some unhandledRejections
(#168009)","sha":"baff0eb32c894eed537bb563068c9743e98e2412"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168009","number":168009,"mergeCommit":{"message":"Fix
some unhandledRejections
(#168009)","sha":"baff0eb32c894eed537bb563068c9743e98e2412"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
dej611 pushed a commit to dej611/kibana that referenced this pull request Oct 17, 2023
@afharo afharo mentioned this pull request Oct 23, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) :ml performance release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:ML Team label for ML (also use :ml) Team:Performance Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.11.0 v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants