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

[@aws-cdk/pipelines] Incorrect CodeBuild image used in default synth action #9070

Closed
justin8 opened this issue Jul 15, 2020 · 2 comments · Fixed by #9446
Closed

[@aws-cdk/pipelines] Incorrect CodeBuild image used in default synth action #9070

justin8 opened this issue Jul 15, 2020 · 2 comments · Fixed by #9446
Assignees
Labels
@aws-cdk/pipelines CDK Pipelines library bug This issue is a bug. in-progress This issue is being actively worked on. p1

Comments

@justin8
Copy link
Contributor

justin8 commented Jul 15, 2020

When creating a CDK pipeline the default CodeBuild image in use is the old 1.0 one; 4.0 is the latest and specifying it manually allows the pipeline to build successfully. The issue is the 1.0 build image has an older version of node that is no longer supported by ts-jest.

Reproduction Steps

Follow the readme for aws-cdk/pipelines and create a single s3 bucket in the target stack

To resolve the error, change the following on the synthAction:

environment: { buildImage: codebuild.LinuxBuildImage.STANDARD_4_0 },

Error Log

During the codebuild phase right after the source stage I get the following error:

error ts-jest@26.1.2: The engine "node" is incompatible with this module. Expected version ">= 10.21.0". Got "10.19.0"

Environment

  • CLI Version: 1.51
  • Framework Version: 1.51
  • Node.js Version: v12.13.1
  • OS : MacOS
  • Language (Version): Typescript

Other


This is 🐛 Bug Report

@justin8 justin8 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 15, 2020
@justin8 justin8 changed the title aws-cdk/pipelines [aws-cdk/pipelines] Incorrect CodeBuild image used in default synth action Jul 15, 2020
@SomayaB SomayaB changed the title [aws-cdk/pipelines] Incorrect CodeBuild image used in default synth action [@aws-cdk/pipelines] Incorrect CodeBuild image used in default synth action Jul 15, 2020
@github-actions github-actions bot added the @aws-cdk/pipelines CDK Pipelines library label Jul 15, 2020
@ericzbeard
Copy link
Contributor

@justin8 Is this causing the stack to fail? I don't see any errors when I test it.

@ericzbeard ericzbeard added needs-reproduction This issue needs reproduction. and removed needs-triage This issue or PR still needs to be triaged. labels Jul 15, 2020
@justin8
Copy link
Contributor Author

justin8 commented Jul 16, 2020

Yes, it causes the synthesis stage of the pipeline to fail. Here is a repo that shows a repro. deploy it, push the repo to the created CodeCommit repo and click release in CodePipeline to reproduce the issue: https://github.com/justin8/cdk-pipeline-bug

Uncommenting the environment line in the file will resolve the issue as the build env will use the newer build images. Since the 1.0 images are no longer even listed in the CodeBuild docs perhaps we should be defaulting to at least a more modern/up-to-date image here anyway?

The first commit is the init of the repo, second one shows 100% of the changes required to make it fail; essentially just the exact example from the CDK pipelines sub-package

@ericzbeard ericzbeard added p1 and removed needs-reproduction This issue needs reproduction. labels Jul 16, 2020
@ericzbeard ericzbeard removed their assignment Jul 16, 2020
justin8 added a commit to justin8/aws-cdk that referenced this issue Aug 5, 2020
fixes aws#9070

This change moves CDK pipelines from standard build image 1.0 to 4.0
justin8 added a commit to justin8/aws-cdk that referenced this issue Aug 5, 2020
fixes aws#9070

This change moves CDK pipelines from standard build image 1.0 to 4.0
justin8 added a commit to justin8/aws-cdk that referenced this issue Aug 5, 2020
fixes aws#9070

This change moves CDK pipelines from standard build image 1.0 to 4.0
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Aug 5, 2020
@mergify mergify bot closed this as completed in #9446 Aug 10, 2020
mergify bot pushed a commit that referenced this issue Aug 10, 2020
fixes #9070

This change moves CDK pipelines from standard build image 1.0 to 4.0


----

*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
@aws-cdk/pipelines CDK Pipelines library bug This issue is a bug. in-progress This issue is being actively worked on. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants