-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix Connected to undefined message #284
Conversation
copying my jira comment here: the previous impl was just printing the url it was connecting to. I updated the current impl to do that, but do we think printing that url has any value? for customers it will always be https://db.fauna.com or localhost feels like we could just strip it out entirely. One thing that does seem valuable is printing the database that is being connected to. Should we update it to do that? |
I like the idea of printing the current endpoint and database that its connected to. URL seems nice to have too, if we can fit all 3 of those in that one-liner. |
`Could not Connect to ${stringifyEndpoint( | ||
connectionOptions | ||
)} Unauthorized Secret` | ||
`Could not Connect to ${connectionOptions.url} Unauthorized Secret` |
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.
`Could not Connect to ${connectionOptions.url} Unauthorized Secret` | |
`Could not connect to ${connectionOptions.url}: unauthorized secret` |
also it might be nice to print the secret there? not sure if we want to expose that though
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.
hmm yeah I'm not sure that we want to do that, my bias would be to just leave it out
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.
sounds good to me
ENG-5630 This will display the endpoint and database being connected to when ever a CLI command is executed.
i updated this pr to print the current endpoint and database for every command. Also seems useful when doing schema commands and such |
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 good to me, except for name being optional. IMO it should always be set.
return new Endpoint({ | ||
name: name, |
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.
style:
name: name, | |
name, |
For eval, we currently output json. Entering a log line can make the output invalid json and could possibly break tooling people have around it. This allows commands to opt out of the connection info logging.
if you provide a secret as a flag we create an endpoint without a name. |
oh yup nevermind |
ENG-5630
This will display the endpoint and database being connected to when ever a CLI command is executed.