aws / aws-codebuild-docker-images

Official AWS CodeBuild repository for managed Docker images http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html
Other
1.12k stars 977 forks source link

Add support for Node 20 #631

Closed joshlang closed 9 months ago

joshlang commented 1 year ago

Hello there 👋 ,

Now that Node 20 is LTS (https://nodejs.org/en/), can we add support for Node 20 as a supported runtime on CodeBuild?

Thanks heaps.

https://github.com/aws/aws-codebuild-docker-images/issues/580

joshlang commented 1 year ago

Just gettin' a headstart so maybe it'll be ready when LTS is ready (October?), rather than waiting an extra year

pvcresin commented 1 year ago

As per the above comments, the following command worked in my environment using aws/codebuild/standard:7.0.

phases:
  install:
    runtime-versions:
      nodejs: 18
    commands:
      - n 20
ashley-jisc commented 1 year ago

It would be really great to get Node 20 support. These long release windows from AWS really causes issues for us when it comes to maintenance.

alexahdp commented 1 year ago

+1 it would be good to be able to start working with v20. Otherwise, it is not very convenient to use CodeBuild.

estrudels commented 1 year ago

+1 Our team would appreciate very much to get Node 20 support 🌞

https://github.com/aws/aws-lambda-base-images/issues/91#issuecomment-1737694321

Hopefully by December 2023?

eadoking commented 1 year ago

Hello guys, any help needed to proceed for Node 20 images, ready to help afternoons and on weekends

pablomayobre commented 1 year ago

20 LTS is a thing starting today, good luck AWS team

TheNathanBlake commented 12 months ago

I'd love to see this happen well before AWS stops supporting node 16 because porting over an entire codebase is tedious enough that I'd love to jump straight to 20 instead of using 18 for 1 month as a stop-gap.

tfaller commented 11 months ago

public.ecr.aws/lambda/nodejs:20 is now available as a pre release image

AllyMurray commented 11 months ago

https://aws.amazon.com/about-aws/whats-new/2023/11/aws-lambda-support-node-js-20/

htxiong commented 11 months ago

👍 can someone process this pull request, it will be really helpful for my team as we are upgrading our systems to node 20.

wilhen01 commented 11 months ago

+1 on this. Ideally I would hope to see new Ubuntu / Amazon Linux images being released at the same time as Lambda support for new Node versions.

mrbusche commented 11 months ago

Isn't this complete? https://aws.amazon.com/blogs/compute/node-js-20-x-runtime-now-available-in-aws-lambda/

wilhen01 commented 11 months ago

Is this complete? https://aws.amazon.com/blogs/compute/node-js-20-x-runtime-now-available-in-aws-lambda/

Yes, Node 20 support for Lambda is out in the wild. I just checked the Lambda console and it's listed as an available runtime (it's the default if you click 'Create Function')

joshlang commented 11 months ago

They've completed an image which supports AWS 20

It is available for LAMBDA users

It is not yet available for CODEBUILD users

So, you can try using the n 20 command if you just want node 20... but if you want your build image to be the same as your execution image, then you're still stuck waiting for codebuild to support the image.

Codebuild: https://docs.aws.amazon.com/codebuild/latest/userguide/available-runtimes.html Lambda: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

wilhen01 commented 11 months ago

We used the n workaround for Node 18 while we waited for CodeBuild support and it was annoyingly flakey - we'd see builds time out attempting to download the node binaries every couple of days. I'd definitely advocate waiting for proper support if you can.

Dylan-AWS commented 10 months ago

CodeBuild released Node 20 in the AL:5.0 image and Ubuntu 7.0 (https://github.com/aws/aws-codebuild-docker-images/pull/689).

perrin4869 commented 10 months ago

What about support for the arm images?

wilhen01 commented 10 months ago

Yep, seconded on ARM images. I'll raise a new issue...

mbp commented 10 months ago

We used the n workaround for Node 18 while we waited for CodeBuild support and it was annoyingly flakey - we'd see builds time out attempting to download the node binaries every couple of days. I'd definitely advocate waiting for proper support if you can.

I learned today that you can use n 20 --offline and it will use the cached version already on the image, and not go fetch the latest on the internet. This should fix flakey behaviour.

wilhen01 commented 10 months ago

That's a good trick @mbp - thanks! I think I'm happy to wait for "proper" Node 20 support but always useful to know the workarounds 😊

ashley-jisc commented 9 months ago

Why are comments suddenly getting deleted? @aws

shellscape commented 9 months ago

They're deleting replies that are critical of the delay in adding Node 20 support.

aclark4life commented 9 months ago

n 20 saved me! Thanks all for this thread.

Dylan-AWS commented 9 months ago

CodeBuild released Node20 for ARM (#697)

shellscape commented 9 months ago

@Dylan-AWS what of x86_64?

subinataws commented 9 months ago

Node 20 is supported in x86_64 Linux images: Amazon Linux, Ubuntu version. This was added in a prior release.

peter-at-work commented 7 months ago

node 20 has been supported for a while. But can we have node 20 instead of node 18 as the default https://github.com/aws/aws-codebuild-docker-images/blob/2f7c47043e1dfb8674b6efd9640fcea3e6ac1dee/ubuntu/standard/7.0/Dockerfile#L482 so that runs that request node 20 would save about a minute not having to n 20 switch from node 18 to node 20?

Considering that node 20 is ACTIVE and node 18 is MAINTENANCE at this time https://github.com/nodejs/Release