Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1859

Can ISODate support both the old and new behaviours?

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.3.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Developer Tools
    • 2
    • Not Needed

      Message from ben.leembruggen@mongodb.com on Slack:

      https://mongodb.slack.com/archives/CG1N06M1C/p1724033289601979

      It seems that aligning the behaviour of ISODate in @mongodb-js/shell-bson-parser for Compass broke some customer scripts. This PR is the one that aligns the shell-bson-parser to do what mongosh does: https://github.com/mongodb-js/ejson-shell-parser/pull/199

      It seems that, according to MONGOSH-354, this is the actual desired behaviour, and it should work similar as the old mongo shell.

      We should investigate if we actually want to support the old behaviour and implement it.

      Context from Ben:

      We are currently using the ejson-shell-parser on both frontend and backend of the charts application, using this package to parse untrusted MQL provided by our users as part of the chart builder.
      Queries can be saved to be used as part of a chart, so any breaking change moving from ejson-shell-parser to @mongodb-js/shell-bson-parser will result in existing queries no longer being valid (breaking the customers chart).
      This is what has been identified since the isoDateRegex changes, any charts that contain queries with the above scenarios will now throw an error if we move to @mongodb-js/shell-bson-parser
      

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            kevin.mas@mongodb.com Kevin Mas Ruiz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: