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): Fix Network Load Balancer Port assignments in ECS Patterns #18157

Merged
merged 6 commits into from
Jan 21, 2022

Conversation

LukvonStrom
Copy link
Contributor

This PR introduces changeable ports as a regression fix for the hardcoded port 80 in both NLB constructs bases.

Closes #18073

Additionally it seems like the regression reported in the linked issue was not spotted in the integration tests either.


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 Dec 23, 2021

@LukvonStrom LukvonStrom changed the title fix(ecs-pattern): Fix Network Load Balancer Port assignments fix(ecs-patterns): Fix Network Load Balancer Port assignments in ECS Patterns Dec 23, 2021
@github-actions github-actions bot added the @aws-cdk/aws-ecs-patterns Related to ecs-patterns library label Dec 23, 2021
@LukvonStrom
Copy link
Contributor Author

hi @madeline-k, were you able to look over this? :) I need this PR in prod for a use case so any feedback towards a merge would be highly appreciated!

@LukvonStrom
Copy link
Contributor Author

cc/ @skinny85 as we had the pleasure already in the other PR :)

@skinny85
Copy link
Contributor

skinny85 commented Jan 18, 2022

This is not my area of expertise @LukvonStrom, but I'll try to get the right people involved 🙂.

Copy link
Contributor

@madeline-k madeline-k left a comment

Choose a reason for hiding this comment

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

Thanks for creating this fix @LukvonStrom! This looks good to me.

I have one question: Why do you say this is a regression? I am curious when it was introduced.

@LukvonStrom
Copy link
Contributor Author

Thanks for creating this fix @LukvonStrom! This looks good to me.

I have one question: Why do you say this is a regression? I am curious when it was introduced.

@madeline-k the problem was (re-)introduced in #4988, the initial fix brought forward in #4793 was then patched out again.

@madeline-k
Copy link
Contributor

Thanks for creating this fix @LukvonStrom! This looks good to me.
I have one question: Why do you say this is a regression? I am curious when it was introduced.

@madeline-k the problem was (re-)introduced in #4988, the initial fix brought forward in #4793 was then patched out again.

Ah, thanks for the context! Looks like in #4983 (fixed by #4988), the issue was that the wrong Protocol was being used. And this PR only fixes things so that the correct Port is used. So, we won't be re-introducing issue #4983 here.

Copy link
Contributor

@madeline-k madeline-k left a comment

Choose a reason for hiding this comment

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

Thanks @LukvonStrom!

@mergify
Copy link
Contributor

mergify bot commented Jan 21, 2022

Thank you for contributing! Your pull request will be updated from master 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
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 64f92d6
  • 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 1393729 into aws:master Jan 21, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 21, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

kornicameister added a commit to kornicameister/aws-cdk that referenced this pull request Jan 22, 2022
* origin/master: (31 commits)
  feat(iotevents): add DetectorModel L2 Construct (aws#18049)
  feat(ecs): add `BaseService.fromServiceArnWithCluster()` for use in CodePipeline (aws#18530)
  docs(s3): remove vestigial documentation (aws#18604)
  chore(cli): LogMonitor test fails randomly due to Date.now() (aws#18601)
  chore(codedeploy): migrate tests to use the Assertions module (aws#18585)
  docs(stepfunctions): fix typo (aws#18583)
  chore(eks-legacy): migrate tests to `assertions` (aws#18596)
  fix(cli): hotswap should wait for lambda's `updateFunctionCode` to complete (aws#18536)
  fix(apigatewayv2): websocket api: allow all methods in grant manage connections (aws#18544)
  chore(dynamodb): migrate tests to assertions (aws#18560)
  fix(aws-apigateway): cross region authorizer ref (aws#18444)
  feat(lambda-nodejs): Allow setting mainFields for esbuild (aws#18569)
  docs(cfnspec): update CloudFormation documentation (aws#18587)
  feat(assertions): support for conditions (aws#18577)
  fix(ecs-patterns): Fix Network Load Balancer Port assignments in ECS Patterns (aws#18157)
  chore(region-info): ap-southeast-3 (Jakarta) ELBV2_ACCOUNT (aws#18300)
  fix(pipelines): CodeBuild projects are hard to tell apart (aws#18492)
  fix(ecs): only works in 'aws' partition (aws#18496)
  chore(app-delivery): migrate unit tests to Assertions (aws#18574)
  chore: migrate kaizen3031593's modules to assertions (aws#18205)
  ...
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…Patterns (aws#18157)

This PR introduces changeable ports as a regression fix for the hardcoded port 80 in both NLB constructs bases.

Closes aws#18073 

Additionally it seems like the regression reported in the linked issue was not spotted in the integration tests either. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TheRealAmazonKendra added a commit that referenced this pull request May 11, 2022
…ontainer port for target group port

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 servies, this is a breaking change so a feature flag is needed. This PR adds that feature flag.

Closes #19411.
TheRealAmazonKendra added a commit that referenced this pull request May 12, 2022
…ontainer port for target group port

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 servies, this is a breaking change so a feature flag is needed. This PR adds that feature flag.

Closes #19411.
mergify bot pushed a commit that referenced this pull request May 12, 2022
…ontainer port for target group port (#20284)

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*
wphilipw pushed a commit to wphilipw/aws-cdk that referenced this pull request May 23, 2022
…ontainer port for target group port (aws#20284)

PR aws#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 aws#19411.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TheRealAmazonKendra added a commit that referenced this pull request Jul 6, 2022
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library
Projects
None yet
4 participants