-
Notifications
You must be signed in to change notification settings - Fork 249
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
fix(aws-kinesisfirehose-s3): Fix type of kinesisFirehoseProps
prop.
#1002
base: main
Are you sure you want to change the base?
fix(aws-kinesisfirehose-s3): Fix type of kinesisFirehoseProps
prop.
#1002
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Looks like there's something wrong with the build steps so the CodeBuild is failing... 🤔 |
Thanks! Unfortunately, the issue here is that Solutions Constructs uses JSII to publish the libraries for Java and Python projects (the same library used by CDK to support multiple clients). The benefit of this is being able to serve more clients, but the drawback is that this imposes limitations in how we manipulate types in Typescript. We want to allow users to specify any subset of properties on incoming props without having to fill in all required properties (which we will supply as defaults), hence our use of In this case, the build is working fine - but our build step is jsii rather than tsc. The first error that occurs in the log is:
Which indicates to me that JSII cannot not process the |
Hmm, interesting, I see. Thanks for the response. After doing a little bit of research I came across aws/jsii#1707, which suggests using jsii-struct-builder to add support for utility types such as |
In V1.64.0 the type of the
kinesisFirehoseProps
prop was adjusted fromkinesisfirehose.CfnDeliveryStreamProps
tokinesisfirehose.CfnDeliveryStreamProps | any
. I assume this was to prevent a type error aroundbucketArn
androleArn
being required inkinesisfirehose.CfnDeliveryStreamProps
, but not within the prop (since the construct handles setting these).This was a lazy solution that meant developers haven't been able to benefit from the autocompletion of the type. The type has been corrected in this PR so that people can get autocomplete on the properties again.
The type admittedly isn't the prettiest, but does work and is the best way I could find to achieve the correct type.
I'm not sure why there's a
| cdk.IResolvable;
on the type originally, but I kept it here just in case.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.