Skip to content

Conversation

addaleax
Copy link
Collaborator

When connected to a server that we know is an Atlas server but
announces itself as a mongos, print “atlas proxy” in the prompt
rather than “mongos” to avoid confusion.

As a drive-by fix, make sure to use the service provider of the
current database, and not necessarily the initial one, as new
connections can be assigned to db.

When connected to a server that we know is an Atlas server but
announces itself as a mongos, print “atlas proxy” in the prompt
rather than “mongos” to avoid confusion.

As a drive-by fix, make sure to use the service provider of the
current database, and not necessarily the initial one, as new
connections can be assigned to `db`.
});
return sp;
});
sp.platform = 2; // ReplPlatform.CLI ... let's maybe stop using an enum for this
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can make it a string enum with some human readable values 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah … although I’d personally lean towards using something'cli' | 'java-shell' | 'compass' | 'browser' – I think this is one of those things @rose-m might have meant yesterday?

@addaleax addaleax merged commit d515a41 into master Apr 22, 2021
@addaleax addaleax deleted the announce-atlas-proxy branch April 22, 2021 09:46
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.

2 participants