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

Default preferences values are stored on disk not allowing to override them with application verison update

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.37.0
    • Affects Version/s: None
    • Component/s: Preferences
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • 3
    • Iteration Xantic Sargo, Iteration Zebrafish, Iteration Ankylosaurus, Iteration Brontosaurus
    • Not Needed

      Problem Statement/Rationale

      We want to be able to change default values for application preferences between Compass releases, for example so that we can change whether or not some feature flags are enabled or disabled by default.

      This is currently not possible as on every application start we persist preferences on disk, including default values not changed by the user. This means that on next application start (and after application update) preferences values saved on disk will take precedence over the default values declared on the model

      Steps to Reproduce

      If running development build:

      • Add new preferences property with default value
      • Start application locally and check that default value matches the one defined in code
      • Stop the application
      • Change default value in model definition
      • Start the application again and check the value. You should see that the old default value is still preserved

      With a beta:

      Expected Results

      Default values should change with code changes

      Actual Results

      Default values are persisted on disk and new default values are not picked up

      Additional Notes

      AppPreferences model persists all the properties on disk, even when they were never updated by the user, we probably want to persist them only when they were changed by the user through the UI

            Assignee:
            basit.chonka@mongodb.com Basit Chonka
            Reporter:
            sergey.petushkov@mongodb.com Sergey Petushkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: