-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Java/.NET/Python: Unable to use SecretValue #2304
Comments
I suspect this might be a symptom of a known/fixed bug in the JSII Runtime 0.8.1 (fixed in 0.8.2), but I'm attempting a repro before I push this point forward too much... 😅 |
Alright - I did manage to reproduce this bug (BTW - thanks @jousby for providing all the details about the specific code that breaks). So this is either not the 0.8.1 bug, or some new edge case. |
Found the root cause... The JSII kernel is not binding a |
Javascript allows static members to refer to other static members through `this`, but the `jsii-kernel` passed `null` for the `this` context in `sinvoke`, making it impossible to invoke static methods that made use of this feature through the `jsii` runtimes. Fixes aws/aws-cdk#2304
Javascript allows static members to refer to other static members through `this`, but the `jsii-kernel` passed `null` for the `this` context in `sinvoke`, making it impossible to invoke static methods that made use of this feature through the `jsii` runtimes. Fixes aws/aws-cdk#2304
Describe the bug
Prior to 0.28.0 I was retrieving my github user token from SecretsManager for using in a build pipeline with the following code:
I can see from the changelog for 0.28.0 that this approach has been removed in favour of the more elegant
SecretValue
class.My attempt to refactor to use
SecretValue
in Java looks like this:When i run
cdk synth
on this though I get the following exception:For what its worth i spun up a test project in typescript and tried a similiar usage of SecretValue which worked fine:
To Reproduce
In a post 0.28.0 Java CDK project add a snippet to retrieve a SecretValue from SecretsManager (as per description above) and try to run
cdk synth
.Expected behavior
CDK Stack successfully synthesises to CloudFormation.
Version:
The text was updated successfully, but these errors were encountered: