-
Notifications
You must be signed in to change notification settings - Fork 893
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
feat: replace Bluebird usage with native Promise API #8318
base: main
Are you sure you want to change the base?
feat: replace Bluebird usage with native Promise API #8318
Conversation
Signed-off-by: hainenber <[email protected]>
❌ Invalid Prefix For Manual Changeset CreationInvalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files. If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description. |
Signed-off-by: hainenber <[email protected]>
❌ Invalid Prefix For Manual Changeset CreationInvalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files. If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description. |
1 similar comment
❌ Invalid Prefix For Manual Changeset CreationInvalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files. If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description. |
|
||
import { createListStream, createPromiseFromStreams, createConcatStream } from '../streams'; | ||
|
||
import { createGenerateDocRecordsStream } from './generate_doc_records_stream'; | ||
import { Progress } from '../progress'; | ||
import { createStubStats, createStubClient } from './test_stubs'; | ||
|
||
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
|
||
import { createListStream, createPromiseFromStreams } from '../streams'; | ||
|
||
import { Progress } from '../progress'; | ||
import { createIndexDocRecordsStream } from './index_doc_records_stream'; | ||
import { createStubStats, createStubClient, createPersonDocRecords } from './test_stubs'; | ||
import { nextTick } from '../../../../../src/test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
import { createPromiseFromStreams } from './promise_from_streams'; | ||
import { createListStream } from './list_stream'; | ||
import { createMapStream } from './map_stream'; | ||
import { createConcatStream } from './concat_stream'; | ||
import { nextTick } from '../../../../../src/test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
@@ -28,7 +28,7 @@ | |||
* under the License. | |||
*/ | |||
|
|||
import { delay } from 'bluebird'; | |||
import { nextTick } from '../../../../../../src/test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
src/cli/cluster/cluster.mock.ts
Outdated
@@ -33,7 +33,7 @@ | |||
// eslint-disable-next-line max-classes-per-file | |||
import { EventEmitter } from 'events'; | |||
import { assign, random } from 'lodash'; | |||
import { delay } from 'bluebird'; | |||
import { nextTick } from '../../../src/test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
import { createPromiseFromStreams } from './promise_from_streams'; | ||
import { createListStream } from './list_stream'; | ||
import { createMapStream } from './map_stream'; | ||
import { createConcatStream } from './concat_stream'; | ||
import { nextTick } from '../../../../../src/test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
import { TagCloud } from './tag_cloud'; | ||
import { setHTMLElementOffset, setSVGElementGetBBox } from '../../../../test_utils/public'; | ||
import { nextTick } from '../../../../test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
seriesLists.map(function (seriesList) { | ||
return seriesList.list[0]; | ||
}) |
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.
nit
seriesLists.map(function (seriesList) { | |
return seriesList.list[0]; | |
}) | |
seriesLists.map(({ list }) => list[0]) |
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.
Thanks for the nit. I've fixed this in local and push. Would like to commit yours but looks like it'll get flagged as ESLint issue :((
@@ -28,7 +28,7 @@ | |||
* under the License. | |||
*/ | |||
|
|||
import { delay } from 'bluebird'; | |||
import { nextTick } from 'src/test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
@@ -28,7 +28,7 @@ | |||
* under the License. | |||
*/ | |||
|
|||
import { delay } from 'bluebird'; | |||
import { nextTick } from 'src/test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
import { WebElement, WebDriver, By, Key } from 'selenium-webdriver'; | ||
import { PNG } from 'pngjs'; | ||
import { nextTick } from 'src/test_utils/public/helpers'; |
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.
Let's use timers/promises
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.
Fixed in HEAD. Thanks!
@@ -15981,7 +15976,7 @@ string-similarity@^4.0.1: | |||
resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-4.0.4.tgz#42d01ab0b34660ea8a018da8f56a3309bb8b2a5b" | |||
integrity sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ== | |||
|
|||
"string-width-cjs@npm:string-width@^4.2.0": | |||
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: |
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.
Can you please undo these unrelated changes?
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.
This was stuck after running yarn
, btw
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.
Thanks for this. Please don't mind the repeated texts; they are for my tracking.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8318 +/- ##
=======================================
Coverage 60.95% 60.96%
=======================================
Files 3766 3766
Lines 89364 89361 -3
Branches 13978 13978
=======================================
+ Hits 54468 54475 +7
+ Misses 31498 31488 -10
Partials 3398 3398
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: hainenber <[email protected]>
Signed-off-by: hainenber <[email protected]>
Signed-off-by: hainenber <[email protected]>
@hainenber thanks for contributing. Could you fix the comment? I currently add this to 2.19. If no progress, we will need to move this to draft then. |
hello there, I believe I've addressed the comments as they're now outdated :D Let me know if there's anything I can do to move the PR forward! |
Description
Replace Bluebird usage in all
@osd
packages and own codebase with native Promise API.Issues Resolved
Screenshot
Testing the changes
All CI should pass
Changelog
Check List
yarn test:jest
yarn test:jest_integration