For Workers & Pages, what is the name of the domain?
N/A
What is the error message?
Not currently importing anything
What is the issue or error you’re encountering
Importing data via wrangler d1 execute <db> --remote
sometimes throws “Not currently importing anything”
What are the steps to reproduce the issue?
- Generate a file containing valid SQL queries (inserts, updates, and deletes)
- Run
wrangler d1 execute <db> --remote --file=path/to/queries.sql
(the more queries the more likely the error is to occur. I’m running between 50k and 200k queries per import) - Observe wrangler uploading the file and executing the queries
Sometimes, for no apparent reason, wrangler exits with “ERROR: Not currently importing anything”. Inspecting the database shows that seemingly all queries have been executed successfully (wrangler reports so too). Re-running the same command with the same file executes them without any errors and running the file against a local copy of the DB works fine too. However, I run those imports via wrangler automatically and rely on wrangler’s exit code to determine whether the import was successful or not. So this error has been causing me a good amount of unnecessary re-imports.
I saw that the error is caught (and ignored) in this API example:
Unfortunately the error isn’t documented anywhere. Is this indeed safe to ignore? There doesn’t happen to be an option in wrangler to only ignore specific, uncritical errors, is there?
Thanks in advance!