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

feat(ecs): set default HealthCheckGracePeriodSeconds #2942

Merged
merged 6 commits into from
Jun 21, 2019
Merged

feat(ecs): set default HealthCheckGracePeriodSeconds #2942

merged 6 commits into from
Jun 21, 2019

Conversation

hencrice
Copy link
Contributor

@hencrice hencrice commented Jun 19, 2019

Default HealthCheckGracePeriodSeconds in BaseService to 60 seconds if it's not already set and at least one load balancer is configured.

Closes #2936.


Pull Request Checklist

  • Testing
    • Unit test added (prefer not to modify an existing test, otherwise, it's probably a breaking change)
    • CLI change?: coordinate update of integration tests with team
    • cdk-init template change?: coordinated update of integration tests with team
  • Docs
    • jsdocs: All public APIs documented
    • README: README and/or documentation topic updated
    • Design: For significant features, design document added to design folder
  • Title and Description
    • Change type: title prefixed with fix, feat and module name in parens, which will appear in changelog
    • Title: use lower-case and doesn't end with a period
    • Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
    • Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"
  • [N/A] Sensitive Modules (requires 2 PR approvers)
    • IAM Policy Document (in @aws-cdk/aws-iam)
    • EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
    • Grant APIs (only if not based on official documentation with a reference)

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

…rvice to 60 seconds if it's not already set and at least one load balancer is configured

This was a FIXME in the ECS CDK codebase.

Closes #2936.
@hencrice hencrice requested review from SoManyHs and a team as code owners June 19, 2019 23:55
@SoManyHs SoManyHs changed the title feat(ecs): set the default HealthCheckGracePeriodSeconds in base-se… feat(ecs): set the default HealthCheckGracePeriodSeconds Jun 20, 2019
@SoManyHs SoManyHs changed the title feat(ecs): set the default HealthCheckGracePeriodSeconds feat(ecs): set default HealthCheckGracePeriodSeconds Jun 20, 2019
healthCheckGracePeriodSeconds: props.healthCheckGracePeriodSeconds,
// only set the grace period when load balancers are configured and
// healthCheckGracePeriodSeconds is not already set
healthCheckGracePeriodSeconds: Lazy.anyValue({ produce: () =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to a helper private method for readability?

@rix0rrr
Copy link
Contributor

rix0rrr commented Jun 20, 2019

@aws-cdk/aws-ecs: ERROR: /home/travis/build/awslabs/aws-cdk/packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-service.ts:51:1 - Consecutive blank lines are forbidden

@rix0rrr rix0rrr self-assigned this Jun 20, 2019
@hencrice
Copy link
Contributor Author

@pkandasamy91

# Conflicts:
#	packages/@aws-cdk/aws-ecs/lib/base/base-service.ts
…econds` into a private helper method as requested
@hencrice
Copy link
Contributor Author

@rix0rrr Could you give me console access to the AWS account you guys are using for the "AWS CodeBuild us-east-1" check. Otherwise I can't see what's causing the check to fail. Thanks!

healthCheckGracePeriodSeconds: props.healthCheckGracePeriodSeconds,
// only set the grace period when load balancers are configured and
// healthCheckGracePeriodSeconds is not already set
healthCheckGracePeriodSeconds: Lazy.anyValue({ produce: () =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be a Lazy.numberValue(), no?

// only set the grace period when load balancers are configured and
// healthCheckGracePeriodSeconds is not already set
healthCheckGracePeriodSeconds: Lazy.anyValue({ produce: () =>
this.loadBalancers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.loadBalancers should never be undefined. Should we not make the default an empty array? Gets rid of the test here.

packages/@aws-cdk/aws-ecs/test/ec2/test.ec2-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/base/base-service.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ecs: set the default value of HealthCheckGracePeriodSeconds to 60 seconds
3 participants