-
Notifications
You must be signed in to change notification settings - Fork 778
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
🐛 BUG: Wrangler chooses today's date as compatibility date instead of latest available, if none is specified by user #3639
Comments
I'm not sure I'd personally consider this one a bug, but would instead consider the warning as just bad DX. Wisdom and advice for years has been to use today's date as your compat date when starting a new project, going back to the original inception of Workers and still on the docs today. The introduction of "supported" dates and this warning is the weird part to me. I opened an issue at cloudflare/miniflare#666 discussing this more. |
This was resolved in #3343, which was released into wrangler@3.1.2 and create-cloudflare@2.0.11, for new projects created by I just confirmed that this is the case:
Note these lines:
@mxschumacher can you output the logs from your use of |
Hello @petebacondarwin , please note that my bug report is about what happens after I run
Meaning any project, not necessarily generated by C3 or similar, that does not have the compatibility_date defined in the wrangler .toml I am using wrangler 3.3.0, you can see it at the very top of the stack trace I posted. |
Oh! Sorry I missed this line in the output:
and that you had removed the compatibility date from the wrangler.toml since I read these lines:
And assumed that you were using the output of Updated the title of the issue to be more explicit about this. |
I think that the correct resolution is what I suggest in cloudflare/miniflare#666. I.e. we only warn if the local version of workerd is not latest and the date is too recent. Then for the vast majority projects this will not show a warning, and when it does it is a useful warning. |
The fix for this should be available in Wrangler 3.15.0 (#4209). Could you retest and let us know if the issue is resolved? |
This was fixed in #4209 |
Which Cloudflare product(s) does this pertain to?
Wrangler core
What version(s) of the tool(s) are you using?
3.3.0
What version of Node are you using?
18.16.1
What operating system are you using?
Linux (Fedora 38)
Describe the Bug
TLDR: If the compability_date is not specified in wrangler.toml or passed as a command line argument, the "fallback date" should be the latest available compatibility_date and not the latest date (e.g. today). As it currently stands, the CLI basically disagrees with itself (please see full output below).
My wrangler.toml file does not contain an entry for compatibility_date
At the time of writing, the date is "2023-07-19"
As of today:
In a newly started project (created with
npx wrangler init .
), I ran the following command:Please see the full output here:
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: