[COMPASS-6525] Default preferences values are stored on disk not allowing to override them with application verison update Created: 15/Feb/23  Updated: 29/Oct/23  Resolved: 11/May/23

Status: Closed
Project: Compass
Component/s: Preferences
Affects Version/s: None
Fix Version/s: 1.37.0

Type: Bug Priority: Major - P3
Reporter: Sergey Petushkov Assignee: Basit Chonka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS:
node.js / npm versions:
Additional info:


Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Xantic Sargo, Iteration Zebrafish, Iteration Ankylosaurus, Iteration Brontosaurus

 Description   

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



 Comments   
Comment by Githook User [ 20/May/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(user-preferences): feature flag default values COMPASS-6525 (#4364)
Branch: COMPASS-6664-guide-cue-stage-wizard
https://github.com/mongodb-js/compass/commit/31abf18df128b2d9f69d8326d344181d65953c2d

Comment by Githook User [ 15/May/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(user-preferences): feature flag default values COMPASS-6525 (#4364)
Branch: 1.37-releases
https://github.com/mongodb-js/compass/commit/31abf18df128b2d9f69d8326d344181d65953c2d

Comment by Githook User [ 11/May/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(user-preferences): feature flag default values COMPASS-6525 (#4364)
Branch: try-mongodb-client-encryption-2.8.0-alpha.1
https://github.com/mongodb-js/compass/commit/31abf18df128b2d9f69d8326d344181d65953c2d

Comment by Githook User [ 11/May/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(user-preferences): feature flag default values COMPASS-6525 (#4364)
Branch: test-read-6.0-QE
https://github.com/mongodb-js/compass/commit/31abf18df128b2d9f69d8326d344181d65953c2d

Comment by Githook User [ 11/May/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(user-preferences): feature flag default values COMPASS-6525 (#4364)
Branch: main
https://github.com/mongodb-js/compass/commit/31abf18df128b2d9f69d8326d344181d65953c2d

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