-
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): target group health check does not validate interval versus timeout #16107
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.
Thanks for the contribution!
Thank you for contributing! Your pull request will be updated from master 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 master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This change is great! We were recently caught out by this behaviour and made a similar patch (guardian/cdk#762). I wonder if it also makes sense to perform this validation in the constructor too to fail fast? Happy to raise a PR to this effect if it makes sense. |
…ncer.configureHealthCheck()` (#16445) ## Summary The [`NetworkLoadBalancer`'s](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.NetworkLoadBalancer.html) [`configureHealthCheck()`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationTargetGroup.html#configurewbrhealthwbrcheckhealthcheck) method is incorrectly throwing a validation error when provided a valid `protocol` and the same value for both `interval` and `timeout`. ```sh Error: Healthcheck interval 10 seconds must be greater than the timeout 10 seconds ``` This rule only applies to Application Load Balancers and not Network Load Balancers. This PR: - Moves the mentioned validation logic from the `BaseTargetGroup` class to the `ApplicationTargetGroup` class. - Adds tests that check a validation error is thrown when **invalid** `protocol`, `interval`, `timeout`, & `path` combinations are provided for the respected TargetGroup type. - Adds tests that check a validation error is **not** thrown when **valid** `protocol`, `interval`, `timeout`, & `path` combinations are provided for the respected TargetGroup type. Provides fix for SIM ticket: V427669955 Fixes issue: #16446 Refs: - [The mentioned validation logic was implemented by this PR.](#16107) - [CreateTargetGroup CloudFormation docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) - [Application Load Balancer's Health check configuration docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html) - [Network Load Balancer's Health check configuration docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ncer.configureHealthCheck()` (aws#16445) ## Summary The [`NetworkLoadBalancer`'s](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.NetworkLoadBalancer.html) [`configureHealthCheck()`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationTargetGroup.html#configurewbrhealthwbrcheckhealthcheck) method is incorrectly throwing a validation error when provided a valid `protocol` and the same value for both `interval` and `timeout`. ```sh Error: Healthcheck interval 10 seconds must be greater than the timeout 10 seconds ``` This rule only applies to Application Load Balancers and not Network Load Balancers. This PR: - Moves the mentioned validation logic from the `BaseTargetGroup` class to the `ApplicationTargetGroup` class. - Adds tests that check a validation error is thrown when **invalid** `protocol`, `interval`, `timeout`, & `path` combinations are provided for the respected TargetGroup type. - Adds tests that check a validation error is **not** thrown when **valid** `protocol`, `interval`, `timeout`, & `path` combinations are provided for the respected TargetGroup type. Provides fix for SIM ticket: V427669955 Fixes issue: aws#16446 Refs: - [The mentioned validation logic was implemented by this PR.](aws#16107) - [CreateTargetGroup CloudFormation docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) - [Application Load Balancer's Health check configuration docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html) - [Network Load Balancer's Health check configuration docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
fix: Add validation to target group health check creation. Fixes issue #3703.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license