Opened 7 years ago

Closed 7 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:


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 Changed 7 years ago by Cas

  • Milestone changed from needs verified to 2.0
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in develop: [4d3cf756e46cdbc]

comment:2 Changed 6 years ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.