这是indexloc提供的服务,不要输入任何密码
Skip to content

Create noopCache to ensure that users always have a valid cache object. #1317

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

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

nathanhammond
Copy link
Contributor

@nathanhammond nathanhammond commented Jun 1, 2022

This makes it possible for a repository whose CI configuration is --remote-only to work when receiving pull-requests from forked repositories that do not have access to secrets configuration in CI.

Example failures:

One example workaround:
vercel/vercel#7873

However, since this does not prevent the build from running to completion, I do not believe that it should be a hard error. While in the process of addressing this I also discovered that, since the httpCache can remove itself, there is an alternative path to triggering a panic if the httpCache is the only cache you have enabled and it removes itself.

Using a noopCache as a cache of last resort (similar to the upstream solution) resolves both of these issues.

Related to: #1169

@vercel
Copy link

vercel bot commented Jun 1, 2022

@nathanhammond is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@nathanhammond
Copy link
Contributor Author

Amusingly, since this PR is from a first-party fork, CI won't pass without the changes in this PR working.

@vercel
Copy link

vercel bot commented Jun 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
turbo-site ⬜️ Ignored (Inspect) Jun 1, 2022 at 9:46AM (UTC)

@kodiakhq kodiakhq bot merged commit 2d73616 into vercel:main Jun 1, 2022
@nathanhammond nathanhammond deleted the noop-cache branch June 1, 2022 23:24
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.

2 participants