Aggregation pipeline parsing when importing from text breaks depending on spaces/indentation

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 1.34.0
    • Affects Version/s: None
    • Component/s: Aggregation pipeline
    • None
    • Not Needed
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            Massimiliano Marcon
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: