Skip to content

feat(ecs-patterns) expose multiple target groups, listeners, and load balancers #20770

Merged
mergify[bot] merged 39 commits intoaws:mainfrom
michaeldrey:expose_multi_props
Aug 5, 2022
Merged

feat(ecs-patterns) expose multiple target groups, listeners, and load balancers #20770
mergify[bot] merged 39 commits intoaws:mainfrom
michaeldrey:expose_multi_props

Conversation

@michaeldrey
Copy link
Copy Markdown
Contributor

This commit will expose targetGroups, listeners, and loadBalancers properties allowing developers access to those resources.

The downside to this is that now we have targetGroups, targetGroup, listeners, listener, and loadBalancers, loadBalancer exposes as a property. In my opinion this can cause confusion for developers.

** Potential breaking change **
When trying to protect targetGroup, listener, and loadBalancer I discovered that this would cause breaking changes on down developers who use them to reference node.Id and other attributes.

Only thing I could do was mark them as deprecated as you get the same functionality on the new properties. Open to feedback on this approach and will update the README based on the direction we go.

I need to update the network Integ tests some more, but looking for feedback on the above

closes #14735

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
Copy Markdown

gitpod-io bot commented Jun 16, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team June 16, 2022 23:16
@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. p1 labels Jun 16, 2022
@michaeldrey michaeldrey changed the title feat(aws-ecs-patterns) expose multiple target groups, listeners, and load balancers feat(ecs-patterns) expose multiple target groups, listeners, and load balancers Jun 17, 2022
@TheRealAmazonKendra
Copy link
Copy Markdown
Contributor

So, I have a couple things that I need clarification on. I keep coming back to this PR and feeling unsure of how to respond because I don't get why we didn't just make these arrays in the first place. Seems like a weird design decision there and that makes me think there had to be some reason for it? Mostly I'm concerned that I'm missing context here. I've read through the original PR for this feature and I'm kind of stumped.

You noted that this is a potentially breaking change but that by deprecating them it is not breaking. Am I understanding that correctly? If so, this is the route I think is correct.

@michaeldrey
Copy link
Copy Markdown
Contributor Author

michaeldrey commented Aug 1, 2022

I keep coming back to this PR and feeling unsure of how to respond because I don't get why we didn't just make these arrays in the first place. Seems like a weird design decision there and that makes me think there had to be some reason for it?

It seems weird to me too especially when it's a multi resource set-up, you'd want to access all the resources, not the first one in the array. There could be history in the PR from when this was merged, but i haven't dug that deep into it

breaking change

Admittedly it's been a little while since I opened this so i'll go through this again, but my original idea was going to update the properties themselves to be an array, but this broke integration tests for other services who were already escape hatching to the underlying resources via the tagetgroup.node.id property, it would force them to change to targetgroup[0].node.id.

@TheRealAmazonKendra
Copy link
Copy Markdown
Contributor

In terms of keeping it from being a breaking change, I do like your approach. If you think it would be better to take the other approach, however, it could be done under a feature flag. I'm fine with whatever you think is the better path. Go ahead and assign this to me when it's ready for review (per your notes in the PR about needing to do some additional updates)

@TheRealAmazonKendra
Copy link
Copy Markdown
Contributor

A big thanks to @mrgrain who did dug into this with me. It turns out that we released this before multiple target groups was supported. Given that, I like this current path and will re-review today.

Copy link
Copy Markdown
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.

Looks like there is still some logic to be updated with the new fields or I wouldn't have bothered with the neurotic suggestions to fix spacing. But, like, it's all that. This looks good so far. Gotta say, you're really killing it with all these ecs-patterns updates!

michaeldrey and others added 6 commits August 2, 2022 21:58
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…arget-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
@mergify mergify bot dismissed TheRealAmazonKendra’s stale review August 3, 2022 04:59

Pull request has been modified.

michaeldrey and others added 8 commits August 2, 2022 21:59
…arget-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…tiple-target-groups-fargate-service.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…e-target-groups-fargate-service.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…rget-groups-ecs-service.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…e-target-groups-ecs-service.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…arget-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…arget-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
Copy link
Copy Markdown
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.

Same as the other. Just updating the status so I can the alert of the change.

Mike Dreyfus and others added 19 commits August 3, 2022 15:57
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…le-target-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…arget-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…arget-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…tiple-target-groups-fargate-service.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…e-target-groups-fargate-service.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…rget-groups-ecs-service.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…e-target-groups-ecs-service.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…arget-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
…arget-groups-service-base.ts

Co-authored-by: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com>
@mergify mergify bot dismissed TheRealAmazonKendra’s stale review August 5, 2022 04:21

Pull request has been modified.

@michaeldrey
Copy link
Copy Markdown
Contributor Author

Added a few tests for the EC2 side and a readme update. I think this is ready to :shipit:

Copy link
Copy Markdown
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.

This looks great!

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 5, 2022

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

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

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

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

@mergify mergify bot merged commit 0ff1231 into aws:main Aug 5, 2022
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 5, 2022

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

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

Projects

None yet

3 participants