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

Time sensitive: upgrade @actions/cache to ^4.0.0 #688

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

Link-
Copy link
Contributor

@Link- Link- commented Jan 16, 2025

The cache backend service has been rewritten from the ground up for improved performance and reliability. The @actions/cache package 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 this release are fully backward compatible.

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

Upgrading to the recommended version should not break or require any changes to your workflows beyond the changes in this PR.

Please cut a new release after merging this PR.

More details: actions/toolkit#1890

Tip

I'd highly recommend adding the configuration below to your dependabot.yml to receive further upgrades we will be making to the cache package

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index b18fd29..025b9c1 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -4,3 +4,11 @@ updates:
     directory: '/'
     schedule:
       interval: 'weekly'
+
+  # Enable version updates for npm
+  - package-ecosystem: 'npm'
+    # Look for `package.json` and `lock` files in the `root` directory
+    directory: '/'
+    # Check the npm registry for updates every day (weekdays)
+    schedule:
+      interval: 'weekly'
\ No newline at end of file

The tests I ran are positive & everything is working as expected with the new service.

cs_2025-01-16_14-14-30

@Link- Link- changed the title Upgrade @actions/cache to ^4.0.0 Time sensitive: Upgrade @actions/cache to ^4.0.0 Jan 16, 2025
@Link- Link- changed the title Time sensitive: Upgrade @actions/cache to ^4.0.0 Time sensitive: upgrade @actions/cache to ^4.0.0 Jan 16, 2025
Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

@Link- Link- requested a review from eregon January 16, 2025 15:24
@eregon eregon force-pushed the upgrade-cache-4.0.0 branch from d7592aa to 61b62e6 Compare January 16, 2025 19:13
@MSP-Greg
Copy link
Collaborator

MSP-Greg commented Jan 16, 2025

@eregon

The source repro for many of the packages in yarn.lock changed from registry.yarnpkg.com to registry.npmjs.org.

Is that desired? Regardless, maybe a yarn upgrade is needed?

@eregon
Copy link
Member

eregon commented Jan 16, 2025

Mmh, I just ran the pre-commit so yarn install locally, odd, with yarn 1.22.21.
I guess it's fine. https://stackoverflow.com/questions/69526949/yarn-lock-file-resource-source-changed-from-registry-yarnpkg-com-to-registry-npm
I'd rather avoid touching any other package in this PR to make it easier to assess if anything would break.

@actions/cache@^4.0.0 has many dependencies including things like prettier, but not something we can change here.

@eregon eregon force-pushed the upgrade-cache-4.0.0 branch from ad29d05 to c12fda3 Compare January 16, 2025 21:20
@eregon
Copy link
Member

eregon commented Jan 16, 2025

@MSP-Greg Thanks for noticing, I fixed that now by restoring the yarn.lock from master and rerunning yarn install.

@eregon eregon merged commit 7a63021 into ruby:master Jan 17, 2025
168 checks passed
@eregon
Copy link
Member

eregon commented Jan 17, 2025

@Link- Regarding

I'd highly recommend adding the configuration below to your dependabot.yml to receive further upgrades we will be making to the cache package

Is there a way to only create PRs for updates of the actions/cache package?
Because given the huge amount of transitive dependencies I wouldn't want a PR every week to update some package I don't really care about (unproductive busy work).
Just dealing with security issues used to be a pain when we depended on axios, it was terrible, so I got rid of that dependency.
In my experience so far with JS stuff, auto updates break more things than they solve, so they don't seem worth it.
If there is a known bug fix wanted we can always update something specific.

@Link-
Copy link
Contributor Author

Link- commented Jan 17, 2025

@Link- Regarding

I'd highly recommend adding the configuration below to your dependabot.yml to receive further upgrades we will be making to the cache package

Is there a way to only create PRs for updates of the actions/cache package? Because given the huge amount of transitive dependencies I wouldn't want a PR every week to update some package I don't really care about (unproductive busy work). Just dealing with security issues used to be a pain when we depended on axios, it was terrible, so I got rid of that dependency. In my experience so far with JS stuff, auto updates break more things than they solve, so they don't seem worth it. If there is a known bug fix wanted we can always update something specific.

No problem at all, it's really up to you how you'd like to manage this. It is possible to use: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/controlling-dependencies-updated#allowing-specific-dependencies-to-be-updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants