-
Notifications
You must be signed in to change notification settings - Fork 210
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
In-Memory Durable Objects #391
Conversation
Deploying with
|
Latest commit: |
4df6f54
|
Status: | ✅ Deploy successful! |
Preview URL: | https://d98ab532.cf-miniflare.pages.dev |
Branch Preview URL: | https://tre-durable-objects.cf-miniflare.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple changes, but otherwise looks good
(now.getMonth() + 1).toString().padStart(2, "0"), | ||
now.getDate().toString().padStart(2, "0"), | ||
].join("-"); | ||
const FALLBACK_COMPATIBILITY_DATE = "2000-01-01"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we shifting from today to a compat date of 2000? Surely keeping it up to date would be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The runtime has a maximum compatibility date it supports, which may lag behind the current date by a few days. If we specify a date after this, it will throw an error. I think the default compatibility date (at least for Miniflare) should be fixed in the past too, and shouldn't depend on the current time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that makes sense. Do we not want something slightly more recent than 2000 though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least after the last behaviour change, which looks like it was 2022-08-04
https://developers.cloudflare.com/workers/platform/compatibility-dates/
This PR adds support for non-durable Durable Objects. The open-source runtime does not yet support persisted objects. Data is lost when calling
setOptions()
or restarting. Closes #366.