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

Stopped working on Cloudflare Worker #63

Closed
sumiren opened this issue May 12, 2024 · 5 comments
Closed

Stopped working on Cloudflare Worker #63

sumiren opened this issue May 12, 2024 · 5 comments

Comments

@sumiren
Copy link

sumiren commented May 12, 2024

I've been encountering an error on Cloudflare Workers that started appearing around May 11.
Since this issue is occurring across multiple products, I suspect that it's related to an incompatibility between some update on the Cloudflare Workers side and this library.

"logs": [
  {
    "message": [
      "TypeError: Unsupported cache mode: no-store"
    ],
    "level": "error",
    "timestamp": 1715489591388
  }
],

I tried replacing fetchCacheOption empty object in node_modules and deploying to Cloudflare Workers, and confirmed the error disappears.

let fetchCacheOption: Record<string, any> = { cache: 'no-store' }

I'm not sure if this issue should be addressed on the TiDB side, but I wanted to share the problem with you first. Thanks.

@bohnen
Copy link

bohnen commented May 12, 2024

I found that the logic for judging whether it can use the cache option does not work for the current Cloudflare worker.

new Request('x:', fetchCacheOption)

Creating a new Request object doesn't throw an exception. It seems that only when calling fetch with this Request object throws an exception.

@zhangyangyu
Copy link
Collaborator

@sumiren thanks for reporting. The linked issue shows Cloudflare Worker has rolled out something new and break our driver. They are rolling back and we're also going to catch up what's new there.

@jasnell
Copy link

jasnell commented May 12, 2024

Our plan in workers is to implement Request.cache 'no-store' and 'no-cache' and this was a first step. We'll be rolling back this change and putting it behind a compatibility flag/date.

@sumiren
Copy link
Author

sumiren commented May 13, 2024

@jasnell
Thanks! I saw your actions on the issue on cloudflare/workerd and confirmed that my problem has been solved.

@zhangyangyu @bohnen
Thanks to you and the Cloudflare team, my issue has been resolved now. Could I leave the decision on what to do with this issue up to you?
Thank you for your assistance!

@zhangyangyu
Copy link
Collaborator

@sumiren I am going to close this issue and leave the driver unchanged now. Once Cloudflare Worker has published the new cache flag, we'll catch up. Thanks for your report!

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

No branches or pull requests

4 participants