actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.37k stars 1.16k forks source link

Update action to node20 #1284

Closed takost closed 5 months ago

takost commented 7 months ago

Description

Node 16 has reached end-of-life on 11 Sep 202. This PR updates the default runtime to node20, rather then node16.

This is supported on all Actions Runners v2.308.0 or later.

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist:

takost commented 6 months ago

@yacaovsnc Could you please merge this PR and release new versions of the action? I don't have permissions for it 😄

chenrui333 commented 6 months ago

this might be the last major action using nodejs20 runtime? (would be great to see this merged soonish, thanks!)

Bo98 commented 6 months ago

Looks like this might introduce the same problem that has affected many other Node 20 updates where it hangs for 2 minutes on completion: image

I explained the issue at https://github.com/ruby/setup-ruby/issues/543#issuecomment-1793608370 and why it doesn't happen with Node 16.

Short of a fix in https://github.com/actions/toolkit, the workaround used in restore could be applied to save: https://github.com/actions/cache/commit/f7ebb81a3f195b4fb88dab7c14e2f7aff52045aa, which has also been copy-pasted to actions/setup-node etc.

takost commented 6 months ago

@Bo98 thanks for the comment. I applied the workaround, and I am going to review PR with fix in https://github.com/actions/toolkit

MikeMcC399 commented 5 months ago

@yacaovsnc

I did a smoke test using the pre-release version actions/cache@v4.0.0 and it worked fine for me. 👍🏻

What is the plan to make this into an official release actions/cache@v4?

Currently actions/cache@v3.3.3 and actions/cache@v3 as alias tag are marked as latest.

yacaovsnc commented 5 months ago

👋🏼 @MikeMcC399, thanks for using Cache actions. I need to update some internal tests with this latest tag and run through them. If everything works, we should release this today.