-
Notifications
You must be signed in to change notification settings - Fork 680
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
D1 export api change #6203
D1 export api change #6203
Conversation
🦋 Changeset detectedLatest commit: 18b58c9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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.devprod.cloudflare.dev/workers-sdk/runs/10011021497/npm-package-wrangler-6203 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6203/npm-package-wrangler-6203 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10011021497/npm-package-wrangler-6203 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10011021497/npm-package-create-cloudflare-6203 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10011021497/npm-package-cloudflare-kv-asset-handler-6203 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10011021497/npm-package-miniflare-6203 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10011021497/npm-package-cloudflare-pages-shared-6203 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10011021497/npm-package-cloudflare-vitest-pool-workers-6203 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
As D1 is now GA, I assume that the API cannot be broken by changing the fields that are expected in requests and returned in responses, right? Otherwise previous Wrangler versions will now start failing. Can you confirm this is the case. |
Is there a link to an internal document or ticket describing this API change? |
Yeah we'll be providing backwards-compatible API request/responses for versions of Wrangler that predate this change being released (based on user-agent). Internal ticket is CFSQL-942. |
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.
In order for this to trigger a release of Wrangler (and this code) it needs a "patch" changeset.
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 like you need to update some tests.
e56b9b6
to
6e4f51f
Compare
@petebacondarwin added changeset and passing all tests |
6e4f51f
to
3ecee31
Compare
I tried re-running the CI jobs a number of times and I am seeing lots of OOM errors. |
@geelen can you please rebase your changes on top of |
3ecee31
to
1c8e8e2
Compare
5febe40
to
557b356
Compare
Been looking into this OOM test failure. Even though vitest makes it look like the "should handle local" test is failing it is actually the "should handle remote" test. And it looks like the code is infinitely calling |
// This endpoint is polled recursively. If we respond immediately, | ||
// the callstack builds up quickly leading to a hard-to-debug OOM error. | ||
// This timeout ensures that if the endpoint is accidently polled infinitely | ||
// the test will timeout before breaching available memory | ||
await setTimeout(10); | ||
|
||
const body = (await request.json()) as Record<string, unknown>; | ||
|
||
// First request, initiates a new task | ||
if (!body.currentBookmark) { | ||
if (!body.current_bookmark) { |
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.
This missed renaming from currentBookmark
to current_bookmark
was the culprit of the OOM
I have also added a timeout above to avoid this happening in the future. The OOM error was very opaque and hard to debug with many red herrings.
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.
u da best Rahul <3!!!
What this PR solves / how to test
Internal API change for D1 import/export.
Author has addressed the following