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

feat: support context propagation in bluebird #872

Merged
merged 3 commits into from
Feb 19, 2019
Merged

feat: support context propagation in bluebird #872

merged 3 commits into from
Feb 19, 2019

Conversation

kjin
Copy link
Contributor

@kjin kjin commented Sep 27, 2018

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)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 27, 2018
@ghost ghost assigned kjin Sep 27, 2018
@kjin kjin mentioned this pull request Sep 27, 2018
@JustinBeckwith
Copy link
Contributor

👋 @googleapis/node-team @kjin this is gettin a little moldy. Are we moving forward with this PR?

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Feb 7, 2019
@kjin kjin changed the title [experimental] feat: support context propagation in bluebird feat: support context propagation in bluebird Feb 13, 2019
@kjin kjin force-pushed the bluebird-patch branch 2 times, most recently from e00ec40 to 439956e Compare February 14, 2019 21:55
@kjin
Copy link
Contributor Author

kjin commented Feb 15, 2019

@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,
Copy link
Contributor

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?

Copy link
Contributor Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. 🚨 This issue needs some love.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants