[GODRIVER-3081] Empty slice no longer encoding/decoding as nil in 1.13.0 and 1.12.2 Created: 02/Jan/24 Updated: 07/Feb/24 Resolved: 01/Feb/24 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | 1.13.0, 1.12.2, 1.13.1 |
| Fix Version/s: | 1.13.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | James Hartig | Assignee: | Qingyang Hu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Documentation Changes: | Not Needed | ||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||
| Description |
Detailed steps to reproduce the problem?See attached test.go file. When inserting an empty slice, it would previously end up being decoded as nil but after Definition of done: what must be done to consider the task complete?The Release Notes should be updated to denote this change in 1.13.x and an option should be added to restore the old behavior. It should be removed from 1.12.x as I believe it's a breaking change. The exact Go version used, with patch level:$ go version This is happening with 1.22rc1 and 1.21.5. The exact version of the Go driver used:$ go list -m go.mongodb.org/mongo-driver
I tested with 1.31.0, 1.31.1, 1.12.0 and every commit in between to determine when it broke. Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.N/A The operating system and version (e.g. Windows 7, OSX 10.8, ...)N/A Security VulnerabilitiesIf you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here |
| Comments |
| Comment by Githook User [ 07/Feb/24 ] |
|
Author: {'name': 'Qingyang Hu', 'email': '103950869+qingyang-hu@users.noreply.github.com', 'username': 'qingyang-hu'}Message: |
| Comment by Githook User [ 01/Feb/24 ] |
|
Author: {'name': 'Qingyang Hu', 'email': '103950869+qingyang-hu@users.noreply.github.com', 'username': 'qingyang-hu'}Message: |
| Comment by PM Bot [ 02/Jan/24 ] |
|
Hi james@getadmiral.com, thank you for reporting this issue! The team will look into it and get back to you soon. |