Skip to content
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

Merged
merged 5 commits into from
Apr 27, 2021
Merged

T131 - Logging buckets #164

merged 5 commits into from
Apr 27, 2021

Conversation

biffgaut
Copy link
Contributor

@biffgaut biffgaut commented Apr 26, 2021

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.

@biffgaut biffgaut requested a review from hnishar as a code owner April 26, 2021 13:01
@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: b3143fa
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 7e66c4c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@hnishar hnishar left a 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) {
Copy link
Contributor

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-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: c2773da
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 2cfe6bf
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@hnishar hnishar linked an issue Apr 27, 2021 that may be closed by this pull request
@hnishar hnishar merged commit fe5afe4 into main Apr 27, 2021
@hnishar hnishar deleted the T131 branch April 27, 2021 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refreshing Integration Tests Leaves Resources Behind in Account
3 participants