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

DRIVERS-3011 test relaxed encoding of dates after year 9999 #1676

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kevinAlbs
Copy link
Contributor

@kevinAlbs kevinAlbs commented Oct 17, 2024

Summary

Test encoding dates after year 9999 with Relaxed Extended JSON

Background & Motivation

The extended JSON spec notes:

BSON 1.1 Type or Convention Canonical Extended JSON Format Relaxed Extended JSON Format
...
Datetime [year before 1970 or after 9999] {"$date": {"$numberLong": <64-bit signed integer giving millisecs relative to the epoch, as a string>}} <Same as Canonical Extended JSON>

This tests reveals a bug in the C driver encoding: CDRIVER-5759.

As a drive-by fix, missing \ escapes were added to < characters in the Conversion table:

Before:
before
After:
after

Please complete the following before merging:

- [ ] Update changelog.
- [ ] Make sure there are generated JSON files from the YAML test files.

  • Test changes in at least one language driver. Verified by C driver tests with fix
    - [ ] Test these changes against all server versions and topologies (including standalone, replica set, sharded
    clusters, and serverless).

@kevinAlbs kevinAlbs changed the title Test Relaxed Extended JSON representation of dates after year 9999 DRIVERS-3011 test Relaxed Extended JSON encoding of dates after year 9999 Oct 17, 2024
@kevinAlbs kevinAlbs changed the title DRIVERS-3011 test Relaxed Extended JSON encoding of dates after year 9999 DRIVERS-3011 test relaxed encoding of dates after year 9999 Oct 17, 2024
@kevinAlbs kevinAlbs marked this pull request as ready for review October 17, 2024 22:02
@kevinAlbs kevinAlbs requested a review from a team as a code owner October 17, 2024 22:02
@kevinAlbs kevinAlbs requested review from dariakp and removed request for a team October 17, 2024 22:02
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