Skip to content
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

aws-ecs-patterns: Health Check Interval > Timeout Fails On Deploy #29062

Closed
tmmvn opened this issue Feb 10, 2024 · 2 comments · Fixed by #29075
Closed

aws-ecs-patterns: Health Check Interval > Timeout Fails On Deploy #29062

tmmvn opened this issue Feb 10, 2024 · 2 comments · Fixed by #29075
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@tmmvn
Copy link
Contributor

tmmvn commented Feb 10, 2024

Describe the bug

When configuring ApplicationLoadBalancedFargateService targetGroup.configureHealthCheck, it is possible to have deployment fail with "Health check interval must be greater
than the timeout.". This should fail during synthesis as the values are known at that time.

Expected Behavior

I expected my deployment to succeed, or the error to be caught during synthesis.

Current Behavior

Stack was synthesized successfully, but the deployment failed.

Reproduction Steps

Create a new ApplicationLoadBalancedFargateService:

import * as ecsp from "aws-cdk-lib/aws-ecs-patterns";
const imageProps = {
            image: ecs.ContainerImage.fromRegistry(ADDSOMEIMAGEHERE),
            containerPort: 3000,
        };
        const fargateProps = {
            assignPublicIp: true,
            cpu: 512,
            desiredCount: 1,
            memoryLimitMiB: 1024,
            publicLoadBalancer: true,
            taskImageOptions: imageProps,
        };
const ecsService = new ecsp.ApplicationLoadBalancedFargateService(
            this,
            parentId + "Server",
            fargateProps,
        );

Then apply the following:

ecsService.targetGroup.configureHealthCheck({
            timeout: cdk.Duration.seconds(60),
        })

Possible Solution

Synthesis should check the interval of the health check is larger than the timeout.

Additional Information/Context

No response

CDK CLI Version

2.126.0

Framework Version

No response

Node.js Version

18.18.2

OS

macOS 14.3.1

Language

TypeScript

Language Version

No response

Other information

No response

@tmmvn tmmvn added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 10, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ecs-patterns Related to ecs-patterns library label Feb 10, 2024
@pahud
Copy link
Contributor

pahud commented Feb 13, 2024

Yes let's check that in the synth time. Looks like we have #29075 now and the maintainer would be happy to review the PR.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 13, 2024
@mergify mergify bot closed this as completed in #29075 Mar 8, 2024
mergify bot pushed a commit that referenced this issue Mar 8, 2024
…out (#29075)

Closes #29062.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

github-actions bot commented Mar 8, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants