-
Notifications
You must be signed in to change notification settings - Fork 757
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
Clarify that wrangler d1 execute defaults to remote DB #4202
Clarify that wrangler d1 execute defaults to remote DB #4202
Conversation
|
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/6563306152/npm-package-wrangler-4202 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6563306152/npm-package-wrangler-4202 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6563306152/npm-package-wrangler-4202 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6563306152/npm-package-cloudflare-pages-shared-4202 Note that these links will no longer work once the GitHub Actions artifact expires.
| Please ensure constraints are pinned, and |
@@ -313,7 +313,7 @@ async function executeRemotely({ | |||
); | |||
} | |||
const dbUuid = preview ? db.previewDatabaseUuid : db.uuid; | |||
logger.log(`🌀 Executing on ${name} (${dbUuid}):`); | |||
logger.log(`🌀 Executing on remote database ${name} (${dbUuid}):`); |
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.
Maybe (for both):
To execute on your local development database, pass the --local flag to 'wrangler d1 execute'
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.
@elithrar I added this extra line to the remote call. I thought it was a little verbose, but it should be useful for the option which is the default.
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.
Works for me!
Codecov Report
@@ Coverage Diff @@
## main #4202 +/- ##
==========================================
+ Coverage 75.37% 75.41% +0.03%
==========================================
Files 223 223
Lines 12217 12218 +1
Branches 3159 3159
==========================================
+ Hits 9209 9214 +5
+ Misses 3008 3004 -4
|
3672308
to
8cd2465
Compare
8cd2465
to
0a9ceb0
Compare
0a9ceb0
to
a258057
Compare
What this PR solves / how to test:
Changes log messages to clarify that
wrangler d1 execute
defaults to a remote DB rather than to local likewrangler dev
. The plan is to change this behavior to be consistent at GA, but not sooner because it is a breaking change.Reviewer is to perform the following, as applicable:
Note for PR author:
We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label
highlight pr review
so future reviewers can take inspiration and learn from it.