Skip to content
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

Make all fields of the credentials file optional #51

Merged
merged 1 commit into from
Mar 21, 2025
Merged

Conversation

mmastrac
Copy link
Contributor

@mmastrac mmastrac commented Mar 21, 2025

Specifying a credentials file, even if empty, should be sufficient to ensure a successful connection.

In the case where host or port are missing, the credentials file will contribute the default localhost:5656.

It is no longer an error to specify a credentials file with a missing user.

@mmastrac mmastrac requested a review from scotttrinh March 21, 2025 20:24
"tlsCAData": null,
"tlsSecurity": "strict",
"tlsServerName": null,
"user": "edgedb",
Copy link

@scotttrinh scotttrinh Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be admin? (or do we do some kind of edgedb -> admin conversion based on server version or something?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the database should not be edgedb no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be admin? (or do we do some kind of edgedb -> admin conversion based on server version or something?)

We currently do the automatic edgedb->admin translation in the server. I'd like to set this to admin when using gel:// but that's not done yet -- all default users are edgedb for now.

Also the database should not be edgedb no?

Unless I missed something, because it is unspecified, it's branch = __default__/database = edgedb.

Effectively the empty credentials file is equivalent to parsing gel://.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny enough we don't have a test for the empty DSN only, but there are some reasonably close tests that resolve the same way as this empty credentials file does.

@mmastrac mmastrac merged commit edaa0f7 into main Mar 21, 2025
1 check passed
@mmastrac mmastrac deleted the credentials_tests branch March 21, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants