worried-engineer-33884
07/23/2019, 5:04 PMgetSecret
from Promise<GetSecretResult>
to Promise<GetSecretResult> & GetSecretResult
. Turning this into an intersection type broke some of our code, and I'm not sure why this should be an intersection at all. Could someone enlighten me?
Thanks!lemon-spoon-91807
07/23/2019, 7:01 PMand I'm not sure why this should be an intersection at all
worried-engineer-33884
07/23/2019, 7:11 PMlemon-spoon-91807
07/23/2019, 7:12 PMPromise<T> & T
should still be passible to something that expects a Promise<T>
and it can now be passed to something that expects a Tworried-engineer-33884
07/23/2019, 7:13 PMPromise.resolve({id: "", stringValue, "", ...})
for all the values in the secret result interfacelemon-spoon-91807
07/23/2019, 7:13 PMpulumi.liftProperties(Promise.resolve({id: "", stringValue, "", ...}))
worried-engineer-33884
07/23/2019, 7:16 PMlemon-spoon-91807
07/23/2019, 7:17 PMworried-engineer-33884
07/23/2019, 7:17 PMlemon-spoon-91807
07/23/2019, 7:17 PM<Promise<Whatever> & Whatever>
worried-engineer-33884
07/23/2019, 7:18 PMpulumi.utils.liftProperties
lemon-spoon-91807
07/23/2019, 8:15 PMworried-engineer-33884
07/23/2019, 8:15 PMlemon-spoon-91807
07/23/2019, 8:20 PMworried-engineer-33884
07/24/2019, 11:40 AMmicroscopic-florist-22719
worried-engineer-33884
07/24/2019, 8:18 PMmicroscopic-florist-22719
invoke
to skip the actual call...worried-engineer-33884
07/24/2019, 8:29 PMmicroscopic-florist-22719
white-balloon-205
.getFoo
methods succesfully. So you either need to monkey patch these, or use a technique more like https://www.pulumi.com/blog/unit-testing-infrastructure-in-nodejs-and-mocha/ to run tests during a real preview
and/or update
.worried-engineer-33884
07/24/2019, 8:36 PMmicroscopic-florist-22719
getSecretVersion
?@pulumi/aws
is in your package-lock.json or yarn.lock?worried-engineer-33884
07/24/2019, 8:51 PMnpm i --save @pulumi/aws@0.18.23
> npm list @pulumi/aws
aws-typescript@ /Users/dustinfarris/Work/DLP/pulumi-ucboitlake
βββ @pulumi/aws@0.18.23
βββ¬ @pulumi/awsx@0.18.7
β βββ @pulumi/aws@0.18.23 deduped
βββ¬ pulumi-lib-aws@0.1.0 (<git+ssh://git@stash.int.colorado.edu:7999/dlp/pulumi-lib-aws.git#c95252757ebb563bf18f78f016aabb22869cdac4>)
βββ @pulumi/aws@0.18.20
microscopic-florist-22719
getSecretVersion
all the time when running tests?@pulumi/aws
are going to cause problems heregetSecretVersion
is stubbed)worried-engineer-33884
07/24/2019, 9:52 PMUnhandledPromiseRejectionWarning
. As a warning, this output was a nuisance, but did not prevent us from running our tests. cc @gentle-diamond-70147
https://github.com/pulumi/pulumi/issues/2838
With the new synchronous features being introduced into Pulumi, this error is no longer trapped by a Promise, it's just an error outright, which is why our tests don't run anymore.
https://github.com/pulumi/pulumi/issues/2921 is really a dupe of 2838 minus the unhandled promise rejection warning.white-balloon-205
PULUMI_TEST_MODE
approach you are using. Would love your thoughts on whether that helps for your testing scenarios.