Skip to content

Fix and update references to Markdown MongoDB specifications #1746

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 4 commits into from
Oct 2, 2024
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
2 changes: 1 addition & 1 deletion .evergreen/config_generator/components/loadbalanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def tasks():
)

# Satisfy requirements specified in
# https://github.com/mongodb/specifications/blob/14916f76fd92b2686d8e3d1f0e4c2d2ef88ca5a7/source/load-balancers/tests/README.rst#testing-requirements
# https://github.com/mongodb/specifications/blob/master/source/load-balancers/tests/README.md#testing-requirements
#
# > For each server version that supports load balanced clusters, drivers
# > MUST add two Evergreen tasks: one with a sharded cluster with both
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Documentation / Support / Feedback

The documentation is available at `MongoDB C Driver Docs <https://www.mongodb.com/docs/drivers/c/>`_ and https://www.mongoc.org.
For issues with, questions about, or feedback for libmongoc, please look into
our `support channels <http://www.mongodb.org/about/support>`_. Please
our `support channels <https://www.mongodb.org/about/support>`_. Please
do not email any of the libmongoc developers directly with issues or
questions - you're more likely to get an answer on the `MongoDB Community Forums`_ or `StackOverflow <https://stackoverflow.com/questions/tagged/mongodb+c>`_.

Expand Down
2 changes: 1 addition & 1 deletion src/kms-message/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ implements the request format.
- `test_kms_azure_online` makes live requests, and has additional requirements (must have working credentials).

### Requirements
- A complete installation of the C driver. (libbson is needed for parsing JSON, and libmongoc is used for creating TLS streams). See http://mongoc.org/libmongoc/current/installing.html for installation instructions. For macOS, `brew install mongo-c-driver` will suffice.
- A complete installation of the C driver. (libbson is needed for parsing JSON, and libmongoc is used for creating TLS streams). See the [C Driver Manual](https://www.mongodb.com/docs/languages/c/c-driver/current/libmongoc/tutorials/obtaining-libraries/) for installation instructions. For macOS, `brew install mongo-c-driver` will suffice.
- An Azure key vault, and a service principal with an access policy allowing encrypt / decrypt key operations. The following environment variables must be set:
- AZURE_TENANT_ID
- AZURE_CLIENT_ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ Example

.. include:: includes/seealso/bson-as-json.txt

.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
2 changes: 1 addition & 1 deletion src/libbson/doc/bson_array_as_json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ Example

.. include:: includes/seealso/bson-as-json.txt

.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
2 changes: 1 addition & 1 deletion src/libbson/doc/bson_array_as_relaxed_extended_json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ Example

.. include:: includes/seealso/bson-as-json.txt

.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
2 changes: 1 addition & 1 deletion src/libbson/doc/bson_as_canonical_extended_json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ Example

.. include:: includes/seealso/bson-as-json.txt

.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
3 changes: 1 addition & 2 deletions src/libbson/doc/bson_as_json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,4 @@ Example

.. include:: includes/seealso/bson-as-json.txt

.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst

.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
2 changes: 1 addition & 1 deletion src/libbson/doc/bson_as_json_with_opts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Example

.. include:: includes/seealso/bson-as-json.txt

.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
2 changes: 1 addition & 1 deletion src/libbson/doc/bson_as_relaxed_extended_json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ Example

.. include:: includes/seealso/bson-as-json.txt

.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
.. _MongoDB Extended JSON format: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
3 changes: 1 addition & 2 deletions src/libbson/doc/bson_decimal128_from_string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Description

Parses the string containing ascii encoded Decimal128 and initialize the bytes
in ``dec``. See the `Decimal128 specification
<https://github.com/mongodb/specifications/blob/master/source/bson-decimal128/decimal128.rst>`_
<https://github.com/mongodb/specifications/blob/master/source/bson-decimal128/decimal128.md>`_
for the exact string format.

Returns
Expand All @@ -38,4 +38,3 @@ Example

bson_decimal128_t dec;
bson_decimal128_from_string ("1.00", &dec);

2 changes: 1 addition & 1 deletion src/libbson/doc/bson_decimal128_from_string_w_len.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Description

Parses the string containing ascii encoded Decimal128 and initialize the bytes
in ``dec``. See the `Decimal128 specification
<https://github.com/mongodb/specifications/blob/master/source/bson-decimal128/decimal128.rst>`_
<https://github.com/mongodb/specifications/blob/master/source/bson-decimal128/decimal128.md>`_
for the exact string format.

Returns
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/doc/bson_json_mode_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ The :symbol:`bson_json_mode_t` enumeration contains all available modes for enco

| :symbol:`bson_as_json_with_opts()`

.. _MongoDB Extended JSON: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
.. _MongoDB Extended JSON: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md
2 changes: 1 addition & 1 deletion src/libbson/doc/bson_json_opts_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The ``max_len`` member holds a maximum length for the resulting JSON string. Enc

| :symbol:`bson_as_json_with_opts()`

.. _MongoDB Extended JSON: https://github.com/mongodb/specifications/blob/master/source/extended-json.rst
.. _MongoDB Extended JSON: https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md


.. only:: html
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This site documents the API. For tutorials, guides, and explainers, see `MongoDB
Introduction
------------

libbson builds, parses, and iterates `BSON <http://bsonspec.org>`_ documents, the native data format of MongoDB. It also converts BSON to and from JSON, and provides a platform compatibility layer for `the MongoDB C Driver <https://www.mongoc.org/>`_.
libbson builds, parses, and iterates `BSON <https://bsonspec.org>`_ documents, the native data format of MongoDB. It also converts BSON to and from JSON, and provides a platform compatibility layer for `the MongoDB C Driver <https://www.mongoc.org/>`_.


.. toctree::
Expand Down
4 changes: 2 additions & 2 deletions src/libmongoc/doc/application-performance-monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Application Performance Monitoring (APM)

The MongoDB C Driver allows you to monitor all the MongoDB operations the driver executes. This event-notification system conforms to two MongoDB driver specs:

* `Command Logging and Monitoring <https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.rst>`_: events related to all application operations.
* `SDAM Monitoring <https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst>`_: events related to the driver's Server Discovery And Monitoring logic.
* `Command Logging and Monitoring <https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.md>`_: events related to all application operations.
* `SDAM Monitoring <https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md>`_: events related to the driver's Server Discovery And Monitoring logic.

To receive notifications, create a ``mongoc_apm_callbacks_t`` with :symbol:`mongoc_apm_callbacks_new`, set callbacks on it, then pass it to :symbol:`mongoc_client_set_apm_callbacks` or :symbol:`mongoc_client_pool_set_apm_callbacks`.

Expand Down
6 changes: 3 additions & 3 deletions src/libmongoc/doc/gridfs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ GridFS

The C driver includes two APIs for GridFS.

The older API consists of :symbol:`mongoc_gridfs_t` and its derivatives. It contains deprecated API, does not support read preferences, and is not recommended in new applications. It does not conform to the `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst>`_.
The older API consists of :symbol:`mongoc_gridfs_t` and its derivatives. It contains deprecated API, does not support read preferences, and is not recommended in new applications. It does not conform to the `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.md>`_.

The newer API consists of :symbol:`mongoc_gridfs_bucket_t` and allows uploading/downloading through derived :symbol:`mongoc_stream_t` objects. It conforms to the `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst>`_.
The newer API consists of :symbol:`mongoc_gridfs_bucket_t` and allows uploading/downloading through derived :symbol:`mongoc_stream_t` objects. It conforms to the `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.md>`_.

There is not always a straightforward upgrade path from an application built with :symbol:`mongoc_gridfs_t` to :symbol:`mongoc_gridfs_bucket_t` (e.g. a :symbol:`mongoc_gridfs_file_t` provides functions to seek but :symbol:`mongoc_stream_t` does not). But users are encouraged to upgrade when possible.
There is not always a straightforward upgrade path from an application built with :symbol:`mongoc_gridfs_t` to :symbol:`mongoc_gridfs_bucket_t` (e.g. a :symbol:`mongoc_gridfs_file_t` provides functions to seek but :symbol:`mongoc_stream_t` does not). But users are encouraged to upgrade when possible.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ provider and master key.
If ``provider`` is not ``NULL``, rewraps matching data keys with the new KMS
provider as described by ``master_key``. The ``master_key`` document must
conform to the `Client Side Encryption specification
<https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#masterkey>`_.
<https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.md#masterkey>`_.

Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_client_session_get_dirty.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Synopsis
bool
mongoc_client_session_get_dirty (const mongoc_client_session_t *session);

Indicates whether ``session`` has been marked "dirty" as defined in the `driver sessions specification <https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst>`_.
Indicates whether ``session`` has been marked "dirty" as defined in the `driver sessions specification <https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.md>`_.

Parameters
----------
Expand Down
3 changes: 1 addition & 2 deletions src/libmongoc/doc/mongoc_gridfs_bucket_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Example

.. seealso::

| The `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst>`_.
| The `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.md>`_.

| The non spec-compliant :symbol:`mongoc_gridfs_t`.

5 changes: 2 additions & 3 deletions src/libmongoc/doc/mongoc_gridfs_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mongoc_gridfs_t

.. warning::

This GridFS implementation does not conform to the `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst>`_. For a spec compliant implementation, use :symbol:`mongoc_gridfs_bucket_t`.
This GridFS implementation does not conform to the `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.md>`_. For a spec compliant implementation, use :symbol:`mongoc_gridfs_bucket_t`.

Synopsis
--------
Expand Down Expand Up @@ -48,7 +48,7 @@ Example

.. seealso::

| The `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst>`_.
| The `MongoDB GridFS specification <https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.md>`_.

| The spec-compliant :symbol:`mongoc_gridfs_bucket_t`.

Expand All @@ -73,4 +73,3 @@ Example
mongoc_gridfs_get_chunks
mongoc_gridfs_get_files
mongoc_gridfs_remove_by_filename

3 changes: 1 addition & 2 deletions src/libmongoc/doc/mongoc_topology_description_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Synopsis
typedef struct _mongoc_topology_description_t mongoc_topology_description_t;

``mongoc_topology_description_t`` is an opaque type representing the driver's knowledge of the MongoDB server or servers it is connected to.
Its API conforms to the `SDAM Monitoring Specification <https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst>`_.
Its API conforms to the `SDAM Monitoring Specification <https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md>`_.

Applications receive a temporary reference to a ``mongoc_topology_description_t`` as a parameter to an SDAM Monitoring callback that must not be destroyed. See :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`.

Expand All @@ -32,4 +32,3 @@ Applications receive a temporary reference to a ``mongoc_topology_description_t`
mongoc_topology_description_has_writable_server
mongoc_topology_description_new_copy
mongoc_topology_description_type

2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ mongoc_cluster_run_command_monitored (mongoc_cluster_t *cluster, mongoc_cmd_t *c
/*
* Unacknowledged writes must provide a CommandSucceededEvent with an
* {ok: 1} reply.
* https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.rst#unacknowledged-acknowledged-writes
* https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.md#unacknowledgedacknowledged-writes
*/
if (!cmd->is_acknowledged) {
bson_append_int32 (&fake_reply, "ok", 2, 1);
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ mongoc_collection_find_indexes_with_opts (mongoc_collection_t *collection, const

if (mongoc_cursor_error (cursor, &error) && error.code == MONGOC_ERROR_COLLECTION_DOES_NOT_EXIST) {
/* collection does not exist. from spec: return no documents but no err:
* https://github.com/mongodb/specifications/blob/master/source/enumerate-indexes.rst#enumeration-getting-index-information
* https://github.com/mongodb/specifications/blob/master/source/enumerate-collections/enumerate-collections.md#getting-full-collection-information
*/
_mongoc_cursor_set_empty (cursor);
}
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ _mongoc_n_return (mongoc_cursor_t *cursor)
int64_t n_return;

/* calculate numberToReturn according to:
* https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#combining-limit-and-batch-size-for-the-wire-protocol
* https://github.com/mongodb/specifications/blob/master/source/crud/crud.md#combining-limit-and-batch-size-for-the-wire-protocol
*/
limit = mongoc_cursor_get_limit (cursor);
batch_size = mongoc_cursor_get_batch_size (cursor);
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-server-description.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ mongoc_server_description_filter_stale (const mongoc_server_description_t **sds,
* Given a set of server descriptions, set to NULL any that don't
* match the read preference's tag sets.
*
* https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#tag-set
* https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md#tag_sets
*
*-------------------------------------------------------------------------
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* Application Performance Monitoring for topology events, complies with the
* SDAM Monitoring Spec:

https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst
https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md

*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/* Application Performance Monitoring for topology events, complies with the
* SDAM Monitoring Spec:

https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst
https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md

*/

Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ _mongoc_topology_push_server_session (mongoc_topology_t *topology, mongoc_server
/**
* ! note:
* At time of writing, this diverges from the spec:
* https://github.com/mongodb/specifications/blob/df6be82f865e9b72444488fd62ae1eb5fca18569/source/sessions/driver-sessions.rst#algorithm-to-return-a-serversession-instance-to-the-server-session-pool
* https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.md#algorithm-to-return-a-serversession-instance-to-the-server-session-pool
*
* The spec notes that before returning a session, we should first inspect
* the back of the pool for expired items and delete them. In this case, we
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-uri.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ mongoc_uri_apply_options (mongoc_uri_t *uri, const bson_t *options, bool from_dn
* Keys that aren't supported by a driver MUST be ignored.
*
* A WARN level logging message MUST be issued
* https://github.com/mongodb/specifications/blob/master/source/connection-string/connection-string-spec.rst#keys
* https://github.com/mongodb/specifications/blob/master/source/connection-string/connection-string-spec.md#keys
*/
MONGOC_WARNING ("Unsupported URI option \"%s\"", key);
}
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ _mongoc_bson_type_to_str (bson_type_t t)


/* Refer to:
* https://github.com/mongodb/specifications/blob/master/source/wireversion-featurelist.rst
* https://github.com/mongodb/specifications/blob/master/source/wireversion-featurelist/wireversion-featurelist.md
* and:
* https://github.com/mongodb/mongo/blob/master/src/mongo/db/wire_version.h#L57
*/
Expand Down