-
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
T131 - Logging buckets #164
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
Overall looks good, some feedback for missing unit test and documentation update
@@ -67,6 +67,10 @@ export class CloudFrontToS3 extends Construct { | |||
super(scope, id); | |||
let bucket: s3.Bucket; | |||
|
|||
if (props.existingBucketObj && props.bucketProps) { |
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.
1 - Add a unit test case to assert this scenario
2 - Update the input props comments and README.md
to reflect the new behavior, currently it implies that existingBucketObj
takes precedence over bucketProps
which no longer will be the case
Similar feedback for the rest of the updates in PR
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue 165
Description of changes:
some integration tests created an existing bucket using our core/BuildBucket() function - this then created a logging bucket when it created the existingBucket, not within our construct.
Some tests passed the existing bucket into the construct, but also passed a bucketProps objects (with a removal policy). This confused the construct so it apparently created extra bucket(s) and left some behind after cleanup.
So the solution to the issue is to add a check to the construct to fail if both existing bucket and bucket props are provided and ensure the integration tests all send the proper combination of inputs.