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-patterns): support runtimePlatform for fargate patterns #20756

Closed
wants to merge 23 commits into from

Conversation

michaeldrey
Copy link
Contributor

@michaeldrey michaeldrey commented Jun 15, 2022

feat(aws-ecs-patterns): support runtime platform for fargate patterns

Using the implementation of runtimePlatform from this previous commit, I have added this functionality to the L3 constructs for the fargate patterns. The request asked for this feature to be added to QueueProcessingFargateService and NetworkLoadBalancedFargateService, however I felt it should be added to the rest of the Fargate patterns.

I have added integration tests for each pattern with the runtimePlatform property and have added a section to the readme about how to use it.

closes #18462


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

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

@gitpod-io
Copy link

gitpod-io bot commented Jun 15, 2022

@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 labels Jun 15, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team June 15, 2022 21:21
Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

This property (along with all the others that these props share, like cpu) should be extracted into its own level of props that they all inherit, instead of having to just add this prop everywhere. @rix0rrr thoughts on this?

@mergify mergify bot dismissed comcalvi’s stale review June 16, 2022 22:53

Pull request has been modified.

@michaeldrey
Copy link
Contributor Author

@comcalvi That makes sense. I can do that in this PR (imo scope creep this out a bunch), or create a new issue/PR for it.

Looking at the props, aside from scheduled-fargate-task, they're all the same with the exception of a few have the additional securityGroups prop. Condensing them into a base interface that they inherit will make all props consistent across the services as they each end up calling FargateService

scheduled-fargate-task already inherits from scheduled-ecs-task base so I don't believe that needs to be included (but i could be wrong)

@rix0rrr rix0rrr changed the title feat(aws-ecs-patterns): support runtimePlatform for fargate patterns feat(ecs-patterns): support runtimePlatform for fargate patterns Jun 17, 2022
/**
* The runtime platform of the task definition
*
* @default undefined If not specified, `operatingSystemFamily` is LINUX and `cpuArchitecture` is X86_64
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not use the value undefined in describing @default values. This is part of the language specification. Instead, use a dash (-) as the first word and describe the behavior of the infrastructure the construct exhibits when the value is not supplied (See Contributing Guide, Defaults).

@mergify mergify bot dismissed rix0rrr’s stale review June 17, 2022 23:05

Pull request has been modified.

Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

This would be a good case for a separate PR. Feel free to assign the new PR to me, and please drop a comment on this PR linking the new one. Thanks!

michaeldrey and others added 2 commits July 5, 2022 11:34
…d-balanced-fargate-service.ts

Co-authored-by: Calvin Combs <66279577+comcalvi@users.noreply.github.com>
@mergify mergify bot dismissed comcalvi’s stale review July 5, 2022 18:35

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@TheRealAmazonKendra
Copy link
Contributor

@michaeldrey I can't quite tell here if the items Calvin wanted extracted out into a separate PR have been done. Can you let me know and also let me know if this is ready for another round of reviews?

@michaeldrey
Copy link
Contributor Author

@TheRealAmazonKendra they haven't yet, ill work on getting a PR created for it this week

@TheRealAmazonKendra TheRealAmazonKendra self-assigned this Aug 3, 2022
Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

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

Just assigning this to myself and putting this into changes requested so I get the alert when change have been made

@michaeldrey
Copy link
Contributor Author

New PR opened with this change + the shared props

mergify bot pushed a commit that referenced this pull request Aug 10, 2022
…untimePlatform (#21529)

Stemming from #20756, currently there are a lot of duplicated Fargate props throughout the library ie `cpu`, `memory`. This can make adding Fargate properties tedious as you have to add them into every Fargate type.

This PR introduces `FargateServiceBaseProps` which will hold all of the common Fargate properties and allows all Fargate variations to inherit from. 

As an example, I have added in `runtimePlatform` to all Fargate services.


I still need to make a small README update, but want to get this pushed up for thoughts/suggestions/feedback.


closes #20756 #18462
----

### All Submissions:

* [x ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@michaeldrey michaeldrey deleted the adding_runtimePlatform branch August 16, 2022 06:41
josephedward pushed a commit to josephedward/aws-cdk that referenced this pull request Aug 30, 2022
…untimePlatform (aws#21529)

Stemming from aws#20756, currently there are a lot of duplicated Fargate props throughout the library ie `cpu`, `memory`. This can make adding Fargate properties tedious as you have to add them into every Fargate type.

This PR introduces `FargateServiceBaseProps` which will hold all of the common Fargate properties and allows all Fargate variations to inherit from. 

As an example, I have added in `runtimePlatform` to all Fargate services.


I still need to make a small README update, but want to get this pushed up for thoughts/suggestions/feedback.


closes aws#20756 aws#18462
----

### All Submissions:

* [x ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ECS Patterns: Add RuntimePlatform to L3 Constructs
5 participants