aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

feat(ecs): add validation checks to memory cpu combinations of FARGATE compatible task definitions

Open mrlikl opened this issue 9 months ago • 1 comments

Issue # (if applicable)

Closes #22216

Reason for this change

Adds a validation that would point out invalid CPU - Memory limits for a FARGATE compatible task definition. This is based on the document https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html

Description of changes

Added a validateFargateTaskDefinitionMemoryCpu method in the base task definition and run this validation when a task definition has FARGATE in requiresCompatibilities.

This is in line with the ECS requirement that even if a task definition has EC2 compatibility (along with FARGATE), FARGATE validations apply

Description of how you validated changes

Validated the changes by providing incorrect as well as correct values, fixed all the invalid combinations that are present in the unit tests

Checklist


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

mrlikl avatar May 12 '24 18:05 mrlikl

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 39ea6942ad31ba021ef08e03cead682b6b7ff125
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

aws-cdk-automation avatar May 12 '24 20:05 aws-cdk-automation

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).

mergify[bot] avatar Jul 30 '24 18:07 mergify[bot]

:arrow_right: PR build request submitted to test-main-pipeline :arrow_left:

A maintainer must now check the pipeline and add the pr-linter/cli-integ-tested label once the pipeline succeeds.

aws-cdk-automation avatar Jul 30 '24 18:07 aws-cdk-automation

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: b4f36b293052bd28700b1162ae438682f61f1442
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

aws-cdk-automation avatar Jul 30 '24 18:07 aws-cdk-automation

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).

mergify[bot] avatar Jul 30 '24 18:07 mergify[bot]

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

github-actions[bot] avatar Jul 30 '24 18:07 github-actions[bot]