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

Update module go.mongodb.org/mongo-driver to v1.12.0 #13

Merged
merged 2 commits into from
Jul 23, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 22, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
go.mongodb.org/mongo-driver require minor v1.11.7 -> v1.12.0

Release Notes

mongodb/mongo-go-driver (go.mongodb.org/mongo-driver)

v1.12.0: MongoDB Go Driver 1.12.0

Compare Source

The MongoDB Go Driver Team is pleased to release version 1.12.0 of the official Go driver.

Release Notes

This release adds support for MongoDB 7.0, including production-ready support for Queryable Encryption. It also adds a new logging interface and configuration API improvements.

Production-Ready Queryable Encryption

This release introduces backwards breaking changes to the Queryable Encryption protocol. Using Queryable Encryption now requires MongoDB 7.0+ and libmongocrypt v1.8.0+.

It also adds the new ClientEncryption.CreateEncryptedCollection method to automatically create data encryption keys when creating a new encrypted collection and adds the ability to fetch KMS credentials automatically from Azure, GCP, and AWS environments.

Logging

This release introduces a logging interface to allow users to more easily record detailed information about connection management and command execution within their application.

The logging configuration adds a new LogSink interface that is compatible with the logr.LogSink interface, allowing users to use existing logr adapters, like zerologr or zapr. Users may also implement their own LogSink adapter.

For example, to integrate logging with an existing zerolog logger:

sink := zerologr.New(&myLogger).GetSink()
loggerOptions := options.Logger().SetSink(sink)
options.Client().SetLoggerOptions(loggerOptions)

Logging can also be enabled using environment variables. For example, to enable command logging at info level to client.log, set:

export MONGODB_LOG_COMMAND=info
export MONGODB_LOG_MAX_DOCUMENT_LENGTH=100
export MONGODB_LOG_PATH="client.log"
Convenient BSON Options

The options package has a new way to set various BSON marshaling and unmarshaling behaviors.

For example, to set BSON options that cause the Go driver to fallback to "json" struct tags if "bson" struct tags are missing, marshal nil Go maps as empty BSON documents, and marshals nil Go slices as empty BSON arrays, use the new options.BSONOptions configuration:

bsonOpts := &options.BSONOptions{
	UseJSONStructTags: true,
	NilMapAsEmpty:     true,
	NilSliceAsEmpty:   true,
}
options.Client().SetBSONOptions(bsonOpts)
Convenient Write Concerns

The writeconcern package has new convenience functions Majority, W1, Journaled, and Unacknowledged for creating common write concerns.

For example, to configure a Client to use write concern {w: 1}, use the new writeconcern.W1() function:

options.Client().SetWriteConcern(writeconcern.W1())
Additional Changes
  • Support authenticating with AWS IAM roles in EKS.
  • Add SetBatchSize to Cursor to allow specifying the size of batches fetched from the database when iterating a cursor. It is primarily intended for use with cursors returned by RunCommandCursor.
  • Add bson.UnmarshalValue to allow unmarshaling BSON values that were marshaled using the existing bson.MarshalValue.
  • Deprecate various APIs that will be replaced or removed in Go Driver v2.0.

For a full list of tickets included in this release, please see the links below:

Full Changelog: v1.11.7...1.12.0

Documentation for the Go driver 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 project in the MongoDB JIRA where a list of current issues can be found. Your feedback on the Go driver is greatly appreciated!


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/go.mongodb.org-mongo-driver-1.x branch from 792dda7 to f0ec4e5 Compare July 22, 2023 23:33
@renovate
Copy link
Contributor Author

renovate bot commented Jul 23, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@ZakShearman ZakShearman merged commit aa33fe7 into main Jul 23, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant