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

[kbn/std] add observable helpers to aid with rxjs 7 upgrade #79752

Merged
merged 21 commits into from
Oct 9, 2020

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Oct 6, 2020

Addresses part of #79751

Implements 5 observables helpers in @kbn/std:

firstValueFrom(x$: Observable<T>): Promise<T>: equivalent of x$.pipe(first()).toPromise(), resolves with the first value, unsubscribes after the first notification, rejects if o$ completes without any notifications.

lastValueFrom(x$: Observable<T>): Promise<T>: equivalent of x$.pipe(last()).toPromise(), resolves after the observable completes with the last notification value, rejects if o$ 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 our toPromise() usage before we upgrade to RxJS v7.

@spalger spalger added Team:Operations Team label for Operations Team v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Oct 6, 2020
@spalger spalger requested review from a team as code owners October 6, 2020 19:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

Copy link
Contributor

@mshustov mshustov left a 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?

@spalger spalger requested a review from rudolf October 8, 2020 21:29
@spalger spalger added the v7.11.0 label Oct 8, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

@kbn/optimizer bundle module count

id before after diff
core 440 441 +1
data 570 571 +1
graph 169 170 +1
ingestManager 548 549 +1
uiActionsEnhanced 138 139 +1
total +5

async chunks size

id before after diff
data 273.8KB 274.7KB +944.0B
graph 1.3MB 1.3MB +945.0B
ingestManager 1.2MB 1.2MB +944.0B
total +2.8KB

distributable file count

id before after diff
default 48446 48447 +1
oss 29187 29188 +1

page load bundle size

id before after diff
core 651.8KB 652.7KB +938.0B
data 1.1MB 1.1MB +65.0B
graph 16.1KB 16.2KB +65.0B
uiActionsEnhanced 326.7KB 327.7KB +1005.0B
total +2.0KB

History

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

Copy link
Member

@mistic mistic left a comment

Choose a reason for hiding this comment

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

LGTM

@spalger spalger merged commit f5fc765 into elastic:master Oct 9, 2020
@spalger spalger deleted the implement/observable-helpers branch October 9, 2020 00:45
spalger added a commit to spalger/kibana that referenced this pull request Oct 9, 2020
spalger added a commit to spalger/kibana that referenced this pull request Oct 9, 2020
spalger added a commit that referenced this pull request Oct 9, 2020
spalger added a commit that referenced this pull request Oct 9, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Oct 12, 2020
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.10.0 v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants