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

chore(ecs-patterns): revert "feature flag missing for breaking change passing container port for target group port (#20284)" #20430

Merged
merged 3 commits into from
May 20, 2022

Conversation

Chriscbr
Copy link
Contributor

This reverts #20284 since its tests fail to pass in CDK v2, blocking the next CDK release. The root cause of failure looks as though it may be the same as #20427 - I've included the test logs below:

@aws-cdk/aws-ecs-patterns: FAIL test/fargate/load-balanced-fargate-service-v2.test.js (11.703 s)
@aws-cdk/aws-ecs-patterns:   � When Network Load Balancer › Fargate networkloadbalanced construct uses custom Port for target group when feature flag is enabled
@aws-cdk/aws-ecs-patterns:     Template has 1 resources with type AWS::ElasticLoadBalancingV2::TargetGroup, but none match as expected.
@aws-cdk/aws-ecs-patterns:     The closest result is:
@aws-cdk/aws-ecs-patterns:       {
@aws-cdk/aws-ecs-patterns:         "Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
@aws-cdk/aws-ecs-patterns:         "Properties": {
@aws-cdk/aws-ecs-patterns:           "Port": 80,
@aws-cdk/aws-ecs-patterns:           "Protocol": "TCP",
@aws-cdk/aws-ecs-patterns:           "TargetType": "ip",
@aws-cdk/aws-ecs-patterns:           "VpcId": {
@aws-cdk/aws-ecs-patterns:             "Ref": "VPCB9E5F0B4"
@aws-cdk/aws-ecs-patterns:           }
@aws-cdk/aws-ecs-patterns:         }
@aws-cdk/aws-ecs-patterns:       }
@aws-cdk/aws-ecs-patterns:     with the following mismatches:
@aws-cdk/aws-ecs-patterns:     	Expected 81 but received 80 at /Properties/Port (using objectLike matcher)
@aws-cdk/aws-ecs-patterns:       83 |     const matchError = hasResourceProperties(this.template, type, props);
@aws-cdk/aws-ecs-patterns:       84 |     if (matchError) {
@aws-cdk/aws-ecs-patterns:     > 85 |       throw new Error(matchError);
@aws-cdk/aws-ecs-patterns:          |             ^
@aws-cdk/aws-ecs-patterns:       86 |     }
@aws-cdk/aws-ecs-patterns:       87 |   }
@aws-cdk/aws-ecs-patterns:       88 |
@aws-cdk/aws-ecs-patterns:       at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
@aws-cdk/aws-ecs-patterns:       at fn (test/fargate/load-balanced-fargate-service-v2.test.ts:709:31)
@aws-cdk/aws-ecs-patterns:       at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)
@aws-cdk/aws-ecs-patterns:   � When Network Load Balancer › test Fargate multinetworkloadbalanced construct uses custom Port for target group when feature flag is enabled
@aws-cdk/aws-ecs-patterns:     Template has 2 resources with type AWS::ElasticLoadBalancingV2::TargetGroup, but none match as expected.
@aws-cdk/aws-ecs-patterns:     The closest result is:
@aws-cdk/aws-ecs-patterns:       {
@aws-cdk/aws-ecs-patterns:         "Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
@aws-cdk/aws-ecs-patterns:         "Properties": {
@aws-cdk/aws-ecs-patterns:           "Port": 80,
@aws-cdk/aws-ecs-patterns:           "Protocol": "TCP",
@aws-cdk/aws-ecs-patterns:           "TargetType": "ip",
@aws-cdk/aws-ecs-patterns:           "VpcId": {
@aws-cdk/aws-ecs-patterns:             "Ref": "VPCB9E5F0B4"
@aws-cdk/aws-ecs-patterns:           }
@aws-cdk/aws-ecs-patterns:         }
@aws-cdk/aws-ecs-patterns:       }
@aws-cdk/aws-ecs-patterns:     with the following mismatches:
@aws-cdk/aws-ecs-patterns:     	Expected 81 but received 80 at /Properties/Port (using objectLike matcher)
@aws-cdk/aws-ecs-patterns:       83 |     const matchError = hasResourceProperties(this.template, type, props);
@aws-cdk/aws-ecs-patterns:       84 |     if (matchError) {
@aws-cdk/aws-ecs-patterns:     > 85 |       throw new Error(matchError);
@aws-cdk/aws-ecs-patterns:          |             ^
@aws-cdk/aws-ecs-patterns:       86 |     }
@aws-cdk/aws-ecs-patterns:       87 |   }
@aws-cdk/aws-ecs-patterns:       88 |
@aws-cdk/aws-ecs-patterns:       at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
@aws-cdk/aws-ecs-patterns:       at fn (test/fargate/load-balanced-fargate-service-v2.test.ts:823:31)
@aws-cdk/aws-ecs-patterns:       at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

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

… passing container port for target group port (#20284)"

This reverts commit dc7533c.
@gitpod-io
Copy link

gitpod-io bot commented May 19, 2022

@github-actions github-actions bot added the p2 label May 19, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team May 19, 2022 22:54
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 19, 2022
@Chriscbr Chriscbr changed the title chore(ecs-patterns): revert "feature flag missing for breaking chage passing container port for target group port (#20284)" chore(ecs-patterns): revert "feature flag missing for breaking change passing container port for target group port (#20284)" May 19, 2022
@mergify
Copy link
Contributor

mergify bot commented May 20, 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: 7f9e2e3
  • 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 3a11317 into master May 20, 2022
@mergify mergify bot deleted the rybickic/revert-ecs-patterns-flag branch May 20, 2022 16:21
@mergify
Copy link
Contributor

mergify bot commented May 20, 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).

Chriscbr added a commit that referenced this pull request May 20, 2022
… passing container port for target group port (#20284)" (#20430)

This reverts #20284 since its tests fail to pass in CDK v2, blocking the next CDK release. The root cause of failure looks as though it may be the same as #20427 - I've included the test logs below:

<details>

```
@aws-cdk/aws-ecs-patterns: FAIL test/fargate/load-balanced-fargate-service-v2.test.js (11.703 s)
@aws-cdk/aws-ecs-patterns:   � When Network Load Balancer › Fargate networkloadbalanced construct uses custom Port for target group when feature flag is enabled
@aws-cdk/aws-ecs-patterns:     Template has 1 resources with type AWS::ElasticLoadBalancingV2::TargetGroup, but none match as expected.
@aws-cdk/aws-ecs-patterns:     The closest result is:
@aws-cdk/aws-ecs-patterns:       {
@aws-cdk/aws-ecs-patterns:         "Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
@aws-cdk/aws-ecs-patterns:         "Properties": {
@aws-cdk/aws-ecs-patterns:           "Port": 80,
@aws-cdk/aws-ecs-patterns:           "Protocol": "TCP",
@aws-cdk/aws-ecs-patterns:           "TargetType": "ip",
@aws-cdk/aws-ecs-patterns:           "VpcId": {
@aws-cdk/aws-ecs-patterns:             "Ref": "VPCB9E5F0B4"
@aws-cdk/aws-ecs-patterns:           }
@aws-cdk/aws-ecs-patterns:         }
@aws-cdk/aws-ecs-patterns:       }
@aws-cdk/aws-ecs-patterns:     with the following mismatches:
@aws-cdk/aws-ecs-patterns:     	Expected 81 but received 80 at /Properties/Port (using objectLike matcher)
@aws-cdk/aws-ecs-patterns:       83 |     const matchError = hasResourceProperties(this.template, type, props);
@aws-cdk/aws-ecs-patterns:       84 |     if (matchError) {
@aws-cdk/aws-ecs-patterns:     > 85 |       throw new Error(matchError);
@aws-cdk/aws-ecs-patterns:          |             ^
@aws-cdk/aws-ecs-patterns:       86 |     }
@aws-cdk/aws-ecs-patterns:       87 |   }
@aws-cdk/aws-ecs-patterns:       88 |
@aws-cdk/aws-ecs-patterns:       at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
@aws-cdk/aws-ecs-patterns:       at fn (test/fargate/load-balanced-fargate-service-v2.test.ts:709:31)
@aws-cdk/aws-ecs-patterns:       at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)
@aws-cdk/aws-ecs-patterns:   � When Network Load Balancer › test Fargate multinetworkloadbalanced construct uses custom Port for target group when feature flag is enabled
@aws-cdk/aws-ecs-patterns:     Template has 2 resources with type AWS::ElasticLoadBalancingV2::TargetGroup, but none match as expected.
@aws-cdk/aws-ecs-patterns:     The closest result is:
@aws-cdk/aws-ecs-patterns:       {
@aws-cdk/aws-ecs-patterns:         "Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
@aws-cdk/aws-ecs-patterns:         "Properties": {
@aws-cdk/aws-ecs-patterns:           "Port": 80,
@aws-cdk/aws-ecs-patterns:           "Protocol": "TCP",
@aws-cdk/aws-ecs-patterns:           "TargetType": "ip",
@aws-cdk/aws-ecs-patterns:           "VpcId": {
@aws-cdk/aws-ecs-patterns:             "Ref": "VPCB9E5F0B4"
@aws-cdk/aws-ecs-patterns:           }
@aws-cdk/aws-ecs-patterns:         }
@aws-cdk/aws-ecs-patterns:       }
@aws-cdk/aws-ecs-patterns:     with the following mismatches:
@aws-cdk/aws-ecs-patterns:     	Expected 81 but received 80 at /Properties/Port (using objectLike matcher)
@aws-cdk/aws-ecs-patterns:       83 |     const matchError = hasResourceProperties(this.template, type, props);
@aws-cdk/aws-ecs-patterns:       84 |     if (matchError) {
@aws-cdk/aws-ecs-patterns:     > 85 |       throw new Error(matchError);
@aws-cdk/aws-ecs-patterns:          |             ^
@aws-cdk/aws-ecs-patterns:       86 |     }
@aws-cdk/aws-ecs-patterns:       87 |   }
@aws-cdk/aws-ecs-patterns:       88 |
@aws-cdk/aws-ecs-patterns:       at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
@aws-cdk/aws-ecs-patterns:       at fn (test/fargate/load-balanced-fargate-service-v2.test.ts:823:31)
@aws-cdk/aws-ecs-patterns:       at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)
```

</details>


----

### All Submissions:

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

### Adding new Unconventional Dependencies:

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

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] 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*
wphilipw pushed a commit to wphilipw/aws-cdk that referenced this pull request May 23, 2022
… passing container port for target group port (aws#20284)" (aws#20430)

This reverts aws#20284 since its tests fail to pass in CDK v2, blocking the next CDK release. The root cause of failure looks as though it may be the same as aws#20427 - I've included the test logs below:

<details>

```
@aws-cdk/aws-ecs-patterns: FAIL test/fargate/load-balanced-fargate-service-v2.test.js (11.703 s)
@aws-cdk/aws-ecs-patterns:   � When Network Load Balancer › Fargate networkloadbalanced construct uses custom Port for target group when feature flag is enabled
@aws-cdk/aws-ecs-patterns:     Template has 1 resources with type AWS::ElasticLoadBalancingV2::TargetGroup, but none match as expected.
@aws-cdk/aws-ecs-patterns:     The closest result is:
@aws-cdk/aws-ecs-patterns:       {
@aws-cdk/aws-ecs-patterns:         "Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
@aws-cdk/aws-ecs-patterns:         "Properties": {
@aws-cdk/aws-ecs-patterns:           "Port": 80,
@aws-cdk/aws-ecs-patterns:           "Protocol": "TCP",
@aws-cdk/aws-ecs-patterns:           "TargetType": "ip",
@aws-cdk/aws-ecs-patterns:           "VpcId": {
@aws-cdk/aws-ecs-patterns:             "Ref": "VPCB9E5F0B4"
@aws-cdk/aws-ecs-patterns:           }
@aws-cdk/aws-ecs-patterns:         }
@aws-cdk/aws-ecs-patterns:       }
@aws-cdk/aws-ecs-patterns:     with the following mismatches:
@aws-cdk/aws-ecs-patterns:     	Expected 81 but received 80 at /Properties/Port (using objectLike matcher)
@aws-cdk/aws-ecs-patterns:       83 |     const matchError = hasResourceProperties(this.template, type, props);
@aws-cdk/aws-ecs-patterns:       84 |     if (matchError) {
@aws-cdk/aws-ecs-patterns:     > 85 |       throw new Error(matchError);
@aws-cdk/aws-ecs-patterns:          |             ^
@aws-cdk/aws-ecs-patterns:       86 |     }
@aws-cdk/aws-ecs-patterns:       87 |   }
@aws-cdk/aws-ecs-patterns:       88 |
@aws-cdk/aws-ecs-patterns:       at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
@aws-cdk/aws-ecs-patterns:       at fn (test/fargate/load-balanced-fargate-service-v2.test.ts:709:31)
@aws-cdk/aws-ecs-patterns:       at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)
@aws-cdk/aws-ecs-patterns:   � When Network Load Balancer › test Fargate multinetworkloadbalanced construct uses custom Port for target group when feature flag is enabled
@aws-cdk/aws-ecs-patterns:     Template has 2 resources with type AWS::ElasticLoadBalancingV2::TargetGroup, but none match as expected.
@aws-cdk/aws-ecs-patterns:     The closest result is:
@aws-cdk/aws-ecs-patterns:       {
@aws-cdk/aws-ecs-patterns:         "Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
@aws-cdk/aws-ecs-patterns:         "Properties": {
@aws-cdk/aws-ecs-patterns:           "Port": 80,
@aws-cdk/aws-ecs-patterns:           "Protocol": "TCP",
@aws-cdk/aws-ecs-patterns:           "TargetType": "ip",
@aws-cdk/aws-ecs-patterns:           "VpcId": {
@aws-cdk/aws-ecs-patterns:             "Ref": "VPCB9E5F0B4"
@aws-cdk/aws-ecs-patterns:           }
@aws-cdk/aws-ecs-patterns:         }
@aws-cdk/aws-ecs-patterns:       }
@aws-cdk/aws-ecs-patterns:     with the following mismatches:
@aws-cdk/aws-ecs-patterns:     	Expected 81 but received 80 at /Properties/Port (using objectLike matcher)
@aws-cdk/aws-ecs-patterns:       83 |     const matchError = hasResourceProperties(this.template, type, props);
@aws-cdk/aws-ecs-patterns:       84 |     if (matchError) {
@aws-cdk/aws-ecs-patterns:     > 85 |       throw new Error(matchError);
@aws-cdk/aws-ecs-patterns:          |             ^
@aws-cdk/aws-ecs-patterns:       86 |     }
@aws-cdk/aws-ecs-patterns:       87 |   }
@aws-cdk/aws-ecs-patterns:       88 |
@aws-cdk/aws-ecs-patterns:       at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
@aws-cdk/aws-ecs-patterns:       at fn (test/fargate/load-balanced-fargate-service-v2.test.ts:823:31)
@aws-cdk/aws-ecs-patterns:       at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)
```

</details>


----

### All Submissions:

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

### Adding new Unconventional Dependencies:

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

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] 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*
@comcalvi comcalvi added the effort/small Small work item – less than a day of effort label May 25, 2022
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
contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants