Skip to content
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

RUBY-3549: Updated specification links from RST to MD #2898

Merged
merged 1 commit into from
Oct 8, 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 lib/mongo/auth/aws/conversation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Aws
# Defines behavior around a single MONGODB-AWS conversation between the
# client and server.
#
# @see https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst#mongodb-aws
# @see https://github.com/mongodb/specifications/blob/master/source/auth/auth.md#mongodb-aws
#
# @api private
class Conversation < SaslConversationBase
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/client_encryption.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def create_encrypted_collection(database, coll_name, coll_opts, kms_provider, ma
def create_data_keys(encrypted_fields, kms_provider, master_key)
encrypted_fields = encrypted_fields.dup
# We must return the partially formed encrypted_fields hash if an error
# occurs - https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#create-encrypted-collection-helper
# occurs - https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.md#create-encrypted-collection-helper
# Thefore, we do this in a loop instead of using #map.
encrypted_fields[:fields].size.times do |i|
field = encrypted_fields[:fields][i]
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/cluster/sdam_flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def update_server_descriptions
if server.address == updated_desc.address
# SDAM flow must be run when topology version in the new description
# is equal to the current topology version, per the example in
# https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#what-is-the-purpose-of-topologyversion
# https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#what-is-the-purpose-of-topologyversion
unless updated_desc.topology_version_gte?(server.description)
return false
end
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/collection/view/aggregation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def initial_query_op(session, read_preference)
# aggregation will be routed to primary. Otherwise return the original
# read preference.
#
# See https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#read-preferences-and-server-selection
# See https://github.com/mongodb/specifications/blob/master/source/crud/crud.md#read-preferences-and-server-selection
#
# @param [ Server::Connection ] connection The connection which
# will be used for the operation.
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/cursor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def get_more
# Legacy retryable read logic used to retry getMores, but since
# doing so may result in silent data loss, the driver no longer retries
# getMore operations in any circumstance.
# https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.rst#qa
# https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.md#qa
process(execute_operation(get_more_operation))
end

Expand Down
6 changes: 3 additions & 3 deletions lib/mongo/error/sdam_error_detection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module SdamErrorDetection

# Whether the error is a "not master" error, or one of its variants.
#
# See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#not-master-and-node-is-recovering.
# See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering
#
# @return [ true | false ] Whether the error is a not master.
#
Expand All @@ -45,7 +45,7 @@ def not_master?

# Whether the error is a "node is recovering" error, or one of its variants.
#
# See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#not-master-and-node-is-recovering.
# See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering
#
# @return [ true | false ] Whether the error is a node is recovering.
#
Expand All @@ -66,7 +66,7 @@ def node_recovering?

# Whether the error is a "node is shutting down" type error.
#
# See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#not-master-and-node-is-recovering.
# See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering
#
# @return [ true | false ] Whether the error is a node is shutting down.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def validate_camel_case_read_preference_mode(mode)

# Validates the provided hash as a read concern object, per the
# read/write concern specification
# (https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.rst#read-concern).
# (https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.md#read-concern).
#
# This method also accepts nil as input for convenience.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/monitoring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def publish_heartbeat(server, awaited: false)
# the time spent on the entire heartbeat. This could include time
# to connect the socket (including TLS handshake), not just time
# spent on hello call itself.
# The spec at https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst
# The spec at https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.md
# requires that the duration exposed here start from "sending the
# message" (hello). This requirement does not make sense if,
# for example, we were never able to connect to the server at all
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/monitoring/event/secure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def sensitive?(command_name:, document:)
# According to Command Monitoring spec,for hello/legacy hello commands
# when speculativeAuthenticate is present, their commands AND replies
# MUST be redacted from the events.
# See https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.rst#security
# See https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.md#security
true
else
false
Expand Down
4 changes: 2 additions & 2 deletions lib/mongo/operation/shared/read_preference_supported.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def options(connection)
#
# @return [ true | false ] Whether the :secondary_ok flag should be added.
def add_secondary_ok_flag?(connection)
# https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#topology-type-single
# https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md#topology-type-single
if connection.description.standalone?
# Read preference is never sent to standalones.
false
Expand All @@ -83,7 +83,7 @@ def command(connection)
#
# $readPreference is only sent when the server is a mongos,
# following the rules described in
# https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#passing-read-preference-to-mongos.
# https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md#passing-read-preference-to-mongos.
# The topology does not matter for figuring out whether to send
# $readPreference since the decision is always made based on
# server type.
Expand Down
4 changes: 2 additions & 2 deletions lib/mongo/operation/shared/sessions_supported.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def command(connection)
#
# $readPreference is only sent when the server is a mongos,
# following the rules described in
# https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#passing-read-preference-to-mongos.
# https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md#passing-read-preference-to-mongos.
# The topology does not matter for figuring out whether to send
# $readPreference since the decision is always made based on
# server type.
Expand All @@ -167,7 +167,7 @@ def command(connection)
def add_read_preference(sel, connection)
Lint.assert_type(connection, Server::Connection)

# https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#topology-type-single
# https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md#topology-type-single
read_doc = if connection.description.standalone?
# Read preference is never sent to standalones.
nil
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/protocol/compressed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Protocol
# MongoDB Wire protocol Compressed message.
#
# This is a bi-directional message that compresses another opcode.
# See https://github.com/mongodb/specifications/blob/master/source/compression/OP_COMPRESSED.rst
# See https://github.com/mongodb/specifications/blob/master/source/compression/OP_COMPRESSED.md
#
# @api semipublic
#
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/protocol/msg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def add_check_sum(buffer)

# Encapsulates a type 1 OP_MSG section.
#
# @see https://github.com/mongodb/specifications/blob/master/source/message/OP_MSG.rst#sections
# @see https://github.com/mongodb/specifications/blob/master/source/message/OP_MSG.md#sections
#
# @api private
class Section1
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/server/push_monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def do_work
# include topology version. In this case we need to keep our existing
# topology version so that we can resume monitoring.
# The spec does not appear to directly address this case but
# https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.rst#streaming-ismaster
# https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.md#streamable-hello-or-legacy-hello-command
# says that topologyVersion should only be updated from successful
# hello responses.
if new_description.topology_version
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/session/server_session/dirtyable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Session
class ServerSession
# Functionality for manipulating and querying a session's
# "dirty" state, per the last paragraph at
# https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst#server-session-pool
# https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.md#server-session-pool
#
# If a driver has a server session pool and a network error is
# encountered when executing any command with a ClientSession, the
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo/uri/srv_protocol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class URI
#
# Please refer to the Initial DNS Seedlist Discovery spec for details.
#
# https://github.com/mongodb/specifications/blob/master/source/initial-dns-seedlist-discovery
# https://github.com/mongodb/specifications/blob/master/source/initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.md
#
# @example Use the uri string to make a client connection.
# client = Mongo::Client.new('mongodb+srv://test6.test.build.10gen.cc/')
Expand Down
2 changes: 1 addition & 1 deletion spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ described in `.evergreen/README.md`.

OCSP connectivity tests are in `spec/integration/ocsp_connectivity.rb`.
These test the combinations described
[here](https://github.com/mongodb/specifications/blob/master/source/ocsp-support/tests/README.rst#integration-tests-permutations-to-be-tested).
[here](https://github.com/mongodb/specifications/blob/master/source/ocsp-support/tests/README.md#integration-tests-permutations-to-be-tested).
To run these tests, set `OCSP_CONNECTIVITY=pass` environment variable if
the tests are expected to connect successfully or `OCSP_CONNECTIVITY=fail` if
the tests are expected to not connect.
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/ocsp_connectivity_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'lite_spec_helper'

# These tests test the configurations described in
# https://github.com/mongodb/specifications/blob/master/source/ocsp-support/tests/README.rst#integration-tests-permutations-to-be-tested
# https://github.com/mongodb/specifications/blob/master/source/ocsp-support/tests/README.md#integration-tests-permutations-to-be-tested
describe 'OCSP connectivity' do
require_ocsp_connectivity
clear_ocsp_cache
Expand Down
4 changes: 2 additions & 2 deletions spec/integration/search_indexes_prose_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SearchIndexHelper
def initialize(client)
@client = client

# https://github.com/mongodb/specifications/blob/master/source/index-management/tests/README.rst#id4
# https://github.com/mongodb/specifications/blob/master/source/index-management/tests/README.md#search-index-management-helpers
# "...each test uses a randomly generated collection name. Drivers may
# generate this collection name however they like, but a suggested
# implementation is a hex representation of an ObjectId..."
Expand Down Expand Up @@ -68,7 +68,7 @@ def filter_results(result, names)
end

describe 'Mongo::Collection#search_indexes prose tests' do
# https://github.com/mongodb/specifications/blob/master/source/index-management/tests/README.rst#id5
# https://github.com/mongodb/specifications/blob/master/source/index-management/tests/README.md#setup
# "These tests must run against an Atlas cluster with a 7.0+ server."
require_atlas

Expand Down
2 changes: 1 addition & 1 deletion spec/runners/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
RSpec::Matchers.define :have_blank_credentials do
match do |client|
# The "null credential" definition in auth spec tests readme at
# https://github.com/mongodb/specifications/blob/master/source/auth/tests/README.rst
# https://github.com/mongodb/specifications/blob/master/source/auth/tests/README.md
# is as follows:
#
# credential: If null, the credential must not be considered configured
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ tests:
# Using "$db" here works for libmongoc so long as it's a string type;
# however, neither $ref nor $id would be accepted on their own.
#
# See https://github.com/mongodb/specifications/blob/master/source/extended-json.rst#parsers
# See https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md#parsers
document: &dbrefLikeKey { _id: 1, a: { $db: "foo" } }
expectResult: *insertResult
expectEvents:
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_tests/data/run_command_unified/runCommand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ tests:
# This test assumes that the single topology contains a standalone server;
# however, it is possible for a single topology to contain a direct
# connection to another server type.
# See: https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#topology-type-single
# See: https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md#topology-type-single
- topologies: [ single ]
operations:
- name: runCommand
Expand Down
Loading