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

(codebuild): AWS CDK 2.0 still defaults to LinuxBuildImage.STANDARD_1_0 #16707

Open
markusl opened this issue Sep 29, 2021 · 19 comments
Open

(codebuild): AWS CDK 2.0 still defaults to LinuxBuildImage.STANDARD_1_0 #16707

markusl opened this issue Sep 29, 2021 · 19 comments
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@markusl
Copy link
Contributor

markusl commented Sep 29, 2021

AWS CDK 2.0 still defaults to LinuxBuildImage.STANDARD_1_0

Reproduction Steps

Define a codebuild.Project in a pipeline.

What did you expect to happen?

The default build image should be something that AWS actually supports.

What actually happened?

CDK 2.0 defaults to an outdated build image.

Environment

  • CDK CLI Version : 2.0.0-rc.23 (build 1e54fb9)
  • Framework Version: 2.0.0-rc.23 (build 1e54fb9)
  • Node.js Version: 14
  • OS :
  • Language (Version): all

Other


This is 🐛 Bug Report

@markusl markusl added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 29, 2021
@github-actions github-actions bot added the @aws-cdk/aws-codebuild Related to AWS CodeBuild label Sep 29, 2021
@ryparker ryparker added effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Oct 22, 2021
@markusl
Copy link
Contributor Author

markusl commented Nov 5, 2021

@peterwoodworth do you know if this is going to be included in AWS CDK 2.0?

@peterwoodworth
Copy link
Contributor

I'm not sure - @skinny85 might know

@skinny85
Copy link
Contributor

skinny85 commented Nov 9, 2021

@markusl unfortunately, I don't have the bandwidth to take care of this. Unless you submit a PR to the v2-main branch making buildImage required, unfortunately this will probably not happen 😕.

@markusl
Copy link
Contributor Author

markusl commented Nov 9, 2021

@skinny85 well, it is a security consideration to use supported platforms, instead of old, insecure, and deprecated platforms by default.

I totally understand that there's a huge amount of different kinds of issues in your issue tracker but to me, it sounds weird that you expect library customers to take care of lifecycle updates of platform-level dependencies. In our company, we would like the library to default to the AWS recommended, standard and secure versions at all times.

@skinny85
Copy link
Contributor

skinny85 commented Nov 9, 2021

In our company, we would like the library to default to the AWS recommended, standard and secure versions at all times.

Unfortunately, that's kind of at odds with semantic versioning of a client-side library, so we're between a rock and a hard place (breaking backwards compatibility vs staying up to date).

@skinny85 skinny85 removed their assignment Dec 15, 2021
@markusl
Copy link
Contributor Author

markusl commented Mar 4, 2022

@peterwoodworth any news on this? Could you consider this for CDK v3? :)

@peterwoodworth
Copy link
Contributor

There are currently no plans for v3, so we can't really consider this for v3 quite yet. Also, we don't have an ETA on this.

I wonder if we could include this in v2 with feature flags?

@markusl
Copy link
Contributor Author

markusl commented Mar 8, 2022

@peterwoodworth Yep, I think that's the least you can do. It's really important that CDK libraries have sane defaults to officially supported CodeBuild images.

@markusl
Copy link
Contributor Author

markusl commented Mar 4, 2023

@peterwoodworth Hello again!

This issue still exists and a lot of people are seriously struggling with the AWS-provided default values that are not supported by AWS. Support for aws/codebuild/standard:5.0 is ending in a month and would be good to mark it as deprecated.

See also other related issues #23617 #23096 and #11960 which demonstrate why people are not having first-class experience at the moment.

@skinny85
Copy link
Contributor

skinny85 commented Mar 4, 2023

Maybe a feature flag? 😃

@markusl
Copy link
Contributor Author

markusl commented Mar 5, 2023

Maybe a feature flag? 😃

Sounds good. A feature flag to opt out of using the latest build image? :)

@skinny85
Copy link
Contributor

skinny85 commented Mar 5, 2023

Maybe a feature flag? 😃

Sounds good. A feature flag to opt out of using the latest build image? :)

I was actually thinking a feature flag that makes buildImage required 🙂.

@hoegertn
Copy link
Contributor

hoegertn commented Mar 5, 2023

Not sure that is a good idea. This would also mean that the buildImage needs to be required in all constructs using this like CDK pipelines or it would not change anything. For me one of the benefits of the CDK is having proven defaults instead of setting my own properties.

But I totally see that changing it also is a problem as it could be a breaking change.

@jsamuel1
Copy link

jsamuel1 commented Mar 6, 2023

I definitely expected my new CDK pipeline to use a new image - so I was surprised when I got an AWS Health warning about the deprecation of standard/5.0 image on my new pipeline.

@vumdao
Copy link

vumdao commented Mar 16, 2023

Fixed by #24544 ?

@markusl
Copy link
Contributor Author

markusl commented Mar 16, 2023

Fixed by #24544 ?

Unfortunately no:

* @default BuildEnvironment.LinuxBuildImage.STANDARD_1_0

this.buildImage = (props.environment && props.environment.buildImage) || LinuxBuildImage.STANDARD_1_0;

this.buildImage = (props.environment && props.environment.buildImage) || LinuxBuildImage.STANDARD_1_0;

@vumdao
Copy link

vumdao commented Mar 16, 2023

@markusl your ticket mentions cdk 2.0 and you're pointing issue from 1.0

@vumdao
Copy link

vumdao commented Mar 19, 2023

Just recognize that #24544 fixed for CDK pipeline only

mergify bot pushed a commit that referenced this issue Dec 31, 2023
…ined (#28533)

As per these documents, the following build image is not actively maintained, so I added @deprecated tag in this PR.

- `standard`
  - `STANDARD_1_0`
  - `STANDARD_2_0`
  - `STANDARD_3_0`
  - `STANDARD_4_0`
- `amazonlinux2-x86_64-standard`
  - `AMAZON_LINUX_2`
  - `AMAZON_LINUX_2_2`
  - `AMAZON_LINUX_2_3`
- `amazonlinux2-aarch64-standard`
  - `AMAZON_LINUX_2_STANDARD_1_0`

https://github.com/aws/aws-codebuild-docker-images?tab=readme-ov-file#image-maintenance
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

relates: #23096 (comment), #16707

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
paulhcsun pushed a commit to paulhcsun/aws-cdk that referenced this issue Jan 5, 2024
…ined (aws#28533)

As per these documents, the following build image is not actively maintained, so I added @deprecated tag in this PR.

- `standard`
  - `STANDARD_1_0`
  - `STANDARD_2_0`
  - `STANDARD_3_0`
  - `STANDARD_4_0`
- `amazonlinux2-x86_64-standard`
  - `AMAZON_LINUX_2`
  - `AMAZON_LINUX_2_2`
  - `AMAZON_LINUX_2_3`
- `amazonlinux2-aarch64-standard`
  - `AMAZON_LINUX_2_STANDARD_1_0`

https://github.com/aws/aws-codebuild-docker-images?tab=readme-ov-file#image-maintenance
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

relates: aws#23096 (comment), aws#16707

----

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

Landed here today with the same exact issue. Would love to see the team prioritize a good default here.

@pahud pahud added p2 and removed p1 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

No branches or pull requests

9 participants