-
Notifications
You must be signed in to change notification settings - Fork 129
General: Store settings by OpenPype version #2570
General: Store settings by OpenPype version #2570
Conversation
Task linked: OP-2361 Store settings by OpenPype version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am missing info about currently used settings version. In most cases it will match version of OpenPype , but for those few when it is not so, or you need to test something, it would be helpful to be able to select version.
Also we need to handle production and staging versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once users click on any project in the settings, it is not possible to go back to default project settings The UI is not reacting, however, it is possible to switch to another project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The notification about obsolete version should be more explicit for the user.
In this case I'm running 3.8.2 with old settings, but the only indication of that fact is the orange colour. We should be explicit like
Your settings are loaded from an older version: 3.8.1-nightly.2
Tooltip should then describe what to do.
Please check that all settings are still correct (blue colour indicates potential changes in the new version) and save your settings to update them to you current running OpenPype version.
Fixed
Removed border around version and move it next to Save button. Current state: |
Brief Description
Settings are stored by OpenPype version.
Description
This PR changes how settings are stored and loaded. All settings documents have one additional key
"version"
. If settings for current OpenPype version are not available then it looks for latest available version from the other available settings versions but never higher. Since new key was added and backwards compatibility must be kept the settings type was changed to<previous type>_versioned
(e.g.system_settings_versioned
). If there are not OpenPype settings with any version document with legacy key is used. The versioned settings documents are created at the moment of saving in settings UI or headless saving withSystemSettingsEntity
orProjectSettingsEntity
. When they are created they will be used for the version so any changes from previous version settings won't be propagated anymore.How the settings lookup works
Simple example
Version numbers here are just samples!
Imagine this feature is available since 1.0.1 and there are 3 versions of system settings in database.
What will be loaded
What will be saved
Which version is lower/higher?
Version order is defined by
OpenPypeVersion
class in igniter which follows semantic versioning. No matter if is staging or production.How does it work in hosts where OpenPypeVersion is not available
OpenPype process store ordered versions into mongo so it is possible to sort available versions by them.
Changes
Note
This PR requires to have newer OpenPype build otherwise can't compare versions.
Screenshots
Settings UI
Require new build dialog
So when build does not support
OpenPypeVersion
class dialog telling user to update installation is shown.