zowe-cli
zowe-cli copied to clipboard
Zowe CLI does not support some upgrade/migration scenarios
I see three problems when it comes to upgrading a Zowe CLI plugin:
(1) When you installed a Zowe plugin as a tgz file you cannot use the zowe plugins update command to provide a new tgz file. It only seems to be working with npm registries.
(2) When you installed a Zowe plugin as a tgz file you cannot use the uninstall command if you do not have still the original old tgz file in the exact same download location as where you installed it from:
C:\Users\user1\Downloads\> zowe plugins uninstall pluginABC
npm ERR! code ENOENT
npm ERR! syscall stat
npm ERR! path C:\Users\user1\Downloads\pluginABC.tgz
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, stat 'C:\Users\user1\Downloads\pluginABC.tgz'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
It should be possible to uninstall via command line without the need to keep the old distribution.
(3) When uninstall a CLI plugin it profiles directory and meta files are kept in place, which is a good thing when the user wants to upgrade. However, when installing the new version it seems that the meta files does not get replaced with a new version. This might be because if the meta schema changes also all the profiles needs to be migrated to the new schema. How can that be accomplished?
Regarding (2), this is an issue with NPM, not with Zowe CLI. It is not well documented online but there are a few mentions of it like here:
You get an error if you install a package from a tarball, delete the tarball, then try to uninstall the package.
~~Regarding (2), it looks like an issue was opened on the npm github a few years ago, but doesn't look like it's been worked on yet.~~
~~https://github.com/npm/npm/issues/20687~~
Edit: just realized that that repo has been archived and moved. Doesn't look like the new repo has an issue opened for this problem yet.
https://github.com/npm/cli/issues?q=is%3Aissue+is%3Aopen+uninstall+tgz
Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.
Thank you for raising this enhancement request. The community has 90 days to vote on it. If the enhancement receives at least 5 upvotes, it is added to our development backlog. If it receives fewer votes, the issue is closed.