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

fix(ecs-patterns): feature flag missing for breaking change passing container port for target group port #21021

Closed

Conversation

TheRealAmazonKendra
Copy link
Contributor

This re-implements #20284, which was reverted in #20430 due to the feature flag tests.

PR #18157 results in a new TargetGroup being created from NetworkLoadBalancedEc2Service, NetworkLoadBalancedFargateService, NetworkMultipleTargetGroupsEc2Service,
and NetworkMultipleTargerGroupsFargateService even when no change is made because we are now passing through the containerPort props to TargetGroups's Port.

For existing services, this is a breaking change so a feature flag is needed. This PR adds that feature flag.

Closes #19411.


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

…ontainer port for target group port

This re-implements #20284, which was reverted in #20430 due to the feature flag tests.

PR #18157 results in a new TargetGroup being created from NetworkLoadBalancedEc2Service, NetworkLoadBalancedFargateService, NetworkMultipleTargetGroupsEc2Service,
and NetworkMultipleTargerGroupsFargateService even when no change is made because we are now passing through the containerPort props to TargetGroups's Port.

For existing services, this is a breaking change so a feature flag is needed. This PR adds that feature flag.

Closes #19411.
@gitpod-io
Copy link

gitpod-io bot commented Jul 6, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team July 6, 2022 21:28
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Jul 6, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 6, 2022
@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Jul 7, 2022
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

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

It was hard to understand what modifications this PR made: the PR title and PR body didn't really clarify what and why the changes were in a way that makes it easy for someone without context to come into this.

I think it comes down to this:

  • In January, we committed a change that should have had a feature flag attached to it. That feature flag was never there and it had impact on some people, causing replacement of a Load Balancer's Target Group (causing availability impact).
  • We are now adding the feature flag that should have been added in the first place, after all.

If true, then that also means that we would be reverting behavior for anyone that init'ed a project in between January and today (half a year), causing availability impact for them.

Given that the new behavior has been out for a good long while, I wonder if reverting to behavior from January wouldn't cause more pain than good (especially since the original bug report hasn't been upvoted once, and has engagement from 2 people).

If we do want to add a feature flag to fix this for people, shouldn't it be an 'off by default' flag that people that want to get rid of the escape hatch in their code can enable?

* and the `NetworkMultipleTargetGroups<Ec2|Fargate>ServiceProps.targetGroups[X].containerPort` to the generated
* `ElasticLoadBalancingV2::TargetGroup`'s `Port` property.
*
* This is a feature flag because updating `Port` causes a replacement of the target groups, which is a breaking change.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean that if the feature flag is not set, the containerPort property doesn't do anything at all?

If so, might clarify that in this docstring, and also in the docstring of the property object itself.

@TheRealAmazonKendra
Copy link
Contributor Author

That's a fair point. We can just close this if we think it's not necessary anymore.

@TheRealAmazonKendra TheRealAmazonKendra deleted the TheRealAmazonKendra/feature-flag-redo branch September 21, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p1 pr/do-not-merge This PR should not be merged at this time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(ecs-patterns): unnecessary breaking target group port change introduced after upgrading cdk
4 participants