Skip to content

CXX-3302 Update bsoncxx validation examples (CDRIVER-5710, CDRIVER-6017) #1416

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

Merged
merged 6 commits into from
Jun 12, 2025

Conversation

eramongodb
Copy link
Contributor

@eramongodb eramongodb commented Jun 12, 2025

Followup to mongodb/mongo-c-driver#2026 which addressed CDRIVER-5710 and CDRIVER-6017. The changes in mongodb/mongo-c-driver@d184525 affect a couple assertions in the C++ Driver examples which demonstrate use of bsoncxx::v_noabi::validate() including the expected error offsets. Because the offsets are now changed/fixed, these examples need to be updated to run successfully.

This PR bumps the C Driver version to 2.0.2 for auto-downloads and EVG testing only. It does not bump the minimum required C Driver version for downstream users. We can also raise the minimum required C Driver version for downstream users if that is preferable (CXX-3302), but I do not think it is necessary at this time.

Alternatively we can defer applying this PR until the minimum required C Driver version for downstream users is bumped instead (e.g. when C Driver 2.1.0 is released).

Drive-by fix: also adds a missing import (followup to #1413) to address EVG config generator errors.

@eramongodb eramongodb requested a review from kevinAlbs June 12, 2025 16:31
@eramongodb eramongodb self-assigned this Jun 12, 2025
@eramongodb eramongodb requested a review from a team as a code owner June 12, 2025 16:31
@@ -14,7 +14,7 @@
# Only MONGOC_DOWNLOAD_VERSION needs to be updated when pinning to an unreleased commit.
# If pinning to an unreleased commit, create a "Blocked" JIRA ticket with
# a "depends on" link to the appropriate C Driver version release ticket.
MONGOC_VERSION_MINIMUM = '2.0.0'
MONGOC_VERSION_MINIMUM = '2.0.2'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also raise the minimum required C Driver version for downstream users if that is preferable (CXX-3302), but I do not think it is necessary at this time.

I am open to debate, but I slightly prefer bumping the minimum required version to 2.0.2.

I see three distinct versions:

  1. MONGOC_VERSION_MINIMUM is the tested version in CI.
  2. MONGOC_DOWNLOAD_VERSION is the automatically downloaded version.
  3. MONGOC_REQUIRED_VERSION is the required version.

I expect these do not strictly need to match, as is proposed in this PR. However, only bumping tested+downloaded means tests fail with the minimum required C driver. That may be unlikely to impact users, but bumping all to 2.0.2 avoids the possibility. The other benefit: upgrading to C++ driver 4.1.0 (with minimum C driver 2.0.2) is guaranteed to have the bug fix of CDRIVER-6017.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Included a reference to CXX-3302 for tracking purposes.

@eramongodb eramongodb changed the title Update bsoncxx validation examples for CDRIVER-5710 and CDRIVER-6017 CXX-3302 Update bsoncxx validation examples (CDRIVER-5710, CDRIVER-6017) Jun 12, 2025
@eramongodb eramongodb requested a review from kevinAlbs June 12, 2025 17:44
@eramongodb eramongodb merged commit bf7554c into mongodb:master Jun 12, 2025
16 of 17 checks passed
@eramongodb eramongodb deleted the cxx-examples branch June 12, 2025 18:30
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.

2 participants