-
Notifications
You must be signed in to change notification settings - Fork 4k
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(aws-kinesisfirehose): DeliveryStream API and basic S3 destination #15544
feat(aws-kinesisfirehose): DeliveryStream API and basic S3 destination #15544
Conversation
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.
Looks great! Pretty big, but I understand why you did it this way 😉.
Some comments for the first pass.
packages/@aws-cdk/aws-kinesisfirehose-destinations/test/integ.s3-basic.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-kinesisfirehose-destinations/package.json
Outdated
Show resolved
Hide resolved
deliveryStreamType: 'DirectPut', | ||
...destinationConfig.properties, | ||
}); | ||
resource.node.addDependency(this.grantPrincipal); |
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.
This is also probably not what you want. You're probably looking to take a dependency on a particular grant, not on all grants every done to this principal. The grants have an API for doing exactly that.
…roperty type and use local var instead
…kinesisfirehose-deliverystream
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.
Looks absolutely fantastic 🔥. Amazing work @BenChaimberg @madeline-k and @otaviomacedo!
A few minor optional comments if you're interested.
packages/@aws-cdk/aws-kinesisfirehose-destinations/lib/private/index.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-kinesisfirehose-destinations/lib/s3-bucket.ts
Outdated
Show resolved
Hide resolved
}); | ||
|
||
it('creates a role when none is provided', () => { | ||
const capturedRoleArn = Capture.aString(); |
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.
I would actually put the logical ID of the Role directly in the test. I understand it will be an ugly, hashed logical ID. But I think that's good: in general, you want the tests to act as a guard to make sure the logical IDs of elements in the template you generate are stable while you're doing refactorings (it's easy to change them when changing the construct tree when refactoring).
I understand changing this ID in theory would not be a breaking change, because Roles are stateless, but in my opinion you should be forced to update the unit tests when that happens (in other words, this should be a conscious decision, not something that happens accidentally).
Same comment applies to the tests below.
Co-authored-by: Adam Ruka <[email protected]>
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
aws#15544) This PR implements the minimum DeliveryStream API and S3 destination. More features for DeliveryStream and the S3 destination will follow in future PRs. This work is being tracked in https://github.com/aws/aws-cdk/milestone/16 For more context, see: aws#15505 and the RFC: aws/aws-cdk-rfcs#342 closes aws#10810, aws#15499 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
aws#15544) This PR implements the minimum DeliveryStream API and S3 destination. More features for DeliveryStream and the S3 destination will follow in future PRs. This work is being tracked in https://github.com/aws/aws-cdk/milestone/16 For more context, see: aws#15505 and the RFC: aws/aws-cdk-rfcs#342 closes aws#10810, aws#15499 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR implements the minimum DeliveryStream API and S3 destination.
More features for DeliveryStream and the S3 destination will follow in future PRs. This work is being tracked in https://github.com/aws/aws-cdk/milestone/16
For more context, see: #15505 and the RFC: aws/aws-cdk-rfcs#342
closes #10810, #15499
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license