-
Notifications
You must be signed in to change notification settings - Fork 734
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
feat: implement service environments + durable objects #868
Conversation
🦋 Changeset detectedLatest commit: ac9eed5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2259310388/npm-package-wrangler-868 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/868/npm-package-wrangler-868 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/2259310388/npm-package-wrangler-868 dev path/to/script.js |
d1e3f43
to
a65e778
Compare
const foundIndex = config.migrations.findIndex( | ||
(migration) => migration.tag === script.migration_tag | ||
(migration) => migration.tag === scriptMigrationTag |
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.
I had to do this because typescript was being weird and saying script could be undefined here (but not saying so for any further occurrence of script.migration_tag
🤷♂️)
a65e778
to
527b067
Compare
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.
Looks pretty good to me, just had the one question about how this works when somebody publishes a durable object, switches to service environments, and then publishes a durable object migration.
packages/wrangler/src/publish.ts
Outdated
} | ||
} catch (err) { | ||
if ( | ||
[10090, 10092].includes((err as { code: number }).code) === false |
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.
i feel like this should just be ![10090, 10092].includes((err as { code: number }).code)
, right?
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.
Can we also add comments for what these error numbers mean
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.
heh I'd originally had it in that form, happy to revert to it. I'll add comments for the codes.
527b067
to
6589b09
Compare
Now that the APIs for getting migrations tags of services works as expected, this lands support for publishing durable objects to service environments, including migrations. It also removes the error we used to throw when attempting to use service envs + durable objects. Fixes #739
6589b09
to
ac9eed5
Compare
Now that the APIs for getting migrations tags of services works as expected, this lands support for publishing durable objects to service environments, including migrations. It also removes the error we used to throw when attempting to use service envs + durable objects.
Fixes #739