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(codepipeline): revert "cannot deploy pipeline stack with crossAccountKeys twice" #20427

Merged
merged 1 commit into from
May 19, 2022

Conversation

Chriscbr
Copy link
Contributor

@Chriscbr Chriscbr commented May 19, 2022

This PR fails in CDK v2 because the added unit tests that use testFutureBehavior fail on the CDK v2 branch. I believe they're failing because the testFutureBehavior utility function was written before CDK v2 was released, and so it automatically discards all feature flags - which should not be happening for new feature flags. I'm not sure what the best fix for this is so I'm just reverting it for the time being to unblock the release.

Test logs:

FAIL test/pipeline.test.js (12.04 s)
  ●  › cross account key alias name tests › cross account key alias is named with stack name instead of ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-pipelinestackpipeline9db740af",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-pipeline-0a412eb5 but received alias/codepipeline-pipelinestackpipeline9db740af at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:500:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with generated stack name when stack name is undefined and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-pipelinestackpipeline9db740af",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-pipelinestack-pipeline-9db740af but received alias/codepipeline-pipelinestackpipeline9db740af at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:525:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with stack name and nested stack ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineArtifactsBucketEncryptionKeyDF448A3D",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-nestedpipelinestack-actualpipeline-23a98110 but received alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:552:46)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with generated stack name and nested stack ID when stack name is undefined and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineArtifactsBucketEncryptionKeyDF448A3D",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-toplevelstack-nestedpipelinestack-actualpipeline-3161a537 but received alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:581:46)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is properly shortened to 256 characters when stack name is too long and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toolongactualpipelinewithextrasuperlongnamethatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestackalsowithsomedifferentcharactersaddedtotheendc9bb503e",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineWithExtraSuperLongNameThatWillNeedToBeShortenedDueToTheAlsoVerySuperExtraLongNameOfTheStackAlsoWithSomeDifferentCharactersAddedToTheEndArtifactsBucketEncryptionKeyABD1BD7F",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-needstobeshortenedduetothelengthofthisabsurdnamethatnooneshouldusebutitstillmighthappensowemusttestfohatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestack-alsowithsomedifferentcharactersaddedtotheend-384b9343 but received alias/codepipeline-toolongactualpipelinewithextrasuperlongnamethatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestackalsowithsomedifferentcharactersaddedtotheendc9bb503e at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:609:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict when the stack ID is the same and pipeline ID is the same and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidpipeline32fb88b3",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-1-pipeline-b09fefee but received alias/codepipeline-stackidpipeline32fb88b3 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:643:34)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict for nested stacks when pipeline ID is the same and nested stacks have the same ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidnestedpipelineid3e91360a",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PIPELINEIDArtifactsBucketEncryptionKeyE292C50C",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-1-nested-pipeline-id-c8c9f252 but received alias/codepipeline-stackidnestedpipelineid3e91360a at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:697:47)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict for nested stacks when in the same stack but nested stacks have different IDs when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidfirstpipelineid5abca693",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PIPELINEIDArtifactsBucketEncryptionKeyE292C50C",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-1-first-pipeline-id-3c59cb88 but received alias/codepipeline-stackidfirstpipelineid5abca693 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:749:46)
      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

@gitpod-io
Copy link

gitpod-io bot commented May 19, 2022

@Chriscbr Chriscbr changed the title chore(codepipeline): revert "cannot deploy pipeline stack with crossAccountKeys twice chore(codepipeline): revert "cannot deploy pipeline stack with crossAccountKeys twice" May 19, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team May 19, 2022 21:16
@Chriscbr Chriscbr removed the request for review from a team May 19, 2022 21:16
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 19, 2022
@github-actions github-actions bot added the p2 label May 19, 2022
@Chriscbr Chriscbr requested a review from a team May 19, 2022 21:19
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 52beb51
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

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

@mergify mergify bot merged commit f9552c0 into master May 19, 2022
@mergify mergify bot deleted the rybickic/revert-cp-feature-flag branch May 19, 2022 22:01
Chriscbr added a commit that referenced this pull request May 19, 2022
…ccountKeys twice" (#20427)

This PR fails in CDK v2 because the added unit tests that use `testFutureBehavior` fail on the CDK v2 branch. I believe they're failing because the `testFutureBehavior` utility function was written before CDK v2 was released, and so it automatically discards all feature flags - which should not be happening for new feature flags. I'm not sure what the best fix for this is so I'm just reverting it for the time being to unblock the release.

Test logs:
<details>

```
FAIL test/pipeline.test.js (12.04 s)
  ●  › cross account key alias name tests › cross account key alias is named with stack name instead of ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-pipelinestackpipeline9db740af",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-pipeline-0a412eb5 but received alias/codepipeline-pipelinestackpipeline9db740af at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:500:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with generated stack name when stack name is undefined and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-pipelinestackpipeline9db740af",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-pipelinestack-pipeline-9db740af but received alias/codepipeline-pipelinestackpipeline9db740af at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:525:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with stack name and nested stack ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineArtifactsBucketEncryptionKeyDF448A3D",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-nestedpipelinestack-actualpipeline-23a98110 but received alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:552:46)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with generated stack name and nested stack ID when stack name is undefined and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineArtifactsBucketEncryptionKeyDF448A3D",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-toplevelstack-nestedpipelinestack-actualpipeline-3161a537 but received alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:581:46)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is properly shortened to 256 characters when stack name is too long and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toolongactualpipelinewithextrasuperlongnamethatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestackalsowithsomedifferentcharactersaddedtotheendc9bb503e",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineWithExtraSuperLongNameThatWillNeedToBeShortenedDueToTheAlsoVerySuperExtraLongNameOfTheStackAlsoWithSomeDifferentCharactersAddedToTheEndArtifactsBucketEncryptionKeyABD1BD7F",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-needstobeshortenedduetothelengthofthisabsurdnamethatnooneshouldusebutitstillmighthappensowemusttestfohatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestack-alsowithsomedifferentcharactersaddedtotheend-384b9343 but received alias/codepipeline-toolongactualpipelinewithextrasuperlongnamethatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestackalsowithsomedifferentcharactersaddedtotheendc9bb503e at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:609:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict when the stack ID is the same and pipeline ID is the same and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidpipeline32fb88b3",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-1-pipeline-b09fefee but received alias/codepipeline-stackidpipeline32fb88b3 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:643:34)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict for nested stacks when pipeline ID is the same and nested stacks have the same ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidnestedpipelineid3e91360a",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PIPELINEIDArtifactsBucketEncryptionKeyE292C50C",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-1-nested-pipeline-id-c8c9f252 but received alias/codepipeline-stackidnestedpipelineid3e91360a at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:697:47)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict for nested stacks when in the same stack but nested stacks have different IDs when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidfirstpipelineid5abca693",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PIPELINEIDArtifactsBucketEncryptionKeyE292C50C",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-1-first-pipeline-id-3c59cb88 but received alias/codepipeline-stackidfirstpipelineid5abca693 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:749:46)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)
```

</details>

----

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

* [ ] 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)

* [ ] 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*
mergify bot pushed 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*
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
…ccountKeys twice" (aws#20427)

This PR fails in CDK v2 because the added unit tests that use `testFutureBehavior` fail on the CDK v2 branch. I believe they're failing because the `testFutureBehavior` utility function was written before CDK v2 was released, and so it automatically discards all feature flags - which should not be happening for new feature flags. I'm not sure what the best fix for this is so I'm just reverting it for the time being to unblock the release.

Test logs:
<details>

```
FAIL test/pipeline.test.js (12.04 s)
  ●  › cross account key alias name tests › cross account key alias is named with stack name instead of ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-pipelinestackpipeline9db740af",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-pipeline-0a412eb5 but received alias/codepipeline-pipelinestackpipeline9db740af at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:500:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with generated stack name when stack name is undefined and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-pipelinestackpipeline9db740af",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-pipelinestack-pipeline-9db740af but received alias/codepipeline-pipelinestackpipeline9db740af at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:525:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with stack name and nested stack ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineArtifactsBucketEncryptionKeyDF448A3D",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-nestedpipelinestack-actualpipeline-23a98110 but received alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:552:46)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is named with generated stack name and nested stack ID when stack name is undefined and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineArtifactsBucketEncryptionKeyDF448A3D",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-toplevelstack-nestedpipelinestack-actualpipeline-3161a537 but received alias/codepipeline-toplevelstacknestedpipelinestackactualpipeline3161a537 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:581:46)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias is properly shortened to 256 characters when stack name is too long and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-toolongactualpipelinewithextrasuperlongnamethatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestackalsowithsomedifferentcharactersaddedtotheendc9bb503e",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "ActualPipelineWithExtraSuperLongNameThatWillNeedToBeShortenedDueToTheAlsoVerySuperExtraLongNameOfTheStackAlsoWithSomeDifferentCharactersAddedToTheEndArtifactsBucketEncryptionKeyABD1BD7F",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-needstobeshortenedduetothelengthofthisabsurdnamethatnooneshouldusebutitstillmighthappensowemusttestfohatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestack-alsowithsomedifferentcharactersaddedtotheend-384b9343 but received alias/codepipeline-toolongactualpipelinewithextrasuperlongnamethatwillneedtobeshortenedduetothealsoverysuperextralongnameofthestackalsowithsomedifferentcharactersaddedtotheendc9bb503e at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:609:33)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict when the stack ID is the same and pipeline ID is the same and feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidpipeline32fb88b3",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PipelineArtifactsBucketEncryptionKey01D58D69",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-1-pipeline-b09fefee but received alias/codepipeline-stackidpipeline32fb88b3 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:643:34)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict for nested stacks when pipeline ID is the same and nested stacks have the same ID when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidnestedpipelineid3e91360a",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PIPELINEIDArtifactsBucketEncryptionKeyE292C50C",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-1-nested-pipeline-id-c8c9f252 but received alias/codepipeline-stackidnestedpipelineid3e91360a at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:697:47)
      at Object.<anonymous> (../../../tools/@aws-cdk/cdk-build-tools/lib/feature-flag.ts:34:35)

  ●  › cross account key alias name tests › cross account key alias names do not conflict for nested stacks when in the same stack but nested stacks have different IDs when feature flag is enabled

    Template has 1 resources with type AWS::KMS::Alias, but none match as expected.
    The closest result is:
      {
        "Type": "AWS::KMS::Alias",
        "Properties": {
          "AliasName": "alias/codepipeline-stackidfirstpipelineid5abca693",
          "TargetKeyId": {
            "Fn::GetAtt": [
              "PIPELINEIDArtifactsBucketEncryptionKeyE292C50C",
              "Arn"
            ]
          }
        },
        "UpdateReplacePolicy": "Delete",
        "DeletionPolicy": "Delete"
      }
    with the following mismatches:
    	Expected alias/codepipeline-actual-stack-name-1-first-pipeline-id-3c59cb88 but received alias/codepipeline-stackidfirstpipelineid5abca693 at /Properties/AliasName (using objectLike matcher)

      83 |     const matchError = hasResourceProperties(this.template, type, props);
      84 |     if (matchError) {
    > 85 |       throw new Error(matchError);
         |             ^
      86 |     }
      87 |   }
      88 |

      at Template.hasResourceProperties (../assertions/lib/template.ts:85:13)
      at fn (test/pipeline.test.ts:749:46)
      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*
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. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants