Changelog History
Page 1
-
v1.4.4 Changes
December 01, 2020π The MongoDB Go driver team is pleased to release 1.4.4 of the official Go driver.
π This release contains several bug fixes.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
π Release Notes
π Bug
- [GODRIVER-1777] - allow inline struct fields to be overwritten by higher level structs in bson
- [GODRIVER-1782] - Aggregation with $out not always sent to primary
- [GODRIVER-1783] - omitempty doesnt work on primitive.Decimal128
- [GODRIVER-1788] - Audit missing replaceErrors calls
- [GODRIVER-1793] - Allow nil options for InsertOne
π Improvement
- π¦ [GODRIVER-1767] - Mark mtest package as internal and unstable
- [GODRIVER-1798] - Add reference to how to authenticate yourself in the database in the main README file
-
v1.4.3 Changes
November 03, 2020π The MongoDB Go driver team is pleased to release 1.4.3 of the official Go driver.
π This release contains several bug fixes.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
π Release Notes
π Bug
- π [GODRIVER-1757] - Security Vulnerability: system DLL loaded without path specified
- π [GODRIVER-1768] - Incorrect docs for unmarshaling BSON Null to bson.M
- [GODRIVER-1769] - Collection.FindOne option MaxTime not working
- [GODRIVER-1770] - GridFS download chunk size should be read from files document, not bucket
Task
- [GODRIVER-1764] - Use new mingw version in Evergreen tasks
-
v1.4.2 Changes
October 07, 2020π The MongoDB Go driver team is pleased to release 1.4.2 of the official Go driver.
π This release contains several bug fixes, a fix to our existing deprecation notices to ensure they follow the format required by linters such as
staticcheck
, and an upgrade to ourgo-yaml
dependency so the driver is not susceptible to CVE-2019-11254.π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
π Release Notes
π Bug
- [GODRIVER-1715] - Incorrect Upserted count in BulkWriteResult
- [GODRIVER-1734] - Fix txnNumber addition for retryable writes
- π [GODRIVER-1742] - Default 30 minute connection life timeout should be removed
- [GODRIVER-1748] - CVE-2019-11254 - Known vulnerability in yaml.v2 v2.2.2
- [GODRIVER-1751] - Struct codec does not honor custom codecs if another codec was used first
- [GODRIVER-1758] - add missing error conversions
Task
- π [GODRIVER-1736] - Fix deprecation notice formats
- β‘οΈ [GODRIVER-1754] - Update go-cmp version
π Improvement
- β [GODRIVER-1739] - Ensure retryable writes testing checks for absence/presence of error labels
- β [GODRIVER-1741] - Specify error label in retryable writes test
-
v1.4.1 Changes
September 01, 2020π The MongoDB Go driver team is pleased to release 1.4.1 of the official Go driver.
π This release contains several bugfixes.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
π Release Notes
π Bug
- [GODRIVER-1028] - BulkWrite error indexes do not match position in models slice
- [GODRIVER-1706] - Name is not set for WriteConcernError
- [GODRIVER-1710] - TLS ServerName should not set if it's provided in a custom config
- [GODRIVER-1713] - RunCommand does not pass read preference to operations layer
- [GODRIVER-1726] - ProcessError should check for WriteCommandError, not WriteConcernError
Task
- β [GODRIVER-1729] - Fix vet/fmt/test errors for Go 1.15
- [GODRIVER-1730] - Use Go 1.15 in Evergreen tasks
π Improvement
- [GODRIVER-1703] - Change Session examples to use transactions
- π¨ [GODRIVER-1719] - fix data race in test TestSDAMProse/heartbeats_processed_more_frequently
-
v1.4.0 Changes
July 30, 2020π The MongoDB Go driver team is pleased to release 1.4.0 of the official Go driver.
π This release contains support for the MongoDB 4.4 server features, as well as multiple driver-specific improvements.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
OCSP
π This release includes support for both stapled and non-stapled OCSP verification. The driver will perform OCSP verification on all stapled responses and will also reach out to OCSP responders via HTTP requests if any are present in the serverβs TLS certificate and there is no OCSP response. The driver does soft-fail verification, so a connection is rejected if and only if the certificateβs OCSP status is Revoked. If the driver is unable to retrieve a response or the response status is Unknown, the connection will be accepted.
URI Options
π€ By default, the driver will send HTTP requests to OCSP responders if there is no stapled response. If the responder is not reachable from the driver and this would add unnecessary latency to an application, the
tlsDisableOCSPEndpointCheck=true
URI option may be used to disable this. In this case, the driver will perform OCSP verification for stapled responses if they exist and will continue the connection without further verification otherwise.BSON Decoding Errors
π This release adds context to errors encountered during BSON unmarshalling. For example, if the document
{x: {y: {z: 1}}}
was unmarshalled into a struct where fieldZ
is a string, the driver would return this error:error decoding key x.y.z: cannot decode 32-bit integer into a string type
.Proper Unwrapping for Errors
π Go 1.13 introduced the
errors.Is
anderrors.As
helpers. This release adds properUnwrap
functions to various driver error types, which allow them to be used with the language helpers. For example, context-related timeout errors can now be accurately checked witherrors.Is(err, context.DeadlineExceeded)
.π Release Notes
π For a full list of tickets included in this release, please see the links below:
-
v1.4.0-rc0 Changes
July 13, 2020π The MongoDB Go driver team is pleased to release 1.4.0-rc0 of the official Go driver.
π This release contains support for the upcoming MongoDB 4.4 server release as well as driver-specific improvements. This is a release candidate and there may be changes made for bugfixes before v1.4.0 is officially released.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
π Release Notes
π Bug
- π [GODRIVER-1584] - Ensure deployment-wide fields are updated in handshakes/heartbeats
Epic
- π [GODRIVER-1482] - Go MongoDB 4.4 Support
π New Feature
- [GODRIVER-952] - Lack of context in error description like "cannot decode 64-bit integer into a string type"
- [GODRIVER-1104] - Provide imperative transaction API
- [GODRIVER-1147] - Create collection
- π [GODRIVER-1390] - Support shorter SCRAM conversation
- [GODRIVER-1489] - Reduce Client Time To Recovery On Topology Changes
- π [GODRIVER-1538] - Driver support for server Hedged Reads
- [GODRIVER-1542] - Implement primitive.DateTime.UnmarshalJSON
- [GODRIVER-1657] - Allow passing interface{} to Cursor.All
Task
- [GODRIVER-1259] - Provide transaction example using new withTransaction API
- [GODRIVER-1303] - Bump wire protocol version for 4.4
- β‘οΈ [GODRIVER-1366] - support ability to pass hint to update
- [GODRIVER-1391] - Collection and index creation in multi-doc txns
- π [GODRIVER-1395] - MONGODB-AWS Support
- π [GODRIVER-1396] - Support for allowDiskUse on find operations
- β‘οΈ [GODRIVER-1397] - Allow passing hint to findAndModify update and replace operations
- π [GODRIVER-1462] - Deprecate oplogReplay find command option from CRUD spec
- π [GODRIVER-1467] - OCSP Support
- π [GODRIVER-1469] - GridFS index checking should support indexes created in the shell
- [GODRIVER-1473] - Lift restriction on authSource without credentials
- π [GODRIVER-1485] - Remove Gopkg.toml and Gopkg.lock
- π§ [GODRIVER-1486] - Unify behavior around configuration for replica set discovery
- π [GODRIVER-1490] - Separate Connection String Parsing and Validation
- [GODRIVER-1491] - OCSP cache and URI option
- β‘οΈ [GODRIVER-1541] - Update comment in Transactions withTxn examples for the manual.
- π [GODRIVER-1558] - Investigate $merge test failures
- [GODRIVER-1590] - Change transformValue to use MarshalValue
π Improvement
- π [GODRIVER-672] - Remove bsonx dependency in driver/session
- [GODRIVER-1020] - Primitive UnmarshalJSON method should return a zero'd objectId when the field is empty instead of a decode error
- π [GODRIVER-1034] - Remove code duplication from description.NewServer and IsMaster.Result
- [GODRIVER-1210] - Implement readpref.Mode.String() and readpref.ReadPref.String()
- β [GODRIVER-1398] - Improve testing around default writeConcern
- [GODRIVER-1437] - Expand use of error labels for RetryableWrites
- β [GODRIVER-1444] - Change uri_options/auth-options spec test to enable conditional tests
- β [GODRIVER-1445] - Verify max set version and max election id on topologies in SDAM spec tests
- [GODRIVER-1464] - Make ExceededTimeLimit retryable writes error
- [GODRIVER-1470] - Raise error if hint specified for unacknowledged update using OP_MSG or OP_UPDATE
- [GODRIVER-1483] - Add error labels to WriteExceptions
- [GODRIVER-1494] - Map keys always use stringer function
- π [GODRIVER-1499] - Remove timeout check from server selection fast path
- [GODRIVER-1508] - Allow hinting the delete command
- [GODRIVER-1509] - Use whitelist for change stream resumability
- [GODRIVER-1524] - Unreachable code and confusing error message in loadCert
- π [GODRIVER-1526] - Support speculative authentication attempts in isMaster
- [GODRIVER-1528] - RetryableWrites specification improvements
- [GODRIVER-1536] - Ensure that the WriteConcernError "errInfo" object is propagated
- π [GODRIVER-1543] - Remove ElectionInProgress (216) from ResumableChangeStreamError
- [GODRIVER-1546] - Expose gridfs files and chunks collections
- π [GODRIVER-1548] - Access filename and metadata in gridfs DownloadStream
- [GODRIVER-1551] - Allow BSON undefined to decode to Go types
- π [GODRIVER-1557] - Improve SetCompressors documentation
- π [GODRIVER-1565] - Consolidate IndexModel spec generation helpers and add docs to require order-preserving types
- π [GODRIVER-1569] - Support for 'authorizedDatabases' option
- [GODRIVER-1572] - Reduce race conditions in SDAM error handling
- [GODRIVER-1578] - Clarify how a driver must handle wrong set name in single topology
- π [GODRIVER-1580] - Support multiple CA certs in one file
- [GODRIVER-1581] - Properly wrap and provide Unwrap implementations for error types
- π [GODRIVER-1582] - 'CommitQuorum' option support for 'createIndexesβ command on MongoDB 4.4
- β [GODRIVER-1583] - Don't use admin database for FLE tests
- π© [GODRIVER-1585] - Raise error when hint option is provided on unacknowledged writes against any server version
- β [GODRIVER-1593] - Implement a custom dialer for tests
- [GODRIVER-1599] - Add a way to determine if a call to Next or TryNext would block
- [GODRIVER-1600] - Hidden Indexes
- [GODRIVER-1603] - Do not add the RetryableWriteError label to errors that occur during a write within a transaction (excepting commitTransaction and abortTransaction)
- π [GODRIVER-1622] - allowDiskUse option for find should be documented as only being supported in 4.4+
- π§ [GODRIVER-1627] - Return structured or configurable error for bson.Unmarshal
- 0οΈβ£ [GODRIVER-1628] - Reduce default keepalive time to align with Azure defaults
- β [GODRIVER-1635] - Ensure OCSP and AWS auth are tested on both 4.4 and latest
- β [GODRIVER-1650] - Ensure OCSP is fully tested
- π [GODRIVER-1655] - Drivers should retry replSetStepDown after "Unable to acquire X lock" error
- [GODRIVER-1656] - Define behavior of connectTimeoutMS=0 with streaming protocol
- β [GODRIVER-1671] - Test that ElectionInProgress is not resumed
- [GODRIVER-1678] - Treat CursorNotFound as a resumable change stream error
-
v1.4.0-beta2 Changes
June 09, 2020π The MongoDB Go driver team is pleased to release 1.4.0-beta2 of the official Go driver.
π This release contains support for some MongoDB server version 4.4 features and improvements to the driver API.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
π Release Notes
π New Feature
- [GODRIVER-952] - Lack of context in error description like "cannot decode 64-bit integer into a string type"
- [GODRIVER-1104] - Provide imperative transaction API
- [GODRIVER-1147] - Create collection
- π [GODRIVER-1390] - Support shorter SCRAM conversation
- π [GODRIVER-1538] - Driver support for server Hedged Reads
- [GODRIVER-1542] - Implement primitive.DateTime.UnmarshalJSON
Task
- [GODRIVER-1259] - Provide transaction example using new withTransaction API
- [GODRIVER-1303] - Bump wire protocol version for 4.4
- β‘οΈ [GODRIVER-1366] - support ability to pass hint to update
- [GODRIVER-1391] - Collection and index creation in multi-doc txns
- π [GODRIVER-1395] - MONGODB-AWS Support
- π [GODRIVER-1396] - Support for allowDiskUse on find operations
- β‘οΈ [GODRIVER-1397] - Allow passing hint to findAndModify update and replace operations
- π [GODRIVER-1462] - Deprecate oplogReplay find command option from CRUD spec
- π [GODRIVER-1467] - OCSP Support
- π [GODRIVER-1469] - GridFS index checking should support indexes created in the shell
- [GODRIVER-1473] - Lift restriction on authSource without credentials
- π [GODRIVER-1485] - Remove Gopkg.toml and Gopkg.lock
- π§ [GODRIVER-1486] - Unify behavior around configuration for replica set discovery
- π [GODRIVER-1490] - Separate Connection String Parsing and Validation
- [GODRIVER-1491] - OCSP cache and URI option
- β‘οΈ [GODRIVER-1541] - Update comment in Transactions withTxn examples for the manual.
- π [GODRIVER-1558] - Investigate $merge test failures
- [GODRIVER-1590] - Change transformValue to use MarshalValue
π Improvement
- π [GODRIVER-672] - Remove bsonx dependency in driver/session
- [GODRIVER-1020] - Primitive UnmarshalJSON method should return a zero'd objectId when the field is empty instead of a decode error
- π [GODRIVER-1034] - Remove code duplication from description.NewServer and IsMaster.Result
- [GODRIVER-1210] - Implement readpref.Mode.String() and readpref.ReadPref.String()
- β [GODRIVER-1398] - Improve testing around default writeConcern
- [GODRIVER-1437] - Expand use of error labels for RetryableWrites
- β [GODRIVER-1444] - Change uri_options/auth-options spec test to enable conditional tests
- β [GODRIVER-1445] - Verify max set version and max election id on topologies in SDAM spec tests
- [GODRIVER-1464] - Make ExceededTimeLimit retryable writes error
- [GODRIVER-1470] - Raise error if hint specified for unacknowledged update using OP_MSG or OP_UPDATE
- [GODRIVER-1483] - Add error labels to WriteExceptions
- [GODRIVER-1494] - Map keys always use stringer function
- π [GODRIVER-1499] - Remove timeout check from server selection fast path
- [GODRIVER-1508] - Allow hinting the delete command
- [GODRIVER-1509] - Use whitelist for change stream resumability
- [GODRIVER-1524] - Unreachable code and confusing error message in loadCert
- π [GODRIVER-1526] - Support speculative authentication attempts in isMaster
- [GODRIVER-1528] - RetryableWrites specification improvements
- [GODRIVER-1536] - Ensure that the WriteConcernError "errInfo" object is propagated
- π [GODRIVER-1543] - Remove ElectionInProgress (216) from ResumableChangeStreamError
- [GODRIVER-1546] - Expose gridfs files and chunks collections
- π [GODRIVER-1548] - Access filename and metadata in gridfs DownloadStream
- [GODRIVER-1551] - Allow BSON undefined to decode to Go types
- π [GODRIVER-1557] - Improve SetCompressors documentation
- π [GODRIVER-1565] - Consolidate IndexModel spec generation helpers and add docs to require order-preserving types
- π [GODRIVER-1569] - Support for 'authorizedDatabases' option
- [GODRIVER-1578] - Clarify how a driver must handle wrong set name in single topology
- π [GODRIVER-1580] - Support multiple CA certs in one file
- [GODRIVER-1581] - Implement Unwrap for all error types that wrap others
- π [GODRIVER-1582] - 'CommitQuorum' option support for 'createIndexesβ command on MongoDB 4.4
- β [GODRIVER-1583] - Don't use admin database for FLE tests
- π© [GODRIVER-1585] - Raise error when hint option is provided on unacknowledged writes against any server version
- [GODRIVER-1599] - Add a way to determine if a call to Next or TryNext would block
- [GODRIVER-1600] - Hidden Indexes
- π [GODRIVER-1622] - allowDiskUse option for find should be documented as only being supported in 4.4+
- 0οΈβ£ [GODRIVER-1628] - Reduce default keepalive time to align with Azure defaults
-
v1.4.0-beta1 Changes
April 10, 2020π The MongoDB Go driver team is pleased to release 1.4.0-beta1 of the official Go driver.
π This release contains support for some MongoDB server version 4.4 features and improvements to the driver API.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
Context for BSON Errors
π In previous versions, unmarshalling BSON bytes into a struct could fail with errors like
cannot decode string into int32 type
. These errors lacked context and could be confusing to debug. This release adds context to these errors to provide both the BSON key and the struct field name which caused the error. A similar error is now in the formerror decoding key foo(fieldFoo): cannot decode string into int32 type
.π Release Notes
π New Feature
- [GODRIVER-952] - Lack of context in error description like "cannot decode 64-bit integer into a string type"
- π [GODRIVER-1390] - Support shorter SCRAM conversation
- [GODRIVER-1542] - Implement primitive.DateTime.UnmarshalJSON
Task
- [GODRIVER-1303] - Bump wire protocol version for 4.4
- β‘οΈ [GODRIVER-1366] - support ability to pass hint to update
- [GODRIVER-1391] - Collection and index creation in multi-doc txns
- π [GODRIVER-1395] - MONGODB-AWS Support
- π [GODRIVER-1396] - Support for allowDiskUse on find operations
- β‘οΈ [GODRIVER-1397] - Allow passing hint to findAndModify update and replace operations
- π [GODRIVER-1462] - Deprecate oplogReplay find command option from CRUD spec
- π [GODRIVER-1467] - OCSP Support
- π [GODRIVER-1469] - GridFS index checking should support indexes created in the shell
- π [GODRIVER-1485] - Remove Gopkg.toml and Gopkg.lock
- π [GODRIVER-1490] - Separate Connection String Parsing and Validation
- [GODRIVER-1491] - OCSP cache and URI option
π Improvement
- π [GODRIVER-672] - Remove bsonx dependency in driver/session
- β [GODRIVER-1398] - Improve testing around default writeConcern
- [GODRIVER-1437] - Expand use of error labels for RetryableWrites
- β [GODRIVER-1444] - Change uri_options/auth-options spec test to enable conditional tests
- β [GODRIVER-1445] - Verify max set version and max election id on topologies in SDAM spec tests
- [GODRIVER-1464] - Make ExceededTimeLimit retryable writes error
- [GODRIVER-1470] - Raise error if hint specified for unacknowledged update using OP_MSG or OP_UPDATE
- [GODRIVER-1483] - Add error labels to WriteExceptions
- π [GODRIVER-1499] - Remove timeout check from server selection fast path
- [GODRIVER-1508] - Allow hinting the delete command
- [GODRIVER-1509] - Use whitelist for change stream resumability
- [GODRIVER-1524] - Unreachable code and confusing error message in loadCert
- π [GODRIVER-1526] - Support speculative authentication attempts in isMaster
- [GODRIVER-1528] - RetryableWrites specification improvements
- [GODRIVER-1536] - Ensure that the WriteConcernError "errInfo" object is propagated
- π [GODRIVER-1543] - Remove ElectionInProgress (216) from ResumableChangeStreamError
- [GODRIVER-1546] - Expose gridfs files and chunks collections
- π [GODRIVER-1548] - Access filename and metadata in gridfs DownloadStream
- [GODRIVER-1551] - Allow BSON undefined to decode to Go types
-
v1.3.7 Changes
August 10, 2020π The MongoDB Go driver team is pleased to release 1.3.7 of the official Go driver.
π This release contains a bugfix for an error introduced in 1.3.6 that caused averageRTT to be set incorrectly.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
π Release Notes
π Bug
- [GODRIVER-1708] - Monitoring routine does not correctly set starting time in 1.3.6
-
v1.3.6 Changes
August 04, 2020π The MongoDB Go driver team is pleased to release 1.3.6 of the official Go driver.
π This release contains several bugfixes.
π Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.
π Release Notes
π Bug
- [GODRIVER-1688] - primitive.NewDateTimeFromTime only allows years between 1678 and 2262
- β± [GODRIVER-1695] - heartbeats should always use connectTimeout as socket timeout
- [GODRIVER-1706] - Name is not set for WriteConcernError