-
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
fix(globalaccelerator): changing installLatestAwsSdk
breaks Security Group reference
#29620
fix(globalaccelerator): changing installLatestAwsSdk
breaks Security Group reference
#29620
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.
56687f5
to
508a6f6
Compare
Hi, this is already fixed, and I saw the check was passed under action, not sure why it is not updated in the pr. |
Hi, I have run the integ test locally and it passed with the udpated snapshot, not sure why the build was failing here due to integ test failure. |
…laccelerator custom resource handler to fix cloudFormation update failure
508a6f6
to
06f0c0c
Compare
installLatestAwsSdk
breaks Security Group reference…laccelerator custom resource handler to fix cloudFormation update failure
✅ 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.
Hi @jingwy, thank you for the fix.
I'm good with the code change because it appears to be the correct fix as per #23798 but just need a couple additional things before I'd like to merge this in.
-
Could you add a new integration test which tests the specific case that was failing for you?
-
Could you update the title of the PR to reflect the bug that you're fixing rather than the change that you're making?
1f93b41
to
e94fb82
Compare
installLatestAwsSdk
breaks Security Group reference
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.
Nice work @jingwy!
Approving as the new onUpdate behaviour is being covered already within the integ.globalaccelerator.ts
.
Thank you for contributing! Your pull request will be updated from main 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 |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Issue # (if applicable)
Closes #23796
Reason for this change
In #23591
installLatestAwsSdk
. This results in a resource update for custom resources. The custom resource that fetches the security groups does not have an onUpdate handler (https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-globalaccelerator/lib/_accelerator-security-group.ts#L32).When the empty object is returned, this results in an update failure in
CloudFormation because the specific property isn't available and so it will fail with error below:
When the update occurs, the response object does not have a
SecurityGroups.0.GroupId
field, resulting in failures whenSecurityGroups
is referenced.Description of changes
Update the onCreate to onUpdate for custom resources to mitigate the CloudFormation update failure. Documentations: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources.AwsCustomResource.html#oncreate.
Similar fix for Cognito: #23798
Description of how you validated changes
The integration test is updated with the latest assets.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license