-
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(elasticloadbalancingv2-targets): add AlbListenerTarget for NLBs, deprecate AlbTarget due to ALB listener race conditions (#17208) #30396
Conversation
…Bs, deprecate AlbTarget due to ALB listener race conditions (aws#17208)
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.
@paulhcsun , I am on my initial stages of my contribution, where should I reach out to get this reviewed by community? |
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 looks great
packages/aws-cdk-lib/aws-elasticloadbalancingv2-targets/lib/alb-target.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-elasticloadbalancingv2-targets/lib/alb-target.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-elasticloadbalancingv2-targets/lib/alb-target.ts
Outdated
Show resolved
Hide resolved
...ing/framework-integ/test/aws-elasticloadbalancingv2-targets/test/integ.alb-listner-target.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-elasticloadbalancingv2-targets/lib/alb-target.ts
Outdated
Show resolved
Hide resolved
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 working on this! I (as a community reviewer) made some comments on an alternative approach. I'm not super familiar with NLB + ALB target, so sorry if my comments are irrelevant (at least I read this doc 🙏).
packages/aws-cdk-lib/aws-elasticloadbalancingv2-targets/lib/alb-target.ts
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener.ts
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-elasticloadbalancingv2-targets/lib/alb-target.ts
Show resolved
Hide resolved
* @param albListener The application load balancer listener to target. | ||
*/ | ||
constructor(private albListener: elbv2.ApplicationListener) { | ||
super(albListener.loadBalancer.loadBalancerArn, albListener.port); |
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.
(memo) using albListener.port
here seems a right thing to do. (previously it was not validated at all that a corresponding listener to the port exists)
the Application Load Balancer you choose from the list must have a listener on the same port as the target group you’re creating.
https://docs.aws.amazon.com/elasticloadbalancing/latest/network/application-load-balancer-target.html
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 do love a good deprecation. Thanks for your contribution!
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). |
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). |
Pull request has been modified.
@TheRealAmazonKendra , I Merged main - branch commits in this PR. Can you re-review this? |
@TheRealAmazonKendra , would you mind just re-approving this? And regarding merging the changes, will you be merging this PR?, why because I did all these changes because I got confused with mergify messages... |
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). |
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). |
@Mergifyio update |
❌ Mergify doesn't have permission to updateFor security reasons, Mergify can't update this pull request. Try updating locally. |
@shikha372 seems there is permission issue, should I add some permission? |
Pull request has been modified.
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. |
Issue # (if applicable)
Closes #17208 .
Description of changes
AlbTarget
withAlbListenerTarget
, allowing us to automatically add a dependency between the provided ALB listener and the associated NLB target group. Without such a dependency stacks may fail to deploy if the listener is not created when the target group attempts to be created.Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license