Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#2914 closed bug (Fixed)

Config migration, file format and default config

Reported by: Bro Owned by:
Priority: minor Milestone: 2.0.0
Component: Core Version: develop
Keywords: Cc:

Description

The current config system supports registering migration functions to migrate old configs to new formats. I migration function will migrate from earlier file format versions resulting in a new config with a higher file version.

If an existing config file does not exist, the config is populated with the default values, however, there is no way to indicate which versions the default values correspond to. The result is that the file version is set to 1 for fresh configs, before the migration functions are called. This requires the default config dict to never change, in order to be compatible with what the migration functions expect.

A solution to this is to add a parameter to specify the file version of the default config dict so that when a config file does not exist on disk, the migration functions are not run because the config file format will already be the latest version.

Change History (2)

comment:1 by Calum, 8 years ago

Milestone: needs verified2.0
Resolution: Fixed
Status: newclosed

Fixed in develop: [4d3cf756e46cdbc]

comment:2 by Calum, 6 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.