[COMPASS-4887] Aggregation pipeline parsing when importing from text breaks depending on spaces/indentation Created: 18/Jun/21  Updated: 29/Oct/23  Resolved: 27/Oct/22

Status: Closed
Project: Compass
Component/s: Aggregation pipeline
Affects Version/s: None
Fix Version/s: 1.34.0

Type: Bug Priority: Minor - P4
Reporter: Massimiliano Marcon Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Epic Link: COMPASS-5403
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Narwhal

 Description   

It seems that at least in $group stages, the wrong indentations create issues to the parser.

A quick investigation showed that acorn returns different output depending on the indentation. We are using acorn-loose, which in their README says:

It will, to recover from missing brackets, treat whitespace as significant, which has the downside that it might mis-parse a valid but weirdly indented file. It is recommended to always try a parse with the regular acorn parser first, and only fall back to this parser when that one finds syntax errors.

We should probably do that.


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