Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5928

Aggregation Pipeline tab erases stages and shows "An error occurred while rendering AggregationsPlugin: Line 4: Unexpected token ILLEGAL" error

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: 1.32.2
    • Component/s: Aggregation pipeline
    • None
    • Environment:
      macos 12.3.1
    • Not Needed
    • None

      Problem Statement/Rationale

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

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

      Recovery from Aggregation pipeline editing could be more graceful.

      Steps to Reproduce

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

      Example documents were like the following but with different string dates.

      { _id: 1,| |lastName: 'Smith',| |firstName: 'Chris',| |lastBilledDate: '2022-05-02',| |dateRecorded: '2022-05-08' }

       

      Had 2 pipeline aggregation stages.

      1st stage was: 

      {{{ $match:{ $expr:{ $gte:["$dateRecorded", "$lastBilledDate"] }} }}}

      2nd stage was being edited with the goal of changing to either $group or $count. Screen erased content, got the error message, and there is no "Back", "Undo", or some way to retrieve the previous state.

      "An error occurred while rendering AggregationsPlugin: Line 4: Unexpected token ILLEGAL"

      Expected Results

      What do you expect to happen?

      Allow me to correct the error in the pipeline or continue editing my existing aggregation pipeline. Content should remain the same.

      It was not clear what was the keypress or change that prompted this error.

      Errors in aggregation pipeline should not erase content (stages).

      Actual Results

      What do you observe is happening?

      Previous state (Agg pipeline edit mode) was erased and only error is displayed.

      Switching to different tabs and returning to Aggregation tab does not return to "clean" Aggregation Pipeline screen. Has no effect.

      Only clicking the database name in left-hand menu, then clicking "Aggregations" tab returns me back to where I was.

      Additional Notes

      Any additional information that may be useful to include.

      Ctrl-z / Undo and Ctrl-y / Redo command would be a nice feature.

        1. image-2022-06-30-14-52-26-163.png
          214 kB
          Felicia Hsieh
        2. Screen Shot 2022-06-30 at 3.09.42 PM.png
          255 kB
          Felicia Hsieh

            Assignee:
            Unassigned Unassigned
            Reporter:
            felicia.hsieh@mongodb.com Felicia Hsieh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: