eventespresso / actions

Centralized repository for all of Event Espresso's GitHub Actions used in our CI/CD pipelines
GNU Affero General Public License v3.0
2 stars 6 forks source link

Package "@actions/artifact" v1 will be deprecated in June 30, 2024 #63

Closed alexkuc closed 3 months ago

alexkuc commented 5 months ago

Starting November 30, 2024, GitHub Actions customers will no longer be able to use v3 of actions/upload-artifact or actions/download-artifact.

The deprecation of v3 will be similar to the previously announced v1 and v2 deprecation plans, which is scheduled to take place on June 30, 2024.

https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

alexkuc commented 5 months ago

@tn3rb I guess I'll need to prioritise this during this month as this repo relies on v1:

https://github.com/eventespresso/actions/blob/eddaec9591d569e4b72f2910dee9b373eb31dc01/package.json#L19

alexkuc commented 4 months ago

It seems only package e2e-tests will be affected

alexkuc commented 4 months ago

Npm packages @actions/upload-artifact and @actions/upload-artifact are not in use

alexkuc commented 4 months ago

In case you come across the following confusion, here's the explanation.

This repo uses package @actions/artifact which includes @actions/upload-artifact and @actions/download-artifact. If you read the description of v2 What's New it clearly indicates that @actions/upload-artifact and @actions/download-artifact are part of @actions/artifact. Digging a bit into the source code of @actions/artifact, we can find the following link. In terms of how one package pulls the other, I believe they don't. Instead they rely on local symlink.

alexkuc commented 4 months ago

According to the breaking changes of @actions/artifact@v2, there is nothing to be done as

alexkuc commented 4 months ago

Running

yarn upgrade @actions/artifact@latest

resulted in the following error

error @octokit/request-error@5.1.0: The engine "node" is incompatible with this module. Expected version ">= 18". Got "16.20.2"
alexkuc commented 4 months ago

Check compatibility with Node v20

These packages explicitly require Node v16. Inside each package run yarn all as a smoke test (prior to this ran yarn inside root to update dependencies):

alexkuc commented 4 months ago

After upgrading package @action/artifact to latest (v2), package @eventespresso/e2e-tests gave an error, needs code updating

alexkuc commented 4 months ago

Now command yarn all passes for all packages. Need to check if the artifact is actually getting saved now.

alexkuc commented 4 months ago

https://github.com/eventespresso/actions/issues/63#issuecomment-2146096640 is not indicative of anything. Had to re-install node_modules after which I was able to re-create the GitHub Runner error locally.

alexkuc commented 4 months ago

Re-running tests locally

alexkuc commented 4 months ago

~Serious bug detected with yarn~

Edit: workaround employed, see comment below

alexkuc commented 4 months ago

Need to make a plan A-B-C of my options to resolve this issue. Don't want to waste time by brute forcing the issue.

alexkuc commented 3 months ago

Going to go over the hyperlink above and tried the suggested fixes and/or workarounds

alexkuc commented 3 months ago

Oh! Seems like the fix/workaround with resolutions have worked!

alexkuc commented 3 months ago

Need to deliberately fail E2E test to check that artifact generation is okay and that artifact is not mangled i.e. viewable via tracer viewer

Edit: all good - https://github.com/eventespresso/test-workflow/actions/runs/9465950949

Edit2: the link above does not contain deprecation warning for artifact actions unlike e.g. here