Skip to content

Remove outdated 'migrateFromOdo018' method #4255

@vrubezhny

Description

@vrubezhny

The method migrateFromOdo018 looks outdated and doesn't perform properly the migration of ODO preferences:

  • odo-config.yaml ODO Global Preference file is not used anymore: a long time ago it was renamed to config.yaml and then later it was renamed again to preference.yaml (See: Renamed global preference file to preference.yaml from config.yaml odo#1784)
  • I'm pretty sure that the allowed preference key names also have changed since then, so we cannot just copy the old file to ~/.odo/preference.yaml in order to migrate properly.

So,the following method looks like non-functional anymore and is to be removed from the extension activation:

function migrateFromOdo018(): void {
    const newCfgDir = path.join(Platform.getUserHomePath(), '.odo');
    const newCfg = path.join(newCfgDir, 'odo-config.yaml');
    const oldCfg = path.join(Platform.getUserHomePath(), '.kube', 'odo');
    if (!fsx.existsSync(newCfg) && fsx.existsSync(oldCfg)) {
        fsx.ensureDirSync(newCfgDir);
        fsx.copyFileSync(oldCfg, newCfg);
    }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions