Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Deprecation Notice - Upgrade to latest before February 1st 2025 #1510

Pinned
Link- announced in Announcements
Discussion options

TLDR; The cache backend service has been rewritten from the ground up for improved performance and reliability. actions/cache now integrates with the new cache service (v2) APIs.

The new service will gradually roll out as of February 1st, 2025. The legacy service will also be sunset on the same date. Changes in these release are fully backward compatible.

We are deprecating some versions of this action. We recommend upgrading to version v4 or v3 as soon as possible before March 1st, 2025. (Upgrade instructions below).

If you are using pinned SHAs, please use the SHAs of versions v4.2.0 or v3.4.0

If you do not upgrade, all workflow runs using any of the deprecated actions/cache will fail.

Upgrading to the recommended versions will not break your workflows.

Context

The cache backend service has been rewritten from the ground up for improved performance and reliability. In latest versions actions/cache, we introduced a more consistent API contract with the cache backend service.

The new service will decrease the cache upload duration by up to ~80% when using GitHub Hosted Runners. The cache download performance will be the same. If you’re using self-hosted runners the upload duration is expected to improve, or in the worst-case stay the same. Cache upload/download performance depends on your network topology, hardware and geographical region used for hosting among other factors.

We will start rolling out the new backend service gradually as of February 1st, 2025. We will issue further guidance as we approach this deadline.

The legacy backend service will be sunset shortly after February 1st, 2025. We will not support both services at the same time. Refer to the migration guide below for further information on how to prevent disruption to your teams.

Migration guide

The new changes to the actions/cache should be seamless and fully backward compatible. You are not expected to change anything in your workflows to use the new service beyond upgrading to the latest releases.

In order to upgrade, edit your workflows to use one of these supported releases:

Supported versions and tags
actions/cache@v4
actions/cache@v3
actions/cache@v4.2.0
actions/cache@v3.4.0

If you are caching or have forked these actions, please make sure you update your caches or your forks!

The following is the list of all the deprecated versions of this action. If you are using any of these version (or have pinned to any of their SHAs), your workflows will break as of March 1st, 2025.

Deprecated versions TYPE TAG NAME PUBLISHED
v4.1.2 Latest v4.1.2 about 1 month ago
v4.1.1 v4.1.1 about 1 month ago
v4.1.0 v4.1.0 about 2 months ago
v4.0.2 v4.0.2 about 8 months ago
v4.0.1 v4.0.1 about 9 months ago
v4.0.0 v4.0.0 about 10 months ago
v3.3.3 v3.3.3 about 10 months ago
v3.3.2 v3.3.2 about 1 year ago
v1.2.1 v1.2.1 about 1 year ago
v2.1.8 v2.1.8 about 1 year ago
v3.3.1 v3.3.1 about 1 year ago
v3.3.0 v3.3.0 about 1 year ago
v3.2.6 v3.2.6 about 1 year ago
v3.2.5 v3.2.5 about 1 year ago
v3.2.4 v3.2.4 about 1 year ago
v3.2.3 v3.2.3 about 1 year ago
v3.2.2 v3.2.2 about 1 year ago
v3.2.1 Pre-release v3.2.1 about 1 year ago
v3.2.0 v3.2.0 about 1 year ago
v3.2.0-beta.1 Pre-release v3.2.0-beta.1 about 1 year ago
v3.1.0-beta.3 Pre-release v3.1.0-beta.3 about 1 year ago
v3.1.0-beta.2 Pre-release v3.1.0-beta.2 about 1 year ago
v3.1.0-beta.1 Pre-release v3.1.0-beta.1 about 2 years ago
v3.0.11 v3.0.11 about 2 years ago
v3.0.10 v3.0.10 about 2 years ago
v3.0.9 v3.0.9 about 2 years ago
v3.0.8 v3.0.8 about 2 years ago
v3.0.7 v3.0.7 about 2 years ago
v3.0.6 v3.0.6 about 2 years ago
v3.0.5 v3.0.5 about 2 years ago
v3.0.4 v3.0.4 about 2 years ago
v3.0.3 v3.0.3 about 2 years ago
v3.0.2 v3.0.2 about 2 years ago
v3.0.1 v3.0.1 about 2 years ago
v3.0.0 v3.0.0 about 2 years ago
v2.1.7 v2.1.7 about 3 years ago
v2.1.6 v2.1.6 about 3 years ago
v2.1.5 v2.1.5 about 3 years ago
v2.1.4 v2.1.4 about 3 years ago
v2.1.3 v2.1.3 about 4 years ago
v2.1.2 v2.1.2 about 4 years ago
v2.1.1 v2.1.1 about 4 years ago
v2.1.0 v2.1.0 about 4 years ago
v2.0.0 v2.0.0 about 4 years ago
v1.2.0 v1.2.0 about 4 years ago
v1.1.2 v1.1.2 about 4 years ago
v1.1.1 v1.1.1 about 4 years ago
v1.1.0 v1.1.0 about 4 years ago
v1.0.3 v1.0.3 about 5 years ago
v1.0.2 v1.0.2 about 5 years ago
v1.0.1 v1.0.1 about 5 years ago
v1.0.0 v1.0.0 about 5 years ago
Preview v0.0.2 Pre-release v0.0.2 about 5 years ago
Preview v0.0.1 Pre-release v0.0.1 about 5 years ago

Brownouts

To raise awareness of the upcoming deprecation, builds using deprecated versions that are scheduled to run during the brownout periods will fail. Planned brownouts schedule:

February 4, 5pm – 6pm UTC
February 11, 3pm – 7pm UTC
February 18, 2pm – 10pm UTC

Keeping your actions up to date with Dependabot

When you enable Dependabot version updates for GitHub Actions, Dependabot will help ensure that references to actions in a repository's workflow.yml file and reusable workflows used inside workflows are kept up to date.

Read more about that: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#about-dependabot-version-updates-for-actions

GitHub Enterprise Server

This deprecation will not impact any existing versions of GitHub Enterprise Server that are currently in use.

You must be logged in to vote

Replies: 9 comments · 62 replies

Comment options

Is this really a deprecation? It feels like a very hard breaking change since it appears that all existing branches/tags will stop working unless upgraded. Is this harsh of a change really necessary?

You must be logged in to vote
11 replies
@rasa-jmac
Comment options

Hey @Link- , completely understand the points you're making here, but I don't think the extent of this change has been communicated clearly enough given the breaking changes this is introducing. The deprecation notice on the Github blog here uses the headline that v1-v2 are deprecated, and the paragraph below says that versions prior to 4.0.0 are closing down.

To me, this suggests that as long as I am using >= v4.0.0, my workflows won't be impacted. This discussion page instead suggests that I need to be on the very latest 4.2.0 release and that all other versions from 4.0.0 to 4.1.2 are now deprecated. This is a significant breaking change for anyone with security critical workflows who are pinning by SHA instead of floating version - and the main announcements do not make the extent of the deprecation obvious.

@Link-
Comment options

Link- Jan 23, 2025
Maintainer Author

@rasa-jmac - I believe in addition to the changelog posts, these announcements & the brown-outs we're planning, we have sent out at least 2 email communications regarding this deprecation that clearly state the versions that will remain supported. We acknowledge this is a big change & we're doing the best we can to spread awareness as much as possible.

cs_2025-01-23_16-56-20

From my personal experience with deprecations, I'm afraid it's never the right time to do them no matter how much communication we send out.

@rasa-jmac
Comment options

I think I see the source of the confusion now - it was not immediately obvious to me that the versioning of the @actions/cache package is different to the actions/cache action. I'm not sure this is something that will be apparent to users who consume the action but aren't familiar with building their own actions using the package. It's easy to parse this messaging as "as long as my action is >4.0.0 everything will be fine"

@Link-
Comment options

Link- Jan 23, 2025
Maintainer Author

That's a fair point @rasa-jmac and I can understand the source of confusion. It's a distinction that is very difficult to reason about especially since the names of the package and the action are the same.

That's also why the announcement here is different than the announcement in the package repo: actions/toolkit#1890

@max-frank
Comment options

It's easy to parse this messaging as "as long as my action is >4.0.0 everything will be fine"

Can confirm this is exactly what happened when I read this error message and looked at the linked announcement. Note we also made sure to upgrade everything v4 in February already that was not v4 already.

Error: This request has been automatically failed because it uses a deprecated version of actions/cache: 6849a6489940f00c2f30c0fb92c6274307ccb58a. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down

6849a6489940f00c2f30c0fb92c6274307ccb58a is v4.1.2

From a user perspective we are just interacting with the tags (or commit shas) of the repo so reading <4.0.0 is automatically gonna be interpreted as tags <4.0.0. The text in the announcement linked in the error message is confusing from a user perspective.

Comment options

@Link- You may have seen the following blog post, or more recently the Ultralytics supply chain attack, both of which take advantage of the legacy cache service's behaviour to poison the cache of other workflows with malicious code.

Will the newly built cache backend service include any improvements to mitigate these kinds of attacks?

You must be logged in to vote
1 reply
@Link-
Comment options

Link- Jan 23, 2025
Maintainer Author

Thanks @NicholasEllul - this is on our radar & we're working through it.

Comment options

During the last brown-out, our builds failed even though we are only using v4.

Error: This request has been automatically failed because it uses a deprecated version of actions/cache: v4.0.2. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down

Note in the error notice we are using v4.0.2 and the suggestion is to use v3/v4.
Bringing this up for visibility in case there is a bug in the rollout.

You must be logged in to vote
8 replies
@srl295
Comment options

I'm afraid we cannot be more verbose in our communication

I appreciate the communication, but the blog posts and emails actually do not mention that some versions of 4.x are also deprecated, such as 4.0.2. They do mention "1" and "2" as being deprecated, and specifically "before 4.0.0".

Please consider updating the blog posts to say that you must use v3.4.0, v4.2.0, or the symbolic names v3 or v4. This would have saved a lot of back and forth from our teams.

It's hard, but yes, i think you could have (and still can) be more verbose - please take this as constructive criticism.

Is it possible to fix the deprecation message when the run fails? That would be really helpful.

@tkloht
Comment options

I'm afraid we cannot be more verbose in our communication

I respectfully disagree and would like to propose these changes to your communication:

@srl295
Comment options

@tkloht Just noting that it's Feb 11th, 2025 right now - past the 1st.

@tkloht
Comment options

right, updated 🙏

@tkloht
Comment options

although I guess february 1st is accurate since we definitely have interruptions

Comment options

Is there some indicator that a workflow is using the new Cache backend or the old one?

Based on the toolkit code there is a ACTIONS_CACHE_SERVICE_V2 environment variable that informs the cache toolkit whether it should use the old backend or the new one.

Is the new back-end only available during the brown-out windows, and workflows can ONLY use the old back-end until that hard switchover is completed later this month? I tried to force a workflow to use a new Cache backend by setting the environment variable and it failed to use the new Twirp RPC backend.

I think it would be valuable to call out the specific URLs and endpoints used by the new one for anyone who is strictly monitoring egress from their self-hosted runners.

You must be logged in to vote
13 replies
@JoannaaKL
Comment options

@theUpsider your workflows started failing because you are using the tag v4.1.0 of SonarSource/sonarqube-scan-action that in turn is using the deprecated tag v4.0.2 of actions/cache:
https://github.com/SonarSource/sonarqube-scan-action/blob/1b442ee39ac3fa7c2acdd410208dcb2bcfaae6c4/action.yml#L35
After an upgrade to the latest version of SonarSource/sonarqube-scan-action your issue should be fixed.

@theUpsider
Comment options

@JoannaaKL @Link- Thanks for looking into this. Will update Sonarqube.

@admangum
Comment options

If the problem is recurring, please open a support ticket and share the workflows affected & we will have a look at it. If it's a public repository, feel free to share a link here. Thank you for reporting this.

It's a private repo. I've created an issue here.

@michieldondorp
Comment options

The text in the blog post specifically mentions before v4.0.0, 4.0.2 is of date 19 march 2024. The check is wrong.
afbeelding

@JoannaaKL
Comment options

@michieldondorp actions/toolkit is not affected by the brownouts. Workflows that were failed above were using a deprecated version of actions/cache.

Comment options

@Link- I have been facing cache related issues for the past couple of days sporadically. Is there any chance that these brownouts are causing issue for actions/cache@v3 too?

You must be logged in to vote
1 reply
@JoannaaKL
Comment options

Hi @chaithanyaangalagunta - workflows using deprecated versions of actions/cache were blocked only during announced brownout dates. Please share a link to your workflow run or more details describing what kind of issues are you experiencing so that we can help. :)

Comment options

I missed the the brownout periods and now my builds are failing. I have some very helpful data in the cache. Is it possible to recover data from cache v1, however manually?

You must be logged in to vote
11 replies
@JoannaaKL
Comment options

@chetbox done, please try now

@chetbox
Comment options

I have retrieved the latest cache file, thank you. 🙏🏼 Will I need to be restore the cache again when switched back to cache v2?

In the meantime I'll look into a backup system for this, or store the data somewhere that's designed for more persistent storage!

@JoannaaKL
Comment options

When I'll switch the flag for you again your repo is going to use the new cache service and your secret's won't be accessible anymore. You'll need to use values you saved now and upload them again. If you retrieved the cache I am switching you to the new backend. :)

@chetbox
Comment options

Once I could see my cache list was empty I uploaded a new cache entry using a temporary branch upload-cache:

      - run: echo "RANDOM_SUFFIX=${RANDOM}${RANDOM}" >> $GITHUB_ENV
      - uses: actions/cache/save@v4
        with:
          path: .signal-cli-data
          key: signal-cli-data-${{ env.RANDOM_SUFFIX }}

Then deleted the branch:

$ gh push origin :upload-cache

Now I can see the singular new cache entry:

$ gh cache list

ID        KEY                        ...
20599463  signal-cli-data-256722088  ...

But, when running a workflow which is designed to fetch the latest cache with a matching prefix,

    - run: echo "RANDOM_SUFFIX=${RANDOM}${RANDOM}" >> $GITHUB_ENV
    - uses: actions/cache@v4
      with:
        path: .signal-cli-data
        key: signal-cli-data-${{ env.RANDOM_SUFFIX }}
        restore-keys: |
          signal-cli-data-

it cannot find any cache items with this prefix:

Cache not found for input keys: signal-cli-data-829215335, signal-cli-data-

What have I done wrong?

This setup worked fine with cache v1. According to the the docs I believe this should still work.

@chetbox
Comment options

I worked it out! The cache I uploaded from my temporary branch is only scoped to that branch.

The cache is scoped to the key, version, and branch. The default branch cache is available to other branches.

-- https://github.com/actions/cache#cache-scopes

Instead I created a commit on my default branch, main, that uploads a new cache entry. This is available to restore from all branches and now my caches are restored successfully.

For anyone who wants to understand this further, see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache for more info on cache scope restrictions.

Comment options

We used version pinning, @4.0.2 — as a work around of an issue introduced somewhere in v4.0.2..v4.1.2.

Issue: #1491 Cache entry from default branch considered out of scope for tag-triggered workflow.

This deprecation causes complete failure of our CI. We can't upgrade to "the latest" — until viable workaround is provided (besides downgrading the action).

Is there a way to "un-deprecate" v4.0.2 ? Perhaps only 4.0 ? @Link- 🙏

You must be logged in to vote
13 replies
@AdnaneKhan
Comment options

@ulidtko don't mean to hijack this thread, but I am curious about the setup of the reusable workflow.

  • Is it a reusable workflow in the same repository referenced using local path
  • Is it a reusable workflow in another repository?
  • Is it a reusable workflow in the same repository but referenced via @ syntax?

The cache key and version are calculated by the cache package client side (meaning within the actions/toolkit code, and there have not been any changes to that), but the scope is determined by the reference in the Actions Runtime Token JWT issued by GitHub.

My gut feeling here is that there is a corner case in how the V2 Cache backend API is validating the JWT to determine scope. This might cause the backend to think that the workflow running on the tag isn't a child of the default main branch.

If you could create a minimal reproduction of this scenario using a public repository I'm happy to look into this as well.

@ulidtko
Comment options

Thanks @AdnaneKhan 🙏 I understand that the toolkit hadn't seen change; but what you're saying, does make sense. As far as I can reason without deep-dive into the backend, of course.

I reproduce this even in non-reusable workflow. The requirements seem to be:

  1. Caches created on non-default branch. (In my case, major-version-line branches like release/4.x, release/5.x, etc)
  2. Tag-triggered workflow. Even when tag == branch tip, caches created on that branch fail to restore.

... Here, I've minimized a repro. https://github.com/zoomin-software/github-actions-cache-repro/actions/workflows/test.yaml

Notice 2 facts: first, caches exist:
image

— and second, actions/cache@v4.2.3 claims Cache not found for input keys, anyway:

image

LMK if I should try to explain more, and/or create a different issue clarifying the repro.

@Link-
Comment options

Link- Mar 26, 2025
Maintainer Author

@ulidtko -

  1. I advise you to read more about the cache restrictions: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache TLDR; you cannot restore caches across tags no matter what they point to if they're scoped to a tag. In that cache UI you should see the scope associated with your cache entry.

  2. The only cache entry that can be restored in the run you referenced in the screenshot is the one you uploaded in ACME Release, version v0 because it's scoped to your default branch. BUT, that one has a key CI-cache1.r0.#4.attempt#1 and as such it will not be picked up by the prefix matching on CI-cache1.r1 nor will the other entries because they are tied to other scopes that are not shareable between runs.

@ulidtko
Comment options

@Link- I've carefully re-read this docs yet again, but still failing to understand:

  • if a cache was created by a push/merge event on non-default branch release/7.9 — i.e. has got the scope release/7.9,
  • immediately, the tip of this very branch gets tagged, with say v7.9.5,
  • and this tag get pushed to github — triggering a run of version release workflow,
  • do I understand correctly that this workflow run has scope refs/tags/v7.9.5 ? and there's no way to reuse cache from the prior branch-push build, the one with scope release/7.9 ?

I hope I'm wrong; because this design is so weird: most tag-triggered workflows run exactly once, on version release, and never again. It's useless to allocate dedicated caching scopes per every tag. Isn't it?

Am I missing a way to "customize" what a workflow's caching scope is?

What's the point of this "logical separation", could you explain the logic? 2 workflows building exact same commit with exact same code, cannot share cache?

Here, quoting the docs you linked:

Multiple workflow runs in a repository can share caches. A cache created for a branch in a workflow run can be accessed and restored from another workflow run for the same repository and branch.

— this seems to say that my workflow should be working.

And before recent updates, it did!

@AdnaneKhan
Comment options

Can you try an experiment like this:

  • Mirror the actions/cache repository (using repo import feature)
  • Use the SHA of the 4.0.2 action but point to your mirror, not actions/cache.
  • Try to replicate your tagging behavior.

This will hit the old v1 backend (and hopefully not auto fail) because that is still live until sometime in April.

If it “works” the that means the old functionality working was a result of the V1 cache backend not respecting the cache boundaries fully in the case of tags.

Comment options

I noticed that the cache deprecation announcement called out third-party actions that use caching under the hood - but didn't explicitly mention first-party cache-aware actions.

image

What does this mean for official actions like actions/setup-node v2, v3, etc. that support caching, but there isn't a deprecation announcement for those versions?

What will the failure mode look like in this case - just an error that the cache save/restore didn't work? Or is there a plan to cut a version bump to the v2, v3 of actions/setup-node with a newer actions/cache version so that caching does not suddenly break after April across every workflow using the older actions/setup-node floating tags.

You must be logged in to vote
3 replies
@Link-
Comment options

Link- Apr 4, 2025
Maintainer Author

The change is going to be backported to the major versions of these actions:

actions/setup-dotnet	v3
actions/setup-go	v4
actions/setup-go	v3
actions/setup-go	v5
actions/setup-java	v3
actions/setup-java	v4
actions/setup-node	v3
actions/setup-node	v4
actions/setup-python	v4
actions/setup-python	v5

What that means is that a new minor release is going to be cut so that these actions are capable of integrating with the new backend and then the major version tags will point to these new minor releases.

For example:

actions/setup-node v3 currently points to actions/setup-node v3.8.2. A new v3.9.0 release will be cut and v3 will point to that.

Same applies for the entire list above.

@AdnaneKhan
Comment options

The change is going to be backported to the major versions of these actions:

actions/setup-dotnet	v3
actions/setup-go	v4
actions/setup-go	v3
actions/setup-go	v5
actions/setup-java	v3
actions/setup-java	v4
actions/setup-node	v3
actions/setup-node	v4
actions/setup-python	v4
actions/setup-python	v5

What that means is that a new minor release is going to be cut so that these actions are capable of integrating with the new backend and then the major version tags will point to these new minor releases.

For example:

actions/setup-node v3 currently points to actions/setup-node v3.8.2. A new v3.9.0 release will be cut and v3 will point to that.

Same applies for the entire list above.

Thank you - is this planned for v2 of setup-node as well or will that be deprecated now?

@Link-
Comment options

Link- Apr 4, 2025
Maintainer Author

We didn't see heavy usage from v2. Is there a particular reason why you're using it?

Comment options

And even actions that are using actions/cache@v4 stopped working with cache server 422 response code... until I realized that I need to upgrade my runners because I'm working with self-hosted runners! I was running 2.319.1 and upgraded to latest 2.323.0
You should mention that in your deprecation notice

You must be logged in to vote
1 reply
@Link-
Comment options

Link- Apr 16, 2025
Maintainer Author

Thanks @optyfr - but you shouldn't be running on 2.319.1. If you want to manage your own runners, please make sure you keep them up to date: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners#controlling-runner-software-updates-on-self-hosted-runners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Morty Proxy This is a proxified and sanitized view of the page, visit original site.