-
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(s3-deployment): added property outputObjectKeys
for BucketDeployment
#30944
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
outputObjectKeys
to control the custom resource from sending large data backoutputObjectKeys
to control the custom resource from sending large data back
outputObjectKeys
to control the custom resource from sending large data backoutputObjectKeys
to control the custom resource from sending large data back
outputObjectKeys
to control the custom resource from sending large data backoutputObjectKeys
for BucketDeployment
outputObjectKeys
for BucketDeploymentoutputObjectKeys
for BucketDeployment
outputObjectKeys
for BucketDeploymentoutputObjectKeys
for BucketDeployment
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
Thanks for the PR! Just a few comments and concerns to be addressed.
@@ -135,7 +136,7 @@ def cfn_error(message=None): | |||
cfn_send(event, context, CFN_SUCCESS, physicalResourceId=physical_id, responseData={ | |||
# Passing through the ARN sequences dependencees on the deployment | |||
'DestinationBucketArn': props.get('DestinationBucketArn'), | |||
'SourceObjectKeys': props.get('SourceObjectKeys'), | |||
**({'SourceObjectKeys': props.get('SourceObjectKeys')} if output_object_keys else {}) |
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'm not too familiar on what the **
operator does in this context?
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 operator is to merge the content of that dictionary with the parent dictionary
@@ -104,6 +104,7 @@ export class ProductStackSynthesizer extends cdk.StackSynthesizer { | |||
serverSideEncryption: this.serverSideEncryption, | |||
serverSideEncryptionAwsKmsKeyId: this.serverSideEncryptionAwsKmsKeyId, | |||
memoryLimit: this.memoryLimit, | |||
outputObjectKeys: false, |
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.
Is setting this behaviour to false for this one module the right call? If old users have existing setups that rely on this property being true and the object keys being sent, then this acts as a breaking change for them. We can default this to true to preserve existing behaviour, and if people are running into this issue, they can set this attribute themselves.
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.
ProductStackSynthesizer
construct is a private construct that is not available for the customers, and also the bucketDeployment
is also is not accessible by the customers, so I think it is Ok to set this property to false.
new s3deploy.BucketDeployment(this, 'DeployMe6', { | ||
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website-second'))], | ||
destinationBucket: bucket6, | ||
retainOnDelete: false, // default is true, which will block the integration test cleanup | ||
outputObjectKeys: false, | ||
}); |
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.
Can we confirm that this test fails with outputObjectKeys = true
? That is, will this BucketDeployment
make a response object that exceeds the 4K character count, but deploys successfully when we do not include the object keys in the output?
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 added a new integration Test case that test the large number of assets that should fail if the new property is not there
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
Comments on closed issues and PRs are hard for our team to see. |
Pull request has been modified.
outputObjectKeys
for BucketDeploymentoutputObjectKeys
for BucketDeployment
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
I am not able to push large files to this PR, I copied this PR to a new one #31452 ... I will close this one in favor of the new one |
Comments on closed issues and PRs are hard for our team to see. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue # (if applicable)
Closes #28579
Reason for this change
The CR lambda is essentially sending back the same data in the response which is hitting the limit for close to 50 object uploads.
Particularly this is being a limitation when using servicecatalog.ProductStack, if there are local assets beyond a particular number, the Custom::CDKBucketDeployment would fail with the error Response object is too long which is a hard limit of 4096 bytes.
Description of changes
outputObjectKeys
has been set to false by default for the service catalog product so that the error does not occur.Description of how you validated changes
Validated using a sample stack with the property set and confirmed the behavior. Also, the existing deployments would be unaffected.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license