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

Register mongodb+srv scheme #391

Merged
merged 2 commits into from
May 18, 2020
Merged

Conversation

shiwano
Copy link
Contributor

@shiwano shiwano commented May 17, 2020

Hi,

mongodb+srv:// is available as MongoDB URL's scheme, so I added.

See also: https://docs.mongodb.com/manual/reference/connection-string/#dns-seedlist-connection-format

@coveralls
Copy link

coveralls commented May 17, 2020

Pull Request Test Coverage Report for Build 768

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 53.467%

Totals Coverage Status
Change from base Build 764: 0.02%
Covered Lines: 2614
Relevant Lines: 4889

💛 - Coveralls

Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

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

Adding +srv without fully supporting the differences in behavior is misleading.

At a quick glance, it looks like the following behaviors are different:

  1. Uses SRV DNS record as seedlist
  2. Enables tls/ssl

@shiwano
Copy link
Contributor Author

shiwano commented May 18, 2020

Thanks for your confirmation!

I understood what you say.
I've added docs URL to README for now.

But support for the mongodb+srv scheme is done transparently by the go.mongodb.org/mongo-driver package, so I don't think I need to add a new implementation.
In fact, I've been using this configuration to operate MongoDB Atlas, and I haven't got any problems now.

Could you tell me what other changes we need to make to this PR? 🙏

Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

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

Ahh, didn't realize that the Mongo DB driver passed the URI straight through to create the db driver!

@dhui dhui merged commit 371e18d into golang-migrate:master May 18, 2020
@u007
Copy link

u007 commented Jul 5, 2020

tested the master branch, it gives dns error on lookup mongo+srv://

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.

None yet

4 participants