[COMPASS-6011] Unable to add data to documents in Compass Created: 14/Aug/22  Updated: 29/Oct/23  Resolved: 25/Aug/22

Status: Closed
Project: Compass
Component/s: Documents
Affects Version/s: 1.32.6
Fix Version/s: 1.33.1

Type: Bug Priority: Major - P3
Reporter: Isaac King Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

See attachments


Attachments: PNG File 1.png     PNG File 10.png     PNG File 2.png     PNG File 3.png     PNG File 4.png     PNG File 5.png     PNG File 6.png     File 62f8b49278aab825e218ef61_log.gz     PNG File 7.png     PNG File 8.png     PNG File 9.png     Text File compass_62f8b49278aab825e218ef61_log.txt    
Issue Links:
Related
related to COMPASS-5528 Compass replaces whole array if you u... Closed
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Isopod

 Description   

Problem Statement/Rationale

What is going wrong? What action would you like the Engineering team to take?

I am getting an error message when trying to add any new data to my document. Doing the exact same operation in Atlas leads to success.

Please be sure to attach relevant logs with any sensitive data redacted.

 

Steps to Reproduce

How could an engineer replicate the issue you’re reporting?

Not sure how? Maybe try to create a collection and document with the same information as I have on a free shared cluster and use Compass to produce the error? Seems to occur each time I create an array with 1 or no object within it as shown in the attached images. I try to delete the array which works and I can recreate it fine. But, when I add new data the error appears.

Expected Results

What do you expect to happen?

expected my document to update with the new fields added to the array.

Actual Results

What do you observe is happening?

I received an error instead of the new fields appearing within my document.

Additional Notes

Any additional information that may be useful to include.



 Comments   
Comment by Githook User [ 28/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): fix updating arrays with dots in names COMPASS-6011 (#3388)

Follow-up to c865b66bd7c4 (#3239), which introduced this bug:
Handle updates to arrays in the case in which the updated array
(or another updated path) contains dots or starts with a dollar sign,
using alternatives to `$getField` and `$setField` which can work on
arrays (`$arrayElemAt` for the former, `$concatArrays` + `$slice` for
the latter).
Branch: update-compass-shell-to-shared-config
https://github.com/mongodb-js/compass/commit/b605d7c9b3d31484ff628ec5bbb4cf4c0ebf99f6

Comment by Githook User [ 31/Aug/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): fix updating arrays with dots in names COMPASS-6011 (#3388)

Follow-up to c865b66bd7c4 (#3239), which introduced this bug:
Handle updates to arrays in the case in which the updated array
(or another updated path) contains dots or starts with a dollar sign,
using alternatives to `$getField` and `$setField` which can work on
arrays (`$arrayElemAt` for the former, `$concatArrays` + `$slice` for
the latter).
Branch: 1.33-releases
https://github.com/mongodb-js/compass/commit/b605d7c9b3d31484ff628ec5bbb4cf4c0ebf99f6

Comment by Githook User [ 30/Aug/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): fix updating arrays with dots in names COMPASS-6011 (#3388)

Follow-up to c865b66bd7c4 (#3239), which introduced this bug:
Handle updates to arrays in the case in which the updated array
(or another updated path) contains dots or starts with a dollar sign,
using alternatives to `$getField` and `$setField` which can work on
arrays (`$arrayElemAt` for the former, `$concatArrays` + `$slice` for
the latter).
Branch: compass-settings
https://github.com/mongodb-js/compass/commit/b605d7c9b3d31484ff628ec5bbb4cf4c0ebf99f6

Comment by Githook User [ 29/Aug/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): fix updating arrays with dots in names COMPASS-6011 (#3388)

Follow-up to c865b66bd7c4 (#3239), which introduced this bug:
Handle updates to arrays in the case in which the updated array
(or another updated path) contains dots or starts with a dollar sign,
using alternatives to `$getField` and `$setField` which can work on
arrays (`$arrayElemAt` for the former, `$concatArrays` + `$slice` for
the latter).
Branch: COMPASS-5971-fix-import-deep-json
https://github.com/mongodb-js/compass/commit/b605d7c9b3d31484ff628ec5bbb4cf4c0ebf99f6

Comment by Githook User [ 29/Aug/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): fix updating arrays with dots in names COMPASS-6011 (#3388)

Follow-up to c865b66bd7c4 (#3239), which introduced this bug:
Handle updates to arrays in the case in which the updated array
(or another updated path) contains dots or starts with a dollar sign,
using alternatives to `$getField` and `$setField` which can work on
arrays (`$arrayElemAt` for the former, `$concatArrays` + `$slice` for
the latter).
Branch: prepare-lg-update-1
https://github.com/mongodb-js/compass/commit/b605d7c9b3d31484ff628ec5bbb4cf4c0ebf99f6

Comment by Githook User [ 26/Aug/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): fix updating arrays with dots in names COMPASS-6011 (#3388)

Follow-up to c865b66bd7c4 (#3239), which introduced this bug:
Handle updates to arrays in the case in which the updated array
(or another updated path) contains dots or starts with a dollar sign,
using alternatives to `$getField` and `$setField` which can work on
arrays (`$arrayElemAt` for the former, `$concatArrays` + `$slice` for
the latter).
Branch: connection-info-modal
https://github.com/mongodb-js/compass/commit/b605d7c9b3d31484ff628ec5bbb4cf4c0ebf99f6

Comment by Githook User [ 25/Aug/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): fix updating arrays with dots in names COMPASS-6011 (#3388)

Follow-up to c865b66bd7c4 (#3239), which introduced this bug:
Handle updates to arrays in the case in which the updated array
(or another updated path) contains dots or starts with a dollar sign,
using alternatives to `$getField` and `$setField` which can work on
arrays (`$arrayElemAt` for the former, `$concatArrays` + `$slice` for
the latter).
Branch: main
https://github.com/mongodb-js/compass/commit/b605d7c9b3d31484ff628ec5bbb4cf4c0ebf99f6

Comment by Githook User [ 25/Aug/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: fix(hadron-document): fix updating arrays with dots in names COMPASS-6011

Follow-up to c865b66bd7c4 (#3239), which introduced this bug:
Handle updates to arrays in the case in which the updated array
(or another updated path) contains dots or starts with a dollar sign,
using alternatives to `$getField` and `$setField` which can work on
arrays (`$arrayElemAt` for the former, `$concatArrays` + `$slice` for
the latter).
Branch: 6011-dev
https://github.com/mongodb-js/compass/commit/b2521796ac11df148845d4613945d08aa1989044

Generated at Wed Feb 07 22:41:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.