-
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
[kbn/std] add observable helpers to aid with rxjs 7 upgrade #79752
Conversation
Pinging @elastic/kibana-operations (Team:Operations) |
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.
@rudolf Do you mind taking a look as well?
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
distributable file count
page load bundle size
History
To update your PR or re-run it, just comment with: |
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.
LGTM
…79752) Co-authored-by: spalger <[email protected]>
…79752) Co-authored-by: spalger <[email protected]>
…80090) Co-authored-by: spalger <[email protected]> Co-authored-by: spalger <[email protected]>
…80089) Co-authored-by: spalger <[email protected]> Co-authored-by: spalger <[email protected]>
* master: (23 commits) Table visualization renderer (elastic#79455) Migrate Jest JUnit reporter to TS (elastic#79919) store sorted bundleRefExportIds (elastic#80011) update chromedriver dependency to 86.0.0 (elastic#79972) [Security Solution][Case] Fix bug when changing connectors (elastic#80002) [kbn/std] add observable helpers to aid with rxjs 7 upgrade (elastic#79752) [Security Solution][Resolver] Pill numbers in compact notation (elastic#80038) [Logs UI] Sync logs timerange with wider Kibana (elastic#79444) [DOCS] Adds quick start (elastic#78822) [Ingest Manager]Fix ingest manager UI renaming (elastic#80036) [Monitoring] Fixed internal monitoring check (elastic#79241) [Security Solution][Exception Modal] Removes list operators in exception modal for EQL rules (elastic#79871) Update development documentation about REST API best practices (elastic#80009) [Monitoring] Improve indices loading against larger metricbeat-* indices (elastic#79190) [CI] Move kibana build dir outside of repo for functional tests (elastic#80018) [kbn/optimizer] bump low or add missing limits when updating automatically (elastic#80013) [Enterprise Search] Added a Credentials page to App Search (elastic#79749) [DOCS] Canvas refresh for 7.10 (elastic#80017) [TSVB] Add ignore global filters to series options (elastic#79337) Remove this check (elastic#79202) ...
Addresses part of #79751
Implements 5 observables helpers in
@kbn/std
:firstValueFrom(x$: Observable<T>): Promise<T>
: equivalent ofx$.pipe(first()).toPromise()
, resolves with the first value, unsubscribes after the first notification, rejects ifo$
completes without any notifications.lastValueFrom(x$: Observable<T>): Promise<T>
: equivalent ofx$.pipe(last()).toPromise()
, resolves after the observable completes with the last notification value, rejects ifo$
completes without any notifications.In addition to adding these helpers I've consumed them from the
@kbn/optimizer
, but as part of working towards #79751 I plan on submitting PRs to different parts of the code base implementing these helpers to remove all of ourtoPromise()
usage before we upgrade to RxJS v7.