Skip to content

DOCSP-48824: v2 release #107

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 8 commits into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/redirects
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define: prefix docs/languages/c/c-driver
define: base https://www.mongodb.com/${prefix}
define: versions v1.26 v1.27 v1.28 v1.29 v1.30 master
define: versions v1.26 v1.27 v1.28 v1.29 v1.30 v2.0 master

symlink: current -> v1.30
symlink: current -> v2.0
symlink: upcoming -> master

raw: ${prefix}/ -> ${base}/current/
Expand Down
24 changes: 12 additions & 12 deletions snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ name = "c"
title = "C Driver"

intersphinx = [
"https://www.mongodb.com/docs/manual/objects.inv",
"https://www.mongodb.com/docs/atlas/objects.inv",
"https://www.mongodb.com/docs/drivers/objects.inv",
"https://www.mongodb.com/docs/manual/objects.inv",
"https://www.mongodb.com/docs/atlas/objects.inv",
"https://www.mongodb.com/docs/drivers/objects.inv",
]

toc_landing_pages = [
"/databases-collections",
"/read",
"/indexes",
"/work-with-indexes",
"/connect",
"/write",
"/security",
"/databases-collections",
"/read",
"/indexes",
"/work-with-indexes",
"/connect",
"/write",
"/security",
]

sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"

[constants]

version = "1.30"
full-version = "{+version+}.2"
version = "2.0"
full-version = "{+version+}.0"
is-experimental = "is part of the experimental Queryable Encryption API and may be subject to breaking changes in future releases."
range-is-experimental = "Range algorithm is experimental only and not intended for public use. It is subject to breaking changes."
api-is-experimental = "This API {+is-experimental+}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- C99
- C89

* - 1.24 to 1.30
* - 1.24 to 2.0
- ✓
- ✓
- ✓
Expand All @@ -20,4 +20,4 @@
-
- ✓
- ✓
- ✓
- ✓
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- MongoDB 4.0
- MongoDB 3.6

* - 1.28 to 1.30
* - 1.28 to 2.0
- ✓
- ✓
- ✓
Expand Down
142 changes: 141 additions & 1 deletion source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and deprecations made in each version of the driver libraries.

Learn what's new in:

* :ref:`Version 2.0.0 <c-version-2.0.0>`
* :ref:`Version 1.30.0 <c-version-1.30.0>`
* :ref:`Version 1.29.0 <c-version-1.29.0>`
* :ref:`Version 1.28.0 <c-version-1.28.0>`
Expand All @@ -42,6 +43,145 @@ Learn what's new in:

.. _c-upcoming-breaking-changes:

.. _c-version-2.0.0:

What's New in 2.0.0
--------------------

The following sections describe the changes in the 2.0.0 release of
the {+driver-short+}.

.. important:: Removals

The 2.0.0 driver release removes many deprecated types and methods. To view
a full list of removals, see the **Removals** sections of the
:github:`v2.0 release notes </mongodb/mongo-c-driver/releases/tag/2.0.0>`.

{+libbson+}
~~~~~~~

The 2.0.0 release of ``{+libbson+}`` includes the following changes:

New Features
````````````

- Adds support for the BSON Binary Vector subtype. To learn more, see
`BSON Binary Vector subtype <{+api-libbson+}/binary_vector.html>`__ in
the {+libbson+} API documentation.

Changes
```````

- Reduces the value of the ``BSON_ERROR_BUFFER_SIZE`` macro from ``504``
to ``503`` to reserve the final byte for internal use.

- Renames the following ``pkg-config`` files:

- ``libbson-1.0``: Renamed to ``bson2``
- ``libbson-static-1.0``: Renamed to ``bson2-static``

- Removes the ``bson-1.0`` CMake package. Instead, use ``bson`` and
specify a version or version range to be imported, as shown in the
following example:

.. code-block:: c

find_package(bson 1.30...2.0)

- Renames the following imported targets:

- ``mongo::bson_static``: Renamed to ``bson::static``
- ``mongo::bson_shared``: Renamed to ``bson::shared``

- Adds the ``bson::bson`` target, which points to either the static
library or shared library depending on the value of the
``BSON_DEFAULT_IMPORTED_LIBRARY_TYPE`` CMake option. If you don't set this option and
both library types are available, ``bson::bson`` uses
the static library.

{+libmongoc+}
~~~~~~~~~

The 2.0.0 release of ``{+libmongoc+}`` includes the following changes:

New Features
````````````

- Supports aggregate operations that include ``$lookup`` stages for
In-Use Encryption. To learn more, see the following
references in the {+mdb-server+} manual:

- :upcoming:`$lookup and $graphLookup Behavior </core/csfle/reference/supported-operations/#-lookup-and--graphlookup-behavior>` for CSFLE
- :upcoming:`$lookup and $graphLookup Behavior </core/queryable-encryption/reference/supported-operations/#-lookup-and--graphlookup-behavior>` for QE

Changes
```````

- If you pass the ``batchSize:0`` option to ``mongoc_client_watch``, ``mongoc_database_watch``,
or ``mongoc_collection_watch``, the ``aggregate`` command no longer ignores this option and
applies it.

- Removes ``bson_oid_init_sequence``. Instead, use ``bson_oid_init``.

- Changes the return type of ``mongoc_server_description_host`` from ``mongoc_host_list_t *``
to ``const mongoc_host_list_t *``.

- Implements the following changes to URI authentication credentials validation, which
apply when creating a new ``mongoc_uri_t`` object from a connection string:

- Requires that usernames are non-empty for all authentication mechanisms.
- Validates username and password specification requirements and returns
a client error for the specified authentication mechanism.
- For the ``MONGODB-AWS`` authentication mechanism, the ``authSource`` value defaults to
``$external``.
- Validates ``authMechanism`` values and returns a client error for invalid values.
- Validates ``authMechanismProperties`` values and returns a client error for invalid
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest clarifying what "Correctly parses colon" means. Suggest removing mention of comma character. The comma character parsing behavior did not change. Documentation was only added to note it was disallowed.

- Validates ``authMechanismProperties`` values and returns a client error for invalid properties for the specified authentication mechanism
  - Now correctly parses colon (``:``) characters within ``authMechanismProperties`` values:
      - Old behavior: ``authMechanismProperties=A:B,C:D:E,F:G`` is parsed as ``{'A': 'B', 'C': 'D:E,F:G'}``.
      - New behavior: ``authMechanismProperties=A:B,C:D:E,F:G`` is parsed as ``{'A': 'B': 'C': 'D:E', 'F': 'G'}``.

properties for the specified authentication mechanism.
- Correctly parses colon (``:``) characters within ``authMechanismProperties`` values.
For example, setting ``authMechanismProperties=A:B,C:D:E,F:G`` caused the driver to
parse the value as ``{'A': 'B', 'C': 'D:E,F:G'}``. This is now parsed as
``{'A': 'B': 'C': 'D:E', 'F': 'G'}``.

- Generates an error if you call ``mongoc_bulk_operation_execute`` on the same
``mongoc_bulk_operation_t`` repeatedly.

- Consistently applies the ``__cdecl`` calling convention to function declarations in
the public API.

- ``mongoc_client_set_ssl_opts`` ignores a pooled ``mongoc_client_t`` and logs an error.
Before popping a client, use ``mongoc_client_pool_set_ssl_opts`` to set TLS options on
a ``mongoc_client_pool_t``.

- ``mongoc_client_set_ssl_stream_initiator`` ignores a pooled ``mongoc_client_t`` and
logs an error.

- Renames the following ``pkg-config`` files:

- ``libmongoc-1.0``: Renamed to ``mongoc2``
- ``libmongoc-static-1.0``: Renamed to ``mongoc2-static``

- Removes the ``mongoc-1.0`` CMake package. Instead, use ``mongoc`` and
specify a version or version range to be imported, as shown in the
following example:

.. code-block:: c

find_package(mongoc 1.30...2.0)

- Renames the following imported targets:

- ``mongo::mongoc_static``: Renamed to ``mongoc::static``
- ``mongo::mongoc_shared``: Renamed to ``mongoc::shared``

- Adds the ``mongoc::mongoc`` target, which points to either the static
library or shared library depending on the value of the
``MONGOC_DEFAULT_IMPORTED_LIBRARY_TYPE`` CMake option. If you don't set this option and
both library types are available, ``mongoc::mongoc`` uses
the static library.

For more information about this release, see the :github:`v2.0 release notes
</mongodb/mongo-c-driver/releases/tag/2.0.0>`.

.. _c-version-1.30.0:

What's New in 1.30.0
Expand Down Expand Up @@ -532,4 +672,4 @@ New Features
Improvements
````````````
- Adds ``VERSION_CURRENT`` file in source to ease building
- Considers more errors retryable
- Considers more errors retryable
Loading