Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove outdated 'migrateFromOdo018' method #4255

Closed
vrubezhny opened this issue Jul 3, 2024 · 1 comment · Fixed by #4256
Closed

Remove outdated 'migrateFromOdo018' method #4255

vrubezhny opened this issue Jul 3, 2024 · 1 comment · Fixed by #4256
Assignees
Milestone

Comments

@vrubezhny
Copy link
Contributor

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);
    }
}
@vrubezhny vrubezhny changed the title Remove outdated 'migrateFromOdo018` method Remove outdated 'migrateFromOdo018' method Jul 3, 2024
@vrubezhny
Copy link
Contributor Author

Related to #4226

vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 3, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes funcion 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a nomerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Issue: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 3, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Issue: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
@vrubezhny vrubezhny self-assigned this Jul 3, 2024
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 4, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Issue: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 4, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Issue: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
@vrubezhny vrubezhny added this to the 1.15.0 milestone Jul 4, 2024
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 4, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Fixes: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
vrubezhny added a commit that referenced this issue Jul 5, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: #4255

Fixes: #4255
Fixes: #4226

Signed-off-by: Victor Rubezhny <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant