Skip to content

RUBY-1559 Implement uri option spec tests #1170

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

Merged
merged 11 commits into from
Dec 13, 2018
Merged

Conversation

saghm
Copy link
Contributor

@saghm saghm commented Nov 27, 2018

@saghm saghm force-pushed the uri-options-spec branch 2 times, most recently from e4b4585 to dadb6e5 Compare November 29, 2018 18:36
@saghm saghm requested a review from p-mongo November 29, 2018 20:16
@p-mongo
Copy link
Contributor

p-mongo commented Dec 4, 2018

This PR should also have a ticket reference, API documentation for added options and tutorial documentation for added options.

@saghm
Copy link
Contributor Author

saghm commented Dec 4, 2018

There is no ticket to reference because the drivers tickets won't be made until the spec is merged; this is a PoC, so it's supposed to land before then.

My mistake, there is a ticket. I've updated the description.

@saghm
Copy link
Contributor Author

saghm commented Dec 4, 2018

We currently don't have any API documentation for URI options; we have it for client options, but no new client options have been added, only additional mappings to them from URI options. If you want me to, I can open a separate ticket for us to add API documentation for URI options.

@saghm saghm changed the title Implement uri option spec tests RUBY-1559 Implement uri option spec tests Dec 4, 2018
* - authMechanism=String
- ``:auth_mech => Symbol``

* - authMechanismProperties=Strings
Copy link
Contributor

Choose a reason for hiding this comment

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

How would a user determine what to put in Strings for this option?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This already existed in the old code; I just alphabetized the list for easier reading. If you just look at the diff for e396935, you'll see the options that are new.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added extra documentation to this option and the others below where the type being forwarded is different from the type specified in the URI. Let me know if you think any of the other options need extra documentation as well.

@saghm saghm force-pushed the uri-options-spec branch 8 times, most recently from 889ddd5 to 039f10b Compare December 6, 2018 20:29
@saghm
Copy link
Contributor Author

saghm commented Dec 10, 2018

I believe I've addressed all of the outstanding comments on this, so it's ready for review again


* - compressors=Strings
- ``:compressors => Array<String>``
Specified as a comma-separated list, e.g. "zlib,snappy"
Copy link
Contributor

@p-mongo p-mongo Dec 10, 2018

Choose a reason for hiding this comment

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

This is a weird default to specify in the Ruby driver because snappy isn't supported by Ruby. Will this warn?

Perhaps a better language is something along the lines of:

Specified as a comma-separated list. Note that the Ruby driver only supports zlib compression, however other drivers may support snappy. For maximum compatibility with drivers specify "snappy,zlib", if compatibility with other drivers is not a concern specify "zlib". Compression is not enabled by default and when using MongoDB 4.0 and earlier, zlib compression must be manually enabled on the server in order for the Ruby driver to compress wire protocol data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't intend this to be interpreted as a default, but rather just to demonstrate how specifying more than one would work. I'm happy to make the suggested change, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay that makes sense, let's put this language in given user confusion over compression.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just pushed

@saghm saghm merged commit f810b56 into mongodb:master Dec 13, 2018
p-mongo pushed a commit to p-mongo/mongo-ruby-driver that referenced this pull request Dec 17, 2018
@saghm saghm deleted the uri-options-spec branch February 26, 2019 20:12
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