Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.
This repository was archived by the owner on Oct 18, 2022. It is now read-only.

Design and Implement Configuration Migration #134

@jpdillingham

Description

@jpdillingham

Presently the ConfigurationManager stores strongly typed configuration models in the configuration file. Should a downstream asset update its model, the ConfigurationManager needs a way to migrate the previous configuration to the new model.

Initial thoughts are to implement a ConfigurationMigration/IConfigurationMigration to be used with the Discoverer. Implementations could have [ToVersion] and [FromVersion] attributes, allowing the ConfigurationManager to determine which migration to apply.

Migrations should be additive in that an upgrade from 1.0 to 3.0 should apply migrations for 1.0 -> 2.0, then from 2.0 -> 3.0. A migration setup for this scenario might look like the following:

[FromVersion(1.0.0.0)]
[ToVersion(2.0.0.0)]
public Migration1to2 : IConfigurationMigration { }

[FromVersion(2.0.0.0)]
[ToVersion(3.0.0.0)]
public Migration2to3 : IConfigurationMigration { }

The ConfigurationManager would need to collect all migrations and examine the versioning attributes to ensure an upgrade path is available. After migration is complete the deprecated configuration would be removed from the config (and probably backed up somewhere).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions