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

Bump mongodb from 2.0.0-alpha to 2.0.0-beta #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 16, 2023

Bumps mongodb from 2.0.0-alpha to 2.0.0-beta.

Release notes

Sourced from mongodb's releases.

v2.0.0-beta

Description

The MongoDB Rust driver team is pleased to announce the v2.0.0-beta release of the driver. This release contains a number of breaking changes, API improvements, new features, and bug fixes. We do not intend to make any further breaking changes before the v2.0.0 stable release, though we may do so if needed.

Highlighted breaking changes

The following sections detail some of the more important breaking changes included in this release. For a full list of changes, see the Full Release Notes section.

Update version of bson to v2.0.0-beta

The exported version of bson was updated to v2.0.0-beta, which includes its own set of breaking changes. Check out the bson release notes for more information.

Ensure API meets the Rust API Guidelines (RUST-765)

There is a community-maintained list of API guidelines that every stable Rust library is recommended to meet. The driver's current API wasn't conforming to these guidelines exactly, so a number of improvements were made to ensure that it does. Here we highlight a few of the more important changes made in this effort.

Various error API improvements (RUST-739, RUST-765)

Several improvements were made to the ErrorKind enum according to the guidelines to provide a more consistent and stable API:

  • The variants no longer wrap error types from unstable dependencies (C-STABLE)
  • The variant are named more consistently (C-WORD-ORDER)
    • Drop redundant Error suffix from each variant name
  • Redundant error variants were consolidated

The total list of breaking changes is as follows:

  • All error variants dropped the "Error" suffix (e.g. ErrorKind::ServerSelectionError => ErrorKind::ServerSelection)
  • ErrorKind::ArgumentError => ErrorKind::InvalidArgument
    • ErrorKind::InvalidHostname => removed, consolidated into ErrorKind::InvalidArgument
  • ErrorKind::BsonDecode => ErrorKind::BsonDeserialization
  • ErrorKind::BsonEncode => ErrorKind::BsonSerialization
  • ErrorKind::ResponseError => ErrorKind::InvalidResponse
  • ErrorKind::DnsResolve(trust_dns_resolver::error::ResolveError) => ErrorKind::DnsResolve { message: String }
    • ErrorKind::InvalidDnsName => removed, consolidated into ErrorKind::DnsResolve
    • ErrorKind::NoDnsResults => removed, consolidated into ErrorKind::DnsResolve
    • ErrorKind::SrvLookupError => removed, consolidated into ErrorKind::DnsResolve
    • ErrorKind::TxtLookupError => removed, consolidated into ErrorKind::DnsResolve
  • ErrorKind::RustlsConfig(rustls::TLSerror) => ErrorKind::InvalidTlsConfig { message: String }
    • ErrorKind::ParseError => removed, consolidated into ErrorKind::InvalidTlsConfig
  • ErrorKind::WaitQueueTimeoutError => removed, the wait_queue_timeout option is no longer supported (RUST-757)
  • ErrorKind::OperationError => removed, consolidated into ErrorKind::InvalidResponse and ErrorKind::Internal as appropriate

Stabilize or eliminate public dependencies on unstable types (C-STABLE, RUST-739)

The driver included types from a number of unstable (pre-1.0) dependencies in its public API, which presented a problem for the stability of the driver itself. tokio was one such example of this, which is why when it went 1.0, the driver needed a 2.0 release. In an effort to ensure that the driver will no longer be subject to the semver breaks of unstable dependencies and can stay on 2.0 for the foreseeable future, the public dependencies on unstable types were removed altogether or stabilized such that they will always be present.

Here are the notable changes made as part of that:

  • Cursor types now implement the Stream trait from futures-core rather than futures.
    • futures-core will be moving directly to 1.0 next, whereas futures may have several semver-incompatible versions.
    • The 2.0 version of the driver will continue to depend on futures-core 0.3 (current release), even after futures-core 1.0 is released and/or the Stream trait is included in the standard library. The cursor types will also implement each of the Stream traits from futures-core 1.0 and std as necessary, and users can depend on and import the one they wish to use.

... (truncated)

Commits
  • dfb484b release v2.0.0-beta
  • 974c663 RUST-808 Update bson dependency to 2.0.0-beta
  • f9bc73f RUST-796 Provide easy way to reborrow session in between cursor iterations (#...
  • 993f2c9 RUST-760 Refactor the StreamAddress struct to ServerAddress enum (#339)
  • 93c4554 RUST-765 Update broken usages of BSON library (#340)
  • bfb8c27 RUST-757 Remove wait_queue_timeout option (#338)
  • 79d2782 RUST-786 Update collation fields to use custom types (C-CUSTOM-TYPE)
  • 18cfdb3 RUST-788 Use impl AsRef<str> instead of &str (C-GENERIC)
  • 9cb7dc6 RUST-791 use PathBuf instead of String for paths (C-CUSTOM-TYPE)
  • ec07245 RUST-765 Depend on futures subcrates instead of futures (C-STABLE)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [mongodb](https://github.com/mongodb/mongo-rust-driver) from 2.0.0-alpha to 2.0.0-beta.
- [Release notes](https://github.com/mongodb/mongo-rust-driver/releases)
- [Commits](mongodb/mongo-rust-driver@v2.0.0-alpha...v2.0.0-beta)

---
updated-dependencies:
- dependency-name: mongodb
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants