Closed alcaeus closed 5 months ago
I've kept it concise, noting that we now expose TLS and auth options. I've also reached out in #driver-devs to double-check before breaking somebody's workflow.
On second thought, changing mongodb_uri will break the setup for any driver that tests against ssl clusters as they'll be adding uri options manually. I'll change the PR to expose this as a new field and deprecate existing fields. Is there a way to deprecate these?
There's no way to deprecate an api response field. Let's just keep the existing ones. Perhaps we can note that they are deprecated in the wiki: https://github.com/10gen/mongo-orchestration/search?q=mongodb_uri&type=wikis
As for the name of the new field, anything you come up with is fine. Maybe mongodb_full_uri
or mongodb_tls_uri
?
Fixes #268.
This PR refactors the generation of the URI returned after starting a cluster. Previously,
mongodb_uri
andmongodb_auth_uri
had to be checked depending on whether auth was enabled. As indicated in the ticket above, TLS options also weren't added automatically. The goal is to get mongo-orchestration to return amongodb_uri
that can be used to connect to the cluster, without having to append other options.This PR changes
mongodb_uri
to include both TLS and auth options. Themongodb_auth_uri
field is kept for backward compatibility, but it always contains the same value asmongodb_uri
. I'm not sure if this change is kosher, as somebody may be relying onmongodb_uri
not containing auth information to test authentication failures. Please let me know if I should separate those changes.