-
Notifications
You must be signed in to change notification settings - Fork 17
DOCSP-42298: Stable API #76
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
Conversation
✅ Deploy Preview for docs-java-rs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Just a couple things but otherwise LGTM
- Description | ||
|
||
* - ``strict()`` | ||
- | **Optional**. When ``True``, if you call a command that isn't part of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- | **Optional**. When ``True``, if you call a command that isn't part of | |
- | **Optional**. When ``true``, if you call a command that isn't part of |
| Default: **False** | ||
|
||
* - ``deprecationErrors()`` | ||
- | **Optional**. When ``True``, if you call a command that is deprecated in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- | **Optional**. When ``True``, if you call a command that is deprecated in the | |
- | **Optional**. When ``true``, if you call a command that is deprecated in the |
- | **Optional**. When ``True``, if you call a command that isn't part of | ||
the declared API version, the driver raises an exception. | ||
| | ||
| Default: **False** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Default: **False** | |
| Default: **false** |
- | **Optional**. When ``True``, if you call a command that is deprecated in the | ||
declared API version, the driver raises an exception. | ||
| | ||
| Default: **False** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Default: **False** | |
| Default: **false** |
The following code example shows how you can set configurations on an instance of ``ServerApi`` | ||
by chaining methods on the ``ServerApi.Builder``: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S:
The following code example shows how you can set configurations on an instance of ``ServerApi`` | |
by chaining methods on the ``ServerApi.Builder``: | |
The following code example shows how you can configure an instance of ``ServerApi`` | |
by chaining methods on the ``ServerApi.Builder``: |
Provided apiStrict:true, but the command count is not in API Version | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a general operation instead of directly applying to count
?
Provided apiStrict:true, but the command count is not in API Version | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Provided apiStrict:true, but the command <operation> is not in API Version | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
||
The {+stable-api+} feature forces the server to run operations with behaviors compatible | ||
with the API version you specify. When you update either your driver or server, | ||
the API version changes, which can change the way these operations behave. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you update either your driver or server, the API version changes, which can change the way these operations behave.
This is not accurate. Was this text copied from somewhere else?
https://www.mongodb.com/docs/manual/reference/stable-api/ looks accurate to me, so we should either link to it or crib from it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description was taken from the same page from a different driver, yes. Can take this back to the team to investigate whether there's a larger-scope misunderstanding here.
In the meantime, can remove the sentence you called out, as I believe the remaining copy adequately explains the feature (plus we have the link to the server manual).
|
||
Once you create a ``MongoClient`` instance with | ||
a specified API version, all commands you run with the client use the specified | ||
version. If you must run commands using more than one version of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently there is only one version of the Stable API: V1.
Consider changing this to refer to one of the other properties of the ServerApi class, e.g. strict
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we expect another version to release? It could benefit us to cover our bases in advance of future versions.
I can also tweak the last highlighted sentence to the following more general version:
If you must run Stable API commands using alternative configurations, create a new
MongoClient
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have heard nothing about a new version coming out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming you accept the suggestion.
{+stable-api+}, create a new ``MongoClient``. | ||
Once you create a ``MongoClient`` instance with the {+stable-api+}, all commands you | ||
run with the client use the specified {+stable-api+} configuration. If you must run | ||
{+stable-api+} commands using alternative configurations, create a new ``MongoClient``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{+stable-api+} commands using alternative configurations, create a new ``MongoClient``. | |
commands using alternative configurations, create a new ``MongoClient``. |
Because you might want to run commands that are not part of the Stable API.
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-42298
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/java-rs/DOCSP-42298-stable-api/connect-to-mongo/stable-api/
Self-Review Checklist