-
Notifications
You must be signed in to change notification settings - Fork 98
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: support context propagation in bluebird #872
Conversation
bcf2603
to
a1bd792
Compare
👋 @googleapis/node-team @kjin this is gettin a little moldy. Are we moving forward with this PR? |
e00ec40
to
439956e
Compare
@googleapis/node-team This is ready for another look. Note that the knex plugin has now been removed, it seems to be superfluous. |
description: 'immediate resolve + child from then callback', | ||
makePromise: () => new BPromise(res => res()), | ||
thenFn: (p, cb) => p.then(cb) | ||
} as TestCase, |
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.
why is this cast needed here and elsewhere?
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.
It's a TypeScript limitation, there's no other way to make each individual TestCase
object self-consistent (TS doesn't know that the return type of makePromise
should be the same as the input for thenFn
)
This PR adds support for context propagation across bluebird Promises. (Edit: it also removed the knex plugin, which seems to be rendered superfluous by the bluebird plugin)