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

[cdk-pipelines] Every asset update mutates the pipeline #9080

Open
asterikx opened this issue Jul 15, 2020 · 23 comments · Fixed by #9183
Open

[cdk-pipelines] Every asset update mutates the pipeline #9080

asterikx opened this issue Jul 15, 2020 · 23 comments · Fixed by #9183
Labels
@aws-cdk/pipelines CDK Pipelines library bug This issue is a bug. effort/large Large work item – several weeks of effort p1

Comments

@asterikx
Copy link
Contributor

The UpdatePipepline stage fails although the SelfMutate action has completed successfully and causes the pipeline to start over again. This leads to the pipeline getting caught in an infinite loop.

Reproduction Steps

I have a CDK app with a PipelineStack containing a CdkPipeline (with two Cdk.Stages). I committed my CDK code to git, and then run cdk deploy PipelineStack --profile ... (all environments were bootstrapped before).

Error Log

After creating the pipeline, the first pipeline execution is being triggered by a CreatePipeline event. Source and Build stage succeed, the SelfMutate action succeeds, but the UpdatePipeline stage fails. The next execution gets triggered by a StartPipelineExecution event (probably triggered by the pipeline itself?).

Screenshot 2020-07-15 at 14 43 38

I don't know where to find more detailed error messages of what causes the stage to fail. Please point me to the releavnt locations and I will provide more information.

Environment

  • CLI Version : 1.51.0 (build 8c2d53c)
  • Framework Version: 1.51.0 (build 8c2d53c)
  • Node.js Version: v12.18.0
  • OS : aws/codebuild/standard:4.0
  • Language (Version): TypeScript (3.9.5)

Other

Other users have reported the same issue on Gitter, but no resolution has been provided so far.


This is 🐛 Bug Report

@asterikx asterikx added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 15, 2020
@github-actions github-actions bot added the @aws-cdk/pipelines CDK Pipelines library label Jul 15, 2020
@ericzbeard ericzbeard added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Jul 15, 2020
@ericzbeard ericzbeard assigned rix0rrr and unassigned ericzbeard Jul 15, 2020
@ferdingler
Copy link

I concur, this happened to me as well.

@asterikx
Copy link
Contributor Author

asterikx commented Jul 15, 2020

I think a succeeded 'SelfMutate' action but a failed 'UpdatePipeline' stage is expected in case 'SelfMutate' did actually update the pipeline.

The pipeline has restartExecutionOnUpdate set to true, which makes perfect sense as the pipeline needs to be updated before proceeding.

restartExecutionOnUpdate: true,

The wording "failed" and the visualization in the Console is confusing at first. But I think that's how CodePipeline deals with restarts internally, i.e. "if I need to start over, I have to fail the current execution so that the new execution can go through without being blocked by the old execution" (pipeline executions cannot overtake each other).

Looking at the logs of the CodeBuild project of the 'SelfUpdate' action, I see that my Pipeline is indeed being updated in each iteration, which explains the infinite looping.

Those updates to my Pipeline are asset updates (and associated role and policy updates).

Complete CodeBuild logs
[Container] 2020/07/15 12:57:16 Running command cdk -a . deploy PipelineStack --require-approval=never --verboseCDK toolkit version: 1.51.0 (build 8c2d53c)Command line arguments: { _: [ 'deploy' ],  a: '.',  app: '.',  'require-approval': 'never',  requireApproval: 'never',  verbose: 1,  v: 1,  'ignore-errors': false,  ignoreErrors: false,  json: false,  j: false,  ec2creds: undefined,  i: undefined,  'version-reporting': undefined,  versionReporting: undefined,  'path-metadata': true,  pathMetadata: true,  'asset-metadata': true,  assetMetadata: true,  'role-arn': undefined,  r: undefined,  roleArn: undefined,  staging: true,  'no-color': false,  noColor: false,  fail: false,  'build-exclude': [],  E: [],  buildExclude: [],  ci: false,  execute: true,  force: false,  f: false,  parameters: [ {} ],  'previous-parameters': true,  previousParameters: true,  '$0': '/usr/local/bin/cdk',  STACKS: [ 'PipelineStack' ],  stacks: [ 'PipelineStack' ] }merged settings: { versionReporting: true,  pathMetadata: true,  output: 'cdk.out',  app: '.',  context: {},  tags: [],  assetMetadata: true,  requireApproval: 'never',  toolkitBucket: {},  staging: true }Toolkit stack: CDKToolkitSetting "CDK_DEFAULT_REGION" environment variable to eu-central-1Resolving default credentialsLooking up default account ID from STSDefault account ID: 1111111111Setting "CDK_DEFAULT_ACCOUNT" environment variable to 1111111111context: { 'aws:cdk:enable-path-metadata': true,  'aws:cdk:enable-asset-metadata': true }--app points to a cloud assembly, so we bypass synthPipelineStack: deploying...Assuming role 'arn:aws:iam::1111111111:role/hnb659fds-deploy-role-1111111111-eu-central-1'.Waiting for stack CDKToolkit to finish creating or updating...[0%] start: Publishing 65a6bd9bc7f71e9fd2a17c7f41bf3d87f620c2930b4ed93db84329371c27:1111111111-eu-central-1Retrieved account ID 1111111111 from disk cacheAssuming role 'arn:aws:iam::1111111111:role/hnb659fds-file-publishing-role-1111111111-eu-central-1'.[0%] check: Check s3://cdk-hnb659fds-assets-1111111111-eu-central-1/65a6bd9bc7f71e9fd2a17c7f41bf3d87f620c2930b4ed93db84329371c27[0%] upload: Upload s3://cdk-hnb659fds-assets-1111111111-eu-central-1/65a6bd9bc7f71e9fd2a17c7f41bf3d87f620c2930b4ed93db84329371c27[100%] success: Published 65a6bd9bc7f71e9fd2a17c7f41bf3d87f620c2930b4ed93db84329371c27:1111111111-eu-central-1PipelineStack: checking if we can skip deployPipelineStack: template has changedPipelineStack: deploying...Attempting to create ChangeSet CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 to update stack lineStackPipelineStack: creating CloudFormation changeset...
Initiated creation of changeset: aws:cloudformation:eu-central-1:1111111111:changeSet/5bd31a53-9245-454a-b8cf-60f8fc3afcb6/e2a256d5-c1d6-46b3-a202-9e9c9b106672; waiting for o finish creating...
Waiting for changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack to sh creating...
Changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack is still ting
Changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack is still ting
Changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack is still ting
Changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack is still ting
Initiating execution of changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack lineStack
Execution of changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack started; waiting for the update to complete...
Waiting for stack PipelineStack to finish creating or updating...
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS (User Initiated))
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
  3/33 | 12:58:11 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRole9984FB3F) 
  3/33 | 12:58:12 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRole125C1262) 
  3/33 | 12:58:12 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRole9984FB3F) Resource creation Initiated
  3/33 | 12:58:12 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRole0A88A03D) 
  3/33 | 12:58:12 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleD7224BDE) 
  3/33 | 12:58:12 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRole125C1262) Resource creation Initiated
  3/33 | 12:58:12 PM | UPDATE_IN_PROGRESS   | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset7/Default (PipelineAssetsFileAsset7A51C54D0) 
  3/33 | 12:58:12 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRole0A88A03D) Resource creation Initiated
  3/33 | 12:58:12 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleB5BD1B02) 
  3/33 | 12:58:12 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleD7224BDE) Resource creation Initiated
  3/33 | 12:58:12 PM | UPDATE_IN_PROGRESS   | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset5/Default (PipelineAssetsFileAsset5184A5C2F) 
  3/33 | 12:58:13 PM | UPDATE_IN_PROGRESS   | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset3/Default (PipelineAssetsFileAsset3FE71B523) 
  3/33 | 12:58:13 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role              | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleB5BD1B02) Resource creation Initiated
  3/33 | 12:58:13 PM | UPDATE_IN_PROGRESS   | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset4/Default (PipelineAssetsFileAsset474303B7D) 
  3/33 | 12:58:13 PM | UPDATE_IN_PROGRESS   | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset9/Default (PipelineAssetsFileAsset9F08741A2) 
  3/33 | 12:58:13 PM | UPDATE_COMPLETE      | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset7/Default (PipelineAssetsFileAsset7A51C54D0) 
  3/33 | 12:58:14 PM | UPDATE_COMPLETE      | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset5/Default (PipelineAssetsFileAsset5184A5C2F) 
  3/33 | 12:58:14 PM | UPDATE_COMPLETE      | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset4/Default (PipelineAssetsFileAsset474303B7D) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
  4/33 | 12:58:14 PM | UPDATE_COMPLETE      | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset9/Default (PipelineAssetsFileAsset9F08741A2) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
  5/33 | 12:58:23 PM | UPDATE_COMPLETE      | AWS::CodeBuild::Project     | Pipeline/ts/FileAsset3/Default (PipelineAssetsFileAsset3FE71B523) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 10/33 | 12:58:41 PM | CREATE_COMPLETE      | AWS::IAM::Role              | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRole9984FB3F) 
 10/33 | 12:58:41 PM | CREATE_COMPLETE      | AWS::IAM::Role              | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRole125C1262) 
 10/33 | 12:58:41 PM | CREATE_COMPLETE      | AWS::IAM::Role              | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleD7224BDE) 
 10/33 | 12:58:41 PM | CREATE_COMPLETE      | AWS::IAM::Role              | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRole0A88A03D) 
 10/33 | 12:58:41 PM | CREATE_COMPLETE      | AWS::IAM::Role              | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleB5BD1B02) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 10/33 | 12:58:45 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole/DefaultPolicy elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRoleDefaultPolicy761E1831) 
 10/33 | 12:58:45 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole/DefaultPolicy elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRoleDefaultPolicyD25AD0A7) 
 10/33 | 12:58:46 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole/DefaultPolicy elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRoleDefaultPolicyA024FD64) 
 10/33 | 12:58:46 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole/DefaultPolicy elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleDefaultPolicy2B847A5A) 
 10/33 | 12:58:46 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole/DefaultPolicy elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRoleDefaultPolicy761E1831) Resource creation Initiated
 10/33 | 12:58:46 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole/DefaultPolicy elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRoleDefaultPolicyD25AD0A7) Resource creation Initiated
 10/33 | 12:58:46 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole/DefaultPolicy elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRoleDefaultPolicyA024FD64) Resource creation Initiated
 10/33 | 12:58:47 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole/DefaultPolicy elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleDefaultPolicy2B847A5A) Resource creation Initiated
 10/33 | 12:58:47 PM | UPDATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Role/DefaultPolicy (PipelineRoleDefaultPolicy7BDC1ABB) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 10/33 | 12:58:54 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole/DefaultPolicy elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleDefaultPolicy2F744749) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 10/33 | 12:58:55 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy            | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole/DefaultPolicy elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleDefaultPolicy2F744749) Resource creation Initiated
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 14/33 | 12:59:01 PM | CREATE_COMPLETE      | AWS::IAM::Policy            | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole/DefaultPolicy elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRoleDefaultPolicyD25AD0A7) 
 14/33 | 12:59:01 PM | CREATE_COMPLETE      | AWS::IAM::Policy            | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole/DefaultPolicy elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRoleDefaultPolicy761E1831) 
 14/33 | 12:59:02 PM | CREATE_COMPLETE      | AWS::IAM::Policy            | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole/DefaultPolicy elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRoleDefaultPolicyA024FD64) 
 14/33 | 12:59:02 PM | CREATE_COMPLETE      | AWS::IAM::Policy            | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole/DefaultPolicy elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleDefaultPolicy2B847A5A) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 15/33 | 12:59:10 PM | CREATE_COMPLETE      | AWS::IAM::Policy            | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole/DefaultPolicy elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleDefaultPolicy2F744749) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 16/33 | 12:59:16 PM | UPDATE_COMPLETE      | AWS::IAM::Policy            | Pipeline/line/Role/DefaultPolicy (PipelineRoleDefaultPolicy7BDC1ABB) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 17/33 | 12:59:21 PM | UPDATE_IN_PROGRESS   | AWS::CodePipeline::Pipeline | Pipeline/line (Pipeline9850B417) 
 17/33 | 12:59:23 PM | UPDATE_COMPLETE      | AWS::CodePipeline::Pipeline | Pipeline/line (Pipeline9850B417) 
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
 17/33 | 12:59:30 PM | UPDATE_COMPLETE_CLEA | AWS::CloudFormation::Stack  | lineStack 
Stack PipelineStack is still not stable (UPDATE_COMPLETE_CLEANUP_IN_PROGRESS)
 28/33 | 12:59:31 PM | DELETE_IN_PROGRESS   | AWS::IAM::Policy            | lineAssets5c35ab4bbb02012923f039e277f810740c0c1129c376e5473c4452672a457d4bCodePipelineActoleDefaultPolicyFA09C352 
 28/33 | 12:59:31 PM | DELETE_IN_PROGRESS   | AWS::IAM::Policy            | lineAssets57df2c208983103f0b0ad76b1f03a39c6c785c43c25ca42ba1a5513614ec8b0fCodePipelineActoleDefaultPolicy052FA284 
 28/33 | 12:59:31 PM | DELETE_IN_PROGRESS   | AWS::IAM::Policy            | lineAssets5c7d0a17549d0bf0e92e020035c8dd1a730757c6fca3ed654a9fa9e03add131aCodePipelineActoleDefaultPolicyA0973FFA 
 28/33 | 12:59:31 PM | DELETE_IN_PROGRESS   | AWS::IAM::Policy            | lineAssetsef20590f2c6f581a4ba83b5051974e11aa1da9c890c1177605cd23278aa8956cCodePipelineActoleDefaultPolicy58C825F4 
 28/33 | 12:59:31 PM | DELETE_IN_PROGRESS   | AWS::IAM::Policy            | lineAssets46c5549131686266a755813298e43f4061b42da642acf14c76d3ce6b785475a3CodePipelineActoleDefaultPolicy5F924066 
 28/33 | 12:59:32 PM | DELETE_COMPLETE      | AWS::IAM::Policy            | lineAssets57df2c208983103f0b0ad76b1f03a39c6c785c43c25ca42ba1a5513614ec8b0fCodePipelineActoleDefaultPolicy052FA284 
 28/33 | 12:59:32 PM | DELETE_COMPLETE      | AWS::IAM::Policy            | lineAssets5c7d0a17549d0bf0e92e020035c8dd1a730757c6fca3ed654a9fa9e03add131aCodePipelineActoleDefaultPolicyA0973FFA 
 28/33 | 12:59:32 PM | DELETE_COMPLETE      | AWS::IAM::Policy            | lineAssetsef20590f2c6f581a4ba83b5051974e11aa1da9c890c1177605cd23278aa8956cCodePipelineActoleDefaultPolicy58C825F4 
 28/33 | 12:59:32 PM | DELETE_COMPLETE      | AWS::IAM::Policy            | lineAssets5c35ab4bbb02012923f039e277f810740c0c1129c376e5473c4452672a457d4bCodePipelineActoleDefaultPolicyFA09C352 
 28/33 | 12:59:32 PM | DELETE_COMPLETE      | AWS::IAM::Policy            | lineAssets46c5549131686266a755813298e43f4061b42da642acf14c76d3ce6b785475a3CodePipelineActoleDefaultPolicy5F924066 
 28/33 | 12:59:32 PM | DELETE_IN_PROGRESS   | AWS::IAM::Role              | lineAssets57df2c208983103f0b0ad76b1f03a39c6c785c43c25ca42ba1a5513614ec8b0fCodePipelineActoleD66B82B1 
 28/33 | 12:59:32 PM | DELETE_IN_PROGRESS   | AWS::IAM::Role              | lineAssets5c35ab4bbb02012923f039e277f810740c0c1129c376e5473c4452672a457d4bCodePipelineActole5BE287C6 
 28/33 | 12:59:32 PM | DELETE_IN_PROGRESS   | AWS::IAM::Role              | lineAssetsef20590f2c6f581a4ba83b5051974e11aa1da9c890c1177605cd23278aa8956cCodePipelineActole9446E131 
 28/33 | 12:59:32 PM | DELETE_IN_PROGRESS   | AWS::IAM::Role              | lineAssets5c7d0a17549d0bf0e92e020035c8dd1a730757c6fca3ed654a9fa9e03add131aCodePipelineActole50CD21F4 
 28/33 | 12:59:33 PM | DELETE_IN_PROGRESS   | AWS::IAM::Role              | lineAssets46c5549131686266a755813298e43f4061b42da642acf14c76d3ce6b785475a3CodePipelineActole1B4B17CA 
 28/33 | 12:59:34 PM | DELETE_COMPLETE      | AWS::IAM::Role              | lineAssets5c35ab4bbb02012923f039e277f810740c0c1129c376e5473c4452672a457d4bCodePipelineActole5BE287C6 
 28/33 | 12:59:34 PM | DELETE_COMPLETE      | AWS::IAM::Role              | lineAssets57df2c208983103f0b0ad76b1f03a39c6c785c43c25ca42ba1a5513614ec8b0fCodePipelineActoleD66B82B1 
 28/33 | 12:59:34 PM | DELETE_COMPLETE      | AWS::IAM::Role              | lineAssets46c5549131686266a755813298e43f4061b42da642acf14c76d3ce6b785475a3CodePipelineActole1B4B17CA 
 28/33 | 12:59:34 PM | DELETE_COMPLETE      | AWS::IAM::Role              | lineAssetsef20590f2c6f581a4ba83b5051974e11aa1da9c890c1177605cd23278aa8956cCodePipelineActole9446E131 
 28/33 | 12:59:34 PM | DELETE_COMPLETE      | AWS::IAM::Role              | lineAssets5c7d0a17549d0bf0e92e020035c8dd1a730757c6fca3ed654a9fa9e03add131aCodePipelineActole50CD21F4 
 28/33 | 12:59:34 PM | UPDATE_COMPLETE      | AWS::CloudFormation::Stack  | lineStack 
Stack PipelineStack has completed updating

 ✅  PipelineStack

Stack ARN:
arn:aws:cloudformation:eu-central-1:1111111111:stack/PipelineStack/2d90-c68f-11ea-94ee-0a233b5d9d4c

[Container] 2020/07/15 12:59:37 Phase complete: BUILD State: SUCCEEDED
[Container] 2020/07/15 12:59:37 Phase context status code:  Message: 
[Container] 2020/07/15 12:59:37 Entering phase POST_BUILD
[Container] 2020/07/15 12:59:37 Phase complete: POST_BUILD State: SUCCEEDED
[Container] 2020/07/15 12:59:37 Phase context status code:  Message: 


<details>
<summary>CodeBuild logs</summary>

[Container] 2020/07/15 12:57:16 Running command cdk -a . deploy PipelineStack --require-approval=never --verboseCDK toolkit version: 1.51.0 (build 8c2d53c)Command line arguments: { _: [ 'deploy' ], a: '.', app: '.', 'require-approval': 'never', requireApproval: 'never', verbose: 1, v: 1, 'ignore-errors': false, ignoreErrors: false, json: false, j: false, ec2creds: undefined, i: undefined, 'version-reporting': undefined, versionReporting: undefined, 'path-metadata': true, pathMetadata: true, 'asset-metadata': true, assetMetadata: true, 'role-arn': undefined, r: undefined, roleArn: undefined, staging: true, 'no-color': false, noColor: false, fail: false, 'build-exclude': [], E: [], buildExclude: [], ci: false, execute: true, force: false, f: false, parameters: [ {} ], 'previous-parameters': true, previousParameters: true, '$0': '/usr/local/bin/cdk', STACKS: [ 'PipelineStack' ], stacks: [ 'PipelineStack' ] }merged settings: { versionReporting: true, pathMetadata: true, output: 'cdk.out', app: '.', context: {}, tags: [], assetMetadata: true, requireApproval: 'never', toolkitBucket: {}, staging: true }Toolkit stack: CDKToolkitSetting "CDK_DEFAULT_REGION" environment variable to eu-central-1Resolving default credentialsLooking up default account ID from STSDefault account ID: 1111111111Setting "CDK_DEFAULT_ACCOUNT" environment variable to 1111111111context: { 'aws:cdk:enable-path-metadata': true, 'aws:cdk:enable-asset-metadata': true }--app points to a cloud assembly, so we bypass synthPipelineStack: deploying...Assuming role 'arn:aws:iam::1111111111:role/hnb659fds-deploy-role-1111111111-eu-central-1'.Waiting for stack CDKToolkit to finish creating or updating...[0%] start: Publishing 65a6bd9bc7f71e9fd2a17c7f41bf3d87f620c2930b4ed93db84329371c27:1111111111-eu-central-1Retrieved account ID 1111111111 from disk cacheAssuming role 'arn:aws:iam::1111111111:role/hnb659fds-file-publishing-role-1111111111-eu-central-1'.[0%] check: Check s3://cdk-hnb659fds-assets-1111111111-eu-central-1/65a6bd9bc7f71e9fd2a17c7f41bf3d87f620c2930b4ed93db84329371c27[0%] upload: Upload s3://cdk-hnb659fds-assets-1111111111-eu-central-1/65a6bd9bc7f71e9fd2a17c7f41bf3d87f620c2930b4ed93db84329371c27[100%] success: Published 65a6bd9bc7f71e9fd2a17c7f41bf3d87f620c2930b4ed93db84329371c27:1111111111-eu-central-1PipelineStack: checking if we can skip deployPipelineStack: template has changedPipelineStack: deploying...Attempting to create ChangeSet CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 to update stack lineStackPipelineStack: creating CloudFormation changeset...
Initiated creation of changeset: aws:cloudformation:eu-central-1:1111111111:changeSet/5bd31a53-9245-454a-b8cf-60f8fc3afcb6/e2a256d5-c1d6-46b3-a202-9e9c9b106672; waiting for o finish creating...
Waiting for changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack to sh creating...
Changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack is still ting
Changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack is still ting
Changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack is still ting
Changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack is still ting
Initiating execution of changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack lineStack
Execution of changeset CDK-5bd31a53-9245-454a-b8cf-60f8fc3afcb6 on stack PipelineStack started; waiting for the update to complete...
Waiting for stack PipelineStack to finish creating or updating...
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS (User Initiated))
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
3/33 | 12:58:11 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRole9984FB3F)
3/33 | 12:58:12 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRole125C1262)
3/33 | 12:58:12 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRole9984FB3F) Resource creation Initiated
3/33 | 12:58:12 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRole0A88A03D)
3/33 | 12:58:12 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleD7224BDE)
3/33 | 12:58:12 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRole125C1262) Resource creation Initiated
3/33 | 12:58:12 PM | UPDATE_IN_PROGRESS | AWS::CodeBuild::Project | Pipeline/ts/FileAsset7/Default (PipelineAssetsFileAsset7A51C54D0)
3/33 | 12:58:12 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRole0A88A03D) Resource creation Initiated
3/33 | 12:58:12 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleB5BD1B02)
3/33 | 12:58:12 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleD7224BDE) Resource creation Initiated
3/33 | 12:58:12 PM | UPDATE_IN_PROGRESS | AWS::CodeBuild::Project | Pipeline/ts/FileAsset5/Default (PipelineAssetsFileAsset5184A5C2F)
3/33 | 12:58:13 PM | UPDATE_IN_PROGRESS | AWS::CodeBuild::Project | Pipeline/ts/FileAsset3/Default (PipelineAssetsFileAsset3FE71B523)
3/33 | 12:58:13 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleB5BD1B02) Resource creation Initiated
3/33 | 12:58:13 PM | UPDATE_IN_PROGRESS | AWS::CodeBuild::Project | Pipeline/ts/FileAsset4/Default (PipelineAssetsFileAsset474303B7D)
3/33 | 12:58:13 PM | UPDATE_IN_PROGRESS | AWS::CodeBuild::Project | Pipeline/ts/FileAsset9/Default (PipelineAssetsFileAsset9F08741A2)
3/33 | 12:58:13 PM | UPDATE_COMPLETE | AWS::CodeBuild::Project | Pipeline/ts/FileAsset7/Default (PipelineAssetsFileAsset7A51C54D0)
3/33 | 12:58:14 PM | UPDATE_COMPLETE | AWS::CodeBuild::Project | Pipeline/ts/FileAsset5/Default (PipelineAssetsFileAsset5184A5C2F)
3/33 | 12:58:14 PM | UPDATE_COMPLETE | AWS::CodeBuild::Project | Pipeline/ts/FileAsset4/Default (PipelineAssetsFileAsset474303B7D)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
4/33 | 12:58:14 PM | UPDATE_COMPLETE | AWS::CodeBuild::Project | Pipeline/ts/FileAsset9/Default (PipelineAssetsFileAsset9F08741A2)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
5/33 | 12:58:23 PM | UPDATE_COMPLETE | AWS::CodeBuild::Project | Pipeline/ts/FileAsset3/Default (PipelineAssetsFileAsset3FE71B523)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
10/33 | 12:58:41 PM | CREATE_COMPLETE | AWS::IAM::Role | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRole9984FB3F)
10/33 | 12:58:41 PM | CREATE_COMPLETE | AWS::IAM::Role | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRole125C1262)
10/33 | 12:58:41 PM | CREATE_COMPLETE | AWS::IAM::Role | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleD7224BDE)
10/33 | 12:58:41 PM | CREATE_COMPLETE | AWS::IAM::Role | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRole0A88A03D)
10/33 | 12:58:41 PM | CREATE_COMPLETE | AWS::IAM::Role | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleB5BD1B02)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
10/33 | 12:58:45 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole/DefaultPolicy elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRoleDefaultPolicy761E1831)
10/33 | 12:58:45 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole/DefaultPolicy elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRoleDefaultPolicyD25AD0A7)
10/33 | 12:58:46 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole/DefaultPolicy elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRoleDefaultPolicyA024FD64)
10/33 | 12:58:46 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole/DefaultPolicy elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleDefaultPolicy2B847A5A)
10/33 | 12:58:46 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole/DefaultPolicy elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRoleDefaultPolicy761E1831) Resource creation Initiated
10/33 | 12:58:46 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole/DefaultPolicy elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRoleDefaultPolicyD25AD0A7) Resource creation Initiated
10/33 | 12:58:46 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole/DefaultPolicy elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRoleDefaultPolicyA024FD64) Resource creation Initiated
10/33 | 12:58:47 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole/DefaultPolicy elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleDefaultPolicy2B847A5A) Resource creation Initiated
10/33 | 12:58:47 PM | UPDATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Role/DefaultPolicy (PipelineRoleDefaultPolicy7BDC1ABB)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
10/33 | 12:58:54 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole/DefaultPolicy elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleDefaultPolicy2F744749)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
10/33 | 12:58:55 PM | CREATE_IN_PROGRESS | AWS::IAM::Policy | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole/DefaultPolicy elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleDefaultPolicy2F744749) Resource creation Initiated
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
14/33 | 12:59:01 PM | CREATE_COMPLETE | AWS::IAM::Policy | Pipeline/line/Assets/e3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21/PipelineActionRole/DefaultPolicy elineAssetse3c385af9f0538d61e567e307305627f27b709bbe58c8efce25debed54d3ab21CodePipelineAcRoleDefaultPolicyD25AD0A7)
14/33 | 12:59:01 PM | CREATE_COMPLETE | AWS::IAM::Policy | Pipeline/line/Assets/3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0/PipelineActionRole/DefaultPolicy elineAssets3f399ce66b41b1c428a01d8b7eeaa7a3d41331c4b14d39325e6708e7d37836f0CodePipelineAcRoleDefaultPolicy761E1831)
14/33 | 12:59:02 PM | CREATE_COMPLETE | AWS::IAM::Policy | Pipeline/line/Assets/89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604/PipelineActionRole/DefaultPolicy elineAssets89524a47ac4311f937565f59b5bc547cc948ad206a9a3f668dfc9bf6c8a8a604CodePipelineAcRoleDefaultPolicyA024FD64)
14/33 | 12:59:02 PM | CREATE_COMPLETE | AWS::IAM::Policy | Pipeline/line/Assets/b1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afe/PipelineActionRole/DefaultPolicy elineAssetsb1ffd606562b3b3604283f5eb0bf49884fd75410d1aa4ce32340a01fb2027afeCodePipelineAcRoleDefaultPolicy2B847A5A)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
15/33 | 12:59:10 PM | CREATE_COMPLETE | AWS::IAM::Policy | Pipeline/line/Assets/5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3/PipelineActionRole/DefaultPolicy elineAssets5ed45fb3355317663862b23a1c32016178ae9b6d91c7ad301fcdaf93a3dc66f3CodePipelineAcRoleDefaultPolicy2F744749)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
16/33 | 12:59:16 PM | UPDATE_COMPLETE | AWS::IAM::Policy | Pipeline/line/Role/DefaultPolicy (PipelineRoleDefaultPolicy7BDC1ABB)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
17/33 | 12:59:21 PM | UPDATE_IN_PROGRESS | AWS::CodePipeline::Pipeline | Pipeline/line (Pipeline9850B417)
17/33 | 12:59:23 PM | UPDATE_COMPLETE | AWS::CodePipeline::Pipeline | Pipeline/line (Pipeline9850B417)
Stack PipelineStack is still not stable (UPDATE_IN_PROGRESS)
17/33 | 12:59:30 PM | UPDATE_COMPLETE_CLEA | AWS::CloudFormation::Stack | lineStack
Stack PipelineStack is still not stable (UPDATE_COMPLETE_CLEANUP_IN_PROGRESS)
28/33 | 12:59:31 PM | DELETE_IN_PROGRESS | AWS::IAM::Policy | lineAssets5c35ab4bbb02012923f039e277f810740c0c1129c376e5473c4452672a457d4bCodePipelineActoleDefaultPolicyFA09C352
28/33 | 12:59:31 PM | DELETE_IN_PROGRESS | AWS::IAM::Policy | lineAssets57df2c208983103f0b0ad76b1f03a39c6c785c43c25ca42ba1a5513614ec8b0fCodePipelineActoleDefaultPolicy052FA284
28/33 | 12:59:31 PM | DELETE_IN_PROGRESS | AWS::IAM::Policy | lineAssets5c7d0a17549d0bf0e92e020035c8dd1a730757c6fca3ed654a9fa9e03add131aCodePipelineActoleDefaultPolicyA0973FFA
28/33 | 12:59:31 PM | DELETE_IN_PROGRESS | AWS::IAM::Policy | lineAssetsef20590f2c6f581a4ba83b5051974e11aa1da9c890c1177605cd23278aa8956cCodePipelineActoleDefaultPolicy58C825F4
28/33 | 12:59:31 PM | DELETE_IN_PROGRESS | AWS::IAM::Policy | lineAssets46c5549131686266a755813298e43f4061b42da642acf14c76d3ce6b785475a3CodePipelineActoleDefaultPolicy5F924066
28/33 | 12:59:32 PM | DELETE_COMPLETE | AWS::IAM::Policy | lineAssets57df2c208983103f0b0ad76b1f03a39c6c785c43c25ca42ba1a5513614ec8b0fCodePipelineActoleDefaultPolicy052FA284
28/33 | 12:59:32 PM | DELETE_COMPLETE | AWS::IAM::Policy | lineAssets5c7d0a17549d0bf0e92e020035c8dd1a730757c6fca3ed654a9fa9e03add131aCodePipelineActoleDefaultPolicyA0973FFA
28/33 | 12:59:32 PM | DELETE_COMPLETE | AWS::IAM::Policy | lineAssetsef20590f2c6f581a4ba83b5051974e11aa1da9c890c1177605cd23278aa8956cCodePipelineActoleDefaultPolicy58C825F4
28/33 | 12:59:32 PM | DELETE_COMPLETE | AWS::IAM::Policy | lineAssets5c35ab4bbb02012923f039e277f810740c0c1129c376e5473c4452672a457d4bCodePipelineActoleDefaultPolicyFA09C352
28/33 | 12:59:32 PM | DELETE_COMPLETE | AWS::IAM::Policy | lineAssets46c5549131686266a755813298e43f4061b42da642acf14c76d3ce6b785475a3CodePipelineActoleDefaultPolicy5F924066
28/33 | 12:59:32 PM | DELETE_IN_PROGRESS | AWS::IAM::Role | lineAssets57df2c208983103f0b0ad76b1f03a39c6c785c43c25ca42ba1a5513614ec8b0fCodePipelineActoleD66B82B1
28/33 | 12:59:32 PM | DELETE_IN_PROGRESS | AWS::IAM::Role | lineAssets5c35ab4bbb02012923f039e277f810740c0c1129c376e5473c4452672a457d4bCodePipelineActole5BE287C6
28/33 | 12:59:32 PM | DELETE_IN_PROGRESS | AWS::IAM::Role | lineAssetsef20590f2c6f581a4ba83b5051974e11aa1da9c890c1177605cd23278aa8956cCodePipelineActole9446E131
28/33 | 12:59:32 PM | DELETE_IN_PROGRESS | AWS::IAM::Role | lineAssets5c7d0a17549d0bf0e92e020035c8dd1a730757c6fca3ed654a9fa9e03add131aCodePipelineActole50CD21F4
28/33 | 12:59:33 PM | DELETE_IN_PROGRESS | AWS::IAM::Role | lineAssets46c5549131686266a755813298e43f4061b42da642acf14c76d3ce6b785475a3CodePipelineActole1B4B17CA
28/33 | 12:59:34 PM | DELETE_COMPLETE | AWS::IAM::Role | lineAssets5c35ab4bbb02012923f039e277f810740c0c1129c376e5473c4452672a457d4bCodePipelineActole5BE287C6
28/33 | 12:59:34 PM | DELETE_COMPLETE | AWS::IAM::Role | lineAssets57df2c208983103f0b0ad76b1f03a39c6c785c43c25ca42ba1a5513614ec8b0fCodePipelineActoleD66B82B1
28/33 | 12:59:34 PM | DELETE_COMPLETE | AWS::IAM::Role | lineAssets46c5549131686266a755813298e43f4061b42da642acf14c76d3ce6b785475a3CodePipelineActole1B4B17CA
28/33 | 12:59:34 PM | DELETE_COMPLETE | AWS::IAM::Role | lineAssetsef20590f2c6f581a4ba83b5051974e11aa1da9c890c1177605cd23278aa8956cCodePipelineActole9446E131
28/33 | 12:59:34 PM | DELETE_COMPLETE | AWS::IAM::Role | lineAssets5c7d0a17549d0bf0e92e020035c8dd1a730757c6fca3ed654a9fa9e03add131aCodePipelineActole50CD21F4
28/33 | 12:59:34 PM | UPDATE_COMPLETE | AWS::CloudFormation::Stack | lineStack
Stack PipelineStack has completed updating

✅ PipelineStack

Stack ARN:
arn:aws:cloudformation:eu-central-1:1111111111:stack/PipelineStack/2d90-c68f-11ea-94ee-0a233b5d9d4c

[Container] 2020/07/15 12:59:37 Phase complete: BUILD State: SUCCEEDED
[Container] 2020/07/15 12:59:37 Phase context status code: Message:
[Container] 2020/07/15 12:59:37 Entering phase POST_BUILD
[Container] 2020/07/15 12:59:37 Phase complete: POST_BUILD State: SUCCEEDED
[Container] 2020/07/15 12:59:37 Phase context status code: Message:

</details>

So the underlying issue (bug?) is the assets (or asset hashes) being updated in the 'Build' stage, even when the source code has not changed (same git commit).

I should maybe add that I'm using my own CodeBuild project to create the CDK synth (as outlined in the API reference) to build my lambdas and React SPA along with my CDK app.

const buildProject = new codebuild.PipelineProject(this, 'BuildProject', {
  buildSpec: codebuild.BuildSpec.fromSourceFilename('buildspec.yml'),
  environment: {
    buildImage: codebuild.LinuxBuildImage.STANDARD_4_0,
  },
});
const synthAction = new codepipeline_actions.CodeBuildAction({
  actionName: 'Build',
  project: buildProject,
  input: sourceArtifact,
  outputs: [cloudAssemblyArtifact],
});

const pipeline = new pipelines.CdkPipeline(this, 'Pipeline', {
  pipelineName: 'Pipeline',
  cloudAssemblyArtifact,
  sourceAction,
  synthAction,
});

My buildspec.yaml:

version: 0.2

phases:
  install:
    commands:
      # download binaries 
  pre_build:
    commands:
      - cd $CODEBUILD_SRC_DIR/infra/lambda # root of my Go lambdas
      - task deps
      - cd $CODEBUILD_SRC_DIR/web # root of React SPA
      - yarn install
      - cd $CODEBUILD_SRC_DIR/infra/ # root of my CDK app, which makes references to lambda and SPA build outputs produced in the "build" phase using lambda.AssetCode.fromAsset and s3deploy.Source.asset
      - yarn install
  build:
    commands:
      - cd $CODEBUILD_SRC_DIR/infra/lambda
      - task build package
      - cd $CODEBUILD_SRC_DIR/web
      - yarn build
      - yarn package:staging
      - yarn package:prod
      - cd $CODEBUILD_SRC_DIR/infra/
      - yarn build
      - yarn cdk synth

artifacts:
  base-directory: infra/cdk.out
  files:
    - '**/*'

I don't understand why my assets are being updated on every build. Clearly, Go and Webpack produce new (different) output files (different file creation dates, etc.) for the same input files on every build. But this shouldn't trigger CFN resource updates.

I hope to get help here because I'm currently stuck.

@nonken
Copy link
Contributor

nonken commented Jul 15, 2020

I see similar behaviour in my pipeline:

Expected behaviour:
Pipeline only updates itself when there are infra updates.

Actual behaviour:
On each application code change, the pipeline self updates one time before deploying application artifacts.

Setup:
New pipelines
Lambdas which use code: code.fromAsset('./buildpath) and standardNpmSynth to trigger the build.

Possible explanation:
I didn't dive into the internals, but the only way I can explain this is that you're creating hashes for the artifact build dirs as well. So on first run of a new commit sha, the build output hash changes and you trigger a new pipeline update. On second run the hash is the same and you can proceed to deploymeny. This makes a deployment take a long time :)

@christophgysin
Copy link
Contributor

FWIW I had the same issue when running parcel to bundle my frontend code to be deployed with aws-s3-deployment. Turns out that parcel has a bug, where it includes the current directory into the hash. That creates new assets on every build, and causes the pipeline to update itself forever.

It seems that CDK shouldn't update the pipeline if an asset changes. The Asset stage should simply upload all assets in cdk.out, not create specific actions for each asset hash that require modifying the pipeline.

@asterikx
Copy link
Contributor Author

asterikx commented Jul 15, 2020

Expected behaviour:
Pipeline only updates itself when there are infra updates.

It seems that CDK shouldn't update the pipeline if an asset changes. The Asset stage should simply upload all assets in cdk.out, not create specific actions for each asset hash that require modifying the pipeline.

I totally agree with @nonken and @christophgysin. As it turns out the hashes of my assets change with every build (Webpack generates JS chunks with short random IDs), so that's why the pipeline loops forever.
If CDK would just upload the "new" asset versions, everything would be fine.

@seawatts
Copy link

@asterikx I think I am facing a similar issue with webpack. However, my docker images also cause it to get rebuilt as well. So I think it is both.

@bweigel
Copy link
Contributor

bweigel commented Jul 18, 2020

Having the same issue. In my build step I need to build my artifacts using Docker. The resulting asset hash constantly changes leading into the loop

@ghost
Copy link

ghost commented Jul 20, 2020

I'm having the same issue. I have a similar setup to what they describe in this blog: https://aws.amazon.com/blogs/developer/cdk-pipelines-continuous-delivery-for-aws-cdk-applications/

Any known workaround at this point?

@eladb
Copy link
Contributor

eladb commented Jul 20, 2020

It seems that CDK shouldn't update the pipeline if an asset changes. The Asset stage should simply upload all assets in cdk.out, not create specific actions for each asset hash that require modifying the pipeline.

The current implementation creates a publishing action for each asset in order to maximize parallelism. Assets are identified by a hash of their contents in order to enable heavy caching throughout the pipeline and automatically invalidate only the needed components.

The unfortunate side effect of this design is that any asset change results a mutation of the pipeline. We will need to explore approaches to avoid that (e.g. by creating publish actions based on the number of assets and not on the actual asset hash). I am retitling this issue so we can follow up on this specific problem.

The other problem is if the asset hash is "unstable" - as in, a different hash is produced in every build. This may happen if the build output has e.g. timestamps in it and the hash is calculated on the bundle output. To circumvent that, the framework offers knobs to control how the hash is calculated. Namely assetHashType and assetHash. The former can be used with asset bundling to control if the hash is calculated on the source or the bundle, and the latter can be used to specify a custom hash explicitly.

@eladb eladb changed the title [cdk-pipelines] 'UpdatePipepline' fails although 'SelfMutate' was successful and leads to infinite loop [cdk-pipelines] Every asset update mutates the pipeline Jul 20, 2020
@asterikx
Copy link
Contributor Author

@eladb thanks!

So it seems to me that for any compiled binaries or bundled files with random IDs or timestamps, it will be necessary to calculate the hash over the source files manually. E.g.

new s3deploy.BucketDeployment(this, 'DeploySite', {
  sources: [
    s3deploy.Source.asset(path.join(__dirname, '../web/dist'), {
      assetHash: cdk.FileSystem.fingerprint(path.join(__dirname, '../web'), { exclude: ['dist'] }),
    }),
  ],
  destinationBucket: siteBucket,
  distribution,
  distributionPaths: ['/index.html', '/runtime-config.js'],
});

Would it be possible to generate a token from the source path and use that as name for the publishing action, e.g. path.join(__dirname, '../web/dist') --> TOKEN 123 --> PublishAssets123. So hash changes would not require pipeline mutations. Though I'm not sure how the publish action would know which asset it should deploy in this case ...

@eladb
Copy link
Contributor

eladb commented Jul 21, 2020

Would it be possible to generate a token from the source path and use that as name for the publishing action, e.g. path.join(__dirname, '../web/dist') --> TOKEN 123 --> PublishAssets123. So hash changes would not require pipeline mutations. Though I'm not sure how the publish action would know which asset it should deploy in this case ...

If we only use the path to calculate the hash, the asset won't be invalidated when it changes and will never be updated.


As I mentioned, I think we need to figure out a way to avoid pipeline updates when assets are changed and the way to do that would probably be to define publishing actions that are not coupled directly with the asset hash but rather with the number of assets in the app. If a new asset is added, the pipeline will be updated (another publish action is needed) but if assets are only updated, the pipeline won't need to change because we will already have a publishing action for each asset, and only the ones that changes will actually upload data (the rest will succeed with no-op).

@mergify mergify bot closed this as completed in #9183 Jul 21, 2020
mergify bot pushed a commit that referenced this issue Jul 21, 2020
Currently, changes to the asset hashes of content results in changes to the
definitions of the pipeline, causing the self-mutate state to trigger. This can
cause infinite loops for systems where build artifacts change on each build.

The cause for this looping is that the asset hash was embedded as the pipeline
action name. By replacing the asset hash with a simple asset counter (already
used for the action CloudFormation id), the pipeline definition should remain
stable on asset changes.

_Testing:_ Due to the pipeline executing the current version of CDK within the
pipeline, it's impossible to actual verify that this corrects the issue. To
test + verify, created a sample app where the asset hash changed on each build.
Then ran subsequent 'cdk synth' commands and diff'ed the output. Prior to this
change, there were numerous changes related to the asset hash in the pipeline
stack. After, only the buildspec of the CodeBuild project that referenced the
hash changed. This does not change the definition of the CodePipeline itself.

fixes #9080

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Chriscbr pushed a commit to Chriscbr/aws-cdk that referenced this issue Jul 23, 2020
Currently, changes to the asset hashes of content results in changes to the
definitions of the pipeline, causing the self-mutate state to trigger. This can
cause infinite loops for systems where build artifacts change on each build.

The cause for this looping is that the asset hash was embedded as the pipeline
action name. By replacing the asset hash with a simple asset counter (already
used for the action CloudFormation id), the pipeline definition should remain
stable on asset changes.

_Testing:_ Due to the pipeline executing the current version of CDK within the
pipeline, it's impossible to actual verify that this corrects the issue. To
test + verify, created a sample app where the asset hash changed on each build.
Then ran subsequent 'cdk synth' commands and diff'ed the output. Prior to this
change, there were numerous changes related to the asset hash in the pipeline
stack. After, only the buildspec of the CodeBuild project that referenced the
hash changed. This does not change the definition of the CodePipeline itself.

fixes aws#9080

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
curtiseppel pushed a commit to curtiseppel/aws-cdk that referenced this issue Aug 11, 2020
Currently, changes to the asset hashes of content results in changes to the
definitions of the pipeline, causing the self-mutate state to trigger. This can
cause infinite loops for systems where build artifacts change on each build.

The cause for this looping is that the asset hash was embedded as the pipeline
action name. By replacing the asset hash with a simple asset counter (already
used for the action CloudFormation id), the pipeline definition should remain
stable on asset changes.

_Testing:_ Due to the pipeline executing the current version of CDK within the
pipeline, it's impossible to actual verify that this corrects the issue. To
test + verify, created a sample app where the asset hash changed on each build.
Then ran subsequent 'cdk synth' commands and diff'ed the output. Prior to this
change, there were numerous changes related to the asset hash in the pipeline
stack. After, only the buildspec of the CodeBuild project that referenced the
hash changed. This does not change the definition of the CodePipeline itself.

fixes aws#9080

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@skinny85
Copy link
Contributor

skinny85 commented Feb 5, 2022

Tagging @rix0rrr to confirm whether there possibly was a regression for this.

@skinny85 skinny85 added needs-reproduction This issue needs reproduction. needs-triage This issue or PR still needs to be triaged. and removed p1 labels Feb 5, 2022
@rix0rrr
Copy link
Contributor

rix0rrr commented Feb 8, 2022

Hi @ldecaro,

The asset hash for the Dockerfile is based on the contents of the docker directory. Are those changing on every synth, perhaps? Are they generated on the fly? Do they have a timestamp in them?

@rix0rrr rix0rrr added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 8, 2022
@ldecaro
Copy link

ldecaro commented Feb 8, 2022

Hi @rix0rrr. Yes, they change every time or most of the time. The reason for this, is because the application inside the container is expected to change most of the times the pipelines runs. Inside the directory I only keep the dockerfile and a jar file. In this case, should the pipeline self update also on every run?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 8, 2022
@rix0rrr
Copy link
Contributor

rix0rrr commented Feb 9, 2022

The scenario is as follows:

image

The idea is that the second go-around of the synth uses the same source, and so even though the source change frequency might be high, it shouldn't have changed in the time it takes to do the self-update and restart. Ultimately the hash shouldn't change anymore, and the pipeline continues.

That is of course: unless there is something in the synth step itself that introduces nondeterminism.

@rix0rrr rix0rrr removed their assignment Feb 9, 2022
@ldecaro
Copy link

ldecaro commented Feb 9, 2022

Thank you for clarifying. In this case, I confirm the diagram above shows the behavior I’ve been seeing. It doesn’t stay in an infinite loop but it mutates, once, every time the asset changed and it usually changes on every commit. This is an extra 85 seconds, in general, to mutate the pipeline/asset.

@rix0rrr
Copy link
Contributor

rix0rrr commented Feb 11, 2022

Alright. I plan to change that, but it is what it is for now

@NGL321 NGL321 added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 14, 2022
@peterwoodworth peterwoodworth added effort/medium Medium work item – several days of effort effort/large Large work item – several weeks of effort and removed needs-reproduction This issue needs reproduction. effort/medium Medium work item – several days of effort labels Aug 16, 2022
@roamingthings
Copy link

roamingthings commented Sep 14, 2022

I think I ran into the same or a similar problem with a CDK Pipeline where the entire stack and application code for Lambda functions is written in Java 11.
My CodePipeline was also going into an infinite loop. After reading this issues I was also able to see that the Hash of assets including generated CloudFormation templates was changing on each build even if there has been no code change.

I may have been able to solve this problem by doing two things:

  1. Make sure that code assets (jar) are reproducible by adding the following to my Gradle build (there should be something similar for Maven):
tasks.withType<Zip> {
    isPreserveFileTimestamps = false
    isReproducibleFileOrder = true
}

(see Achieving stable task inputs in the Gradle documentation)

  1. Make sure that attributes in generated CloudFormation templates generated by CDK have a fixed order.
    Since Java does not support JSON natively a lot of Maps are used when creating resources. Originally I used Map.of() turned out that the order of the attributes in the generated JSON will be more or less random. For JSON this is totally fine but it resulted in varying hashes depending for each build depending on the order of the current build. To solve this issue I changed Map.of() to new TreeMap<>(Map.of()) whenever the map contains more than one key. Also this adds more boilerplate to the CDK code it seems to solve the CDK Pipeline issue.

I hope this workaround will help people running into the same issue with a Java setup.

@p-mercury
Copy link

I have experienced problems with the way assets publishing is implemented in the CodePipeline construct a couple of times now and I see the speed of publishing the assets in parallel as such a minor benefit over the issues it has caused me that I created a CLI tool that allows you to publish the assets based on the manifest.json.

Im also working on a custom Pipeline construct which has this as a native feature and solves a couple of other issues I see with the CDK native CodePipeline L3 construct.

I hope this helps some people.

@BwL1289
Copy link

BwL1289 commented Nov 2, 2024

I'm experiencing this endless loop where the asset hashes keep changing for reasons I do not understand.

This was working just fine for months, so it's not clear where the issue is coming from. Everything else in the synthed template remains the same.

AFAIK, synth is not introducing nondeterminism as it hasn't changed. The dockerfiles are exactly the same between runs, but the hashes keep changing.

<Redacted>StackDev: deploying... [1/1]
--
814 | [16:15:09] Retrieved account ID <redacted> from disk cache
815 | [16:15:09] <Redacted>StackDev: checking if we can skip deploy
816 | [16:15:10] <Redacted>StackDev: template has changed
817 | [16:15:10] <Redacted>StackDev: deploying...
818 | [16:15:10] Waiting for stack CDKToolkit to finish creating or updating...
819 | [16:15:10] Removing existing change set with name cdk-deploy-change-set if it exists

What else can I do to debug this?

@BwL1289
Copy link

BwL1289 commented Nov 2, 2024

Update: I reverted to PARALLEL mode from SUPERSEDED and restart_execution_on_update=False.

It's now able to progress to Assets stage. I'm on version 2.164.1.

For context:

  1. For months I was using SUPERSEDED mode with restart_execution_on_update=True on codepipeline V1.
  2. I recently migrated to V2, using PARALLEL mode and restart_execution_on_update=False.
    1. This worked
  3. Then I switched to SUPERSEDED mode with restart_execution_on_update=False.
    1. This did not work as the build would get cancelled (expected) after self-mutate, and I'd have to restart it manually, and then it would get cancelled again (unexpected)
  4. Then I switched to SUPERSEDED mode with restart_execution_on_update=True.
    1. This did not work as it would enter an endless loop between synth and self-mutate
  5. Then I switched back to PARALLEL mode and restart_execution_on_update=False. [this worked, again]
    1. This worked, again

I would like to switch back to SUPERSEDED mode with restart_execution_on_update=True as SUPERSEDED mode supports building 50 docker assets in parallel while PARALLEL only supports 5, and I'd like to not worry about the pipeline restarting after infra changes.

Can @rix0rrr maybe shed some light? Possible regression or user error?

@BwL1289
Copy link

BwL1289 commented Nov 25, 2024

Can this issue be prioritized? It's been a P1 for a while now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/pipelines CDK Pipelines library bug This issue is a bug. effort/large Large work item – several weeks of effort p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.