-
Notifications
You must be signed in to change notification settings - Fork 65
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
EdgeDB Cloud on Deno silently requires --allow-env
#1038
Comments
I think I'm leaning toward 1: our client connections really do want to try to read from the environment, so even if you don't plan on using environment variables to configure the client (which is against our best practices), maybe we should still attempt looking there. At the very least we should update the Deno readme to suggest |
Describe the bug
When connecting to EdgeDB cloud, the required
EDGEDB_*
environment variables need to be read to retrieve the required instance and secret key. The Deno adapter silently avoids reading these variables when--allow-env
is not present, causing the EdgeDB client to fall back to a local connection in most cases.This may appear as if the client is not successfully connecting to the EdgeDB cloud.
Reproduction
Note that
--allow-env
works as you'd expect:The problem appears to be that the client silently returns
undefined
here -- the same result as if the env var doesn't exist.Expected behavior
As this can cause end-user confusion, it's best if the client behaves in one of three ways:
console.warn
with the variables that were skipped and encourage the user to specify the connection string explicitly and/or configure the--allow-env
permission.Versions (please complete the following information):
Deno: approx >1.33 (versions with stable ALPN support)
edgedb-js: current (< 1.5.7)
The text was updated successfully, but these errors were encountered: