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

Update cache action runner #252

Merged
merged 1 commit into from
Feb 23, 2024
Merged

Update cache action runner #252

merged 1 commit into from
Feb 23, 2024

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Jan 26, 2024

Description

The actions/cache package has released version 4.0 which updates the action runner to use Node 20.

Applying this fix gets rid of the following warning which is currently showing in the "Annotations" of workflows using the ramsey/composer-install action:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Note: most action runners have published these types of update in a new major, so that seems to be the best practice. Not sure if this update warrants a new major for ramsey/composer-install ?

Update: From what I've read, I believe this should be released in a new major as otherwise people using this action in self-hosted runners will run into trouble with this change.

Refs:

Motivation and context

People don't like to see warnings in their workflows ;-)

How has this been tested?

Pre-existing automated tests cover this change and the tests pass.

If you look in your own workflows, you can see that without this change, the following annotations (and a dozen more) display:

Run unclean (ubuntu-latest, v2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Run action (ubuntu-latest, highest, v2, tests/fixtures/out-of-sync-lock)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

With this change, the annotations change to:

Run unclean (ubuntu-latest, v2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Run action (ubuntu-latest, highest, v2, tests/fixtures/out-of-sync-lock)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

For this last warning regarding actions/checkout@v3, PR #248 is already open, so this is not addressed here.

Types of changes

Not sure what to put here, could be seen as just plain maintenance, could also be seen as a breaking change ?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.

Fixes #253
Closes #254

The `actions/cache` package has released version 4.0 which updates the action runner to use Node 20.

Applying this fix gets rid of the following warning which is currently showing in the "Annotations" of workflows using the `ramsey/composer-install` action:
```
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
```

Note: most action runners have published these types of update in a new major, so that seems to be the best practice. Not sure if this update warrants a new major for `ramsey/composer-install` ?

Refs:
* https://github.com/actions/cache/releases/tag/v4.0.0
* https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
@jrfnl jrfnl requested a review from ramsey as a code owner January 26, 2024 15:31
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c49029a) 84.23% compared to head (9fc1be9) 84.23%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##               v2     #252   +/-   ##
=======================================
  Coverage   84.23%   84.23%           
=======================================
  Files           7        7           
  Lines         203      203           
=======================================
  Hits          171      171           
  Misses         32       32           

@Levdbas
Copy link

Levdbas commented Jan 28, 2024

@ramsey , would you like to take a look at this? We are getting a lot of deprecation notices at @timber that would be solved with this update.

@jrfnl
Copy link
Contributor Author

jrfnl commented Feb 23, 2024

@ramsey Any chance of movement on this PR ? 🙏🏻

@ramsey ramsey merged commit 0b4a7fe into ramsey:v2 Feb 23, 2024
59 checks passed
@jrfnl jrfnl deleted the feature/update-cache branch February 23, 2024 22:08
@ruudk
Copy link

ruudk commented Feb 24, 2024

@ramsey Thanks for the merge, could you please tag it as well? We like to pin it to a specific version.

@jrfnl
Copy link
Contributor Author

jrfnl commented Feb 28, 2024

@ramsey Just saw the new tag - but shouldn't this have been a major release as per my comment above ?

Note: most action runners have published these types of update in a new major, so that seems to be the best practice. Not sure if this update warrants a new major for ramsey/composer-install ?

Update: From what I've read, I believe this should be released in a new major as otherwise people using this action in self-hosted runners will run into trouble with this change.

@ramsey
Copy link
Owner

ramsey commented Feb 28, 2024

Since the action is stand-alone, I didn't think it would cause BC issues. How will this affect users with self-hosted runners in a backwards incompatible way?

@jrfnl
Copy link
Contributor Author

jrfnl commented Feb 28, 2024

@ramsey self-hosted runners have their own self-hosted Node version(s) and the cache action now requiring Node 20 instead of Node 16 can break their build processes. Does that make it clearer ?

@ramsey
Copy link
Owner

ramsey commented Feb 28, 2024

Doh! Yes. That is clear. 🤦‍♂️

I'll take care of this later today. Sorry.

@jrfnl
Copy link
Contributor Author

jrfnl commented Feb 28, 2024

@ramsey No worries, I'm not on self-hosted myself ;-) Just thought I'd try and prevent you having to deal with lots of support issues.

You may want to pull the 2.3.0 release (or release a 2.3.1 without this particular change) to prevent people on self-hosted running into trouble .

@ramsey
Copy link
Owner

ramsey commented Feb 28, 2024

I'll release a 2.3.1 that removes that change and tag a 3.0.0 release with the change.

@jrfnl
Copy link
Contributor Author

jrfnl commented Feb 28, 2024

@ramsey Only just realized it's your birthday today... bit embarrassed I didn't start my earlier message with congratulations 🙈 Hope you had a great day and wishing you a lovely new year!

@ramsey
Copy link
Owner

ramsey commented Feb 29, 2024

Thanks! 😊

@Levdbas
Copy link

Levdbas commented Feb 29, 2024

Hope you had a good day sir and thank you for your work! 🎉

ramsey pushed a commit that referenced this pull request Feb 29, 2024
The `actions/cache` package has released version 4.0 which updates the action runner to use Node 20.

Applying this fix gets rid of the following warning which is currently showing in the "Annotations" of workflows using the `ramsey/composer-install` action:
```
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
```

Note: most action runners have published these types of update in a new major, so that seems to be the best practice. Not sure if this update warrants a new major for `ramsey/composer-install` ?

Refs:
* https://github.com/actions/cache/releases/tag/v4.0.0
* https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
ramsey added a commit that referenced this pull request Feb 29, 2024
This reverts commit 0b4a7fe.

This avoids any potential backwards-compatibility issues that might
arise when using self-hosted runners that use Node.js 16 instead of
version 20.

For more details, see the discussion here:
#252
@ramsey
Copy link
Owner

ramsey commented Feb 29, 2024

Due to BC issues, I have reverted the actions/cache upgrade in version 2.3.1 and have released 3.0.0, which includes the actions/cache upgrade. Please update your pinned versions to 3.0.0. See discussion on above, for more info.

codemasher added a commit to chillerlan/php-qrcode that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to actions/cache@v4
4 participants