-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(elasticloadbalancingv2): support target group level cross-zone settings for ALB and NLB #31814
base: main
Are you sure you want to change the base?
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.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
@@ -805,4 +805,29 @@ describe('tests', () => { | |||
}); | |||
}); | |||
|
|||
// test cases for crossZoneEnabled | |||
describe('crossZoneEnabled', () => { |
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.
Handle the undefined case also?
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.
Added a test case.
|
||
// test cases for crossZoneEnabled | ||
describe('crossZoneEnabled', () => { | ||
test.each([true, false])('crossZoneEnabled can be %s', (crossZoneEnabled) => { |
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.
Handle the undefined case also?
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.
Added a test case.
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 your contribution! Just a few small nit-picks from me, otherwise looks good!
TargetGroupAttributes: [ | ||
{ | ||
Key: 'stickiness.enabled', | ||
Value: '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.
nit: Is this attribute always present for the ALB target group? This test could be clearer using Match.absent()
like the NLB, but no worries if this can't be helped.
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.
I've update the test to TargetGroupAttributes to be undefined by using Lambda Target Type.
Co-authored-by: Leonardo Gama <51037424+Leo10Gama@users.noreply.github.com>
@Mergifyio refresh |
✅ Pull request refreshed |
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.
LGTM, thanks for the contribution!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #31814 +/- ##
==========================================
+ Coverage 77.29% 77.30% +0.01%
==========================================
Files 114 114
Lines 7627 7627
Branches 1360 1360
==========================================
+ Hits 5895 5896 +1
+ Misses 1550 1549 -1
Partials 182 182
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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. |
Pull request has been modified.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue # (if applicable)
Closes #31790.
Reason for this change
To support target group level cross-zone settings for ALB and NLB
Description of changes
Add
crossZoneEnabled
property tobaseTargetGroup
.Description of how you validated changes
Add unit tests and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license