Releases: mongodb/mongo-go-driver
MongoDB Go Driver 1.4.2
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 our go-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
MongoDB Go Driver 1.4.1
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
MongoDB Go Driver Release 1.3.7
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
MongoDB Go Driver 1.3.6
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
MongoDB Go Driver 1.4.0
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 field Z
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
and errors.As
helpers. This release adds proper Unwrap
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 with errors.Is(err, context.DeadlineExceeded)
.
Release Notes
For a full list of tickets included in this release, please see the links below:
MongoDB Go Driver 1.4.0-rc0
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] - Reduc...
MongoDB Go Driver 1.3.5
The MongoDB Go driver team is pleased to release 1.3.5 of the official Go driver.
This release contains several bugfixes and a change to upgrade the driver's golang.org/x/text
dependency to v0.3.3 in response to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14040.
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-1609] - ConnectionClosed events not published when pool is disconnecting
- [GODRIVER-1613] - fix how Pool handles MaxPoolSize
- [GODRIVER-1625] - Single character passwords not handled
- [GODRIVER-1632] - retryable writes should be disabled on standalones
- [GODRIVER-1636] - TLS hostname should always be set
- [GODRIVER-1642] - Ensure server descriptions always have an address
- [GODRIVER-1647] - averageRTTSet is never set
- [GODRIVER-1648] - calling cursor.Next() after changestream is invalidated enters spin loop
- [GODRIVER-1658] - connections should update topology faster for failed handshakes
- [GODRIVER-1663] - Context pinned by connection.connect
Task
- [GODRIVER-1675] - Ensure driver relies on x/text version 0.3.3 or higher to address security vulnerability
MongoDB Go Driver 1.4.0-beta2
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
- [GOD...
MongoDB Go Driver 1.3.4
The MongoDB Go driver team is pleased to release 1.3.4 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-1589] - Consolidate pool.drain() and pool.clear()
- [GODRIVER-1615] - SingleConnectionDeployment should not be used for application operations
- [GODRIVER-1620] - pool cleared on network timeout errors
- [GODRIVER-1634] - Deduplicate logic for updating cluster/operation time
MongoDB Go Driver 1.3.3
The MongoDB Go driver team is pleased to release 1.3.3 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-1363] - InsertMany returns InsertedID's from insertions that errored
- [GODRIVER-1405] - "appname" is not not always sent in isMaster
- [GODRIVER-1560] - default connection idleTimeout is 10 minutes not unlimited
- [GODRIVER-1562] - bulk writes should wrap driver.ErrUnacknowledgedWrite
- [GODRIVER-1576] - Allowing pointer of type to implement an interface causes errors for non-addressable types
- [GODRIVER-1592] - Change streams should execute client side encryption flow
Improvement
- [GODRIVER-1556] - Defensively set c.nc only if the error is nil