-
Notifications
You must be signed in to change notification settings - Fork 87
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
Issues seen with ConvertV1Profiles.convert() when trying to adopt #2170
Comments
Thank you for creating a bug report. |
We have no immediate answer regarding this failure. Places to start investigating include:
Regarding your question about uninstalling the old SCS plugin, either I misunderstand your question, or there is some confusion about terminology. There are two separate actions “delete” old V1 profiles from disk, and “uninstall” the old SCS plugin. Your logic can decide whether to do one action, both actions, or neither action. A private function named ConvertV1Profiles.deleteV1Profiles() deletes old V1 profiles from disk. A caller of ConvertV1Profiles.convert() specifies whether or not to delete the old V1 profiles by passing the optional parameter convertOpts.deleteV1Profs = true. So, this action can be done by ConvertV1Profiles.convert as you choose. This gives you option of asking the user whether they want to delete their old V1 profiles or not, before you call ConvertV1Profiles.convert. A function named uninstall (from within imperative) does the actual uninstall of the SCS plugin. I think that this is the function that you were referring to about being private. Because uninstall() is exported, I thought it would be available to you. My mistake. The imperative index.ts files to not make the uninstall function externally accessible. The ConvertV1Profiles.convert function cannot call this function for you, because unavoidable circular dependencies occur when I originally attempted that. In retrospect, we probably should not make that uninstall function externally available. That would enable any plugin or extender to uninstall any plugin, which is inappropriate and probably dangerous. I think we should create a new function named UninstallObsoleteScsPlugin(). We can make that function externally available. The CLI command handler would be modified to call that new function. ZE could also call that new function. If I have interpreted this part of your issue correctly, I think this would be our best approach. Unless you see a problem with this approach, we will pursue it after we determine why new zowe.config.json and zowe.scheme.json files are not being created for you. |
We were able to place a temporary hack into a local copy of Zowe CLI, which can be quickly rebuilt to initialize with either the CLI’s Imperative.init() function or with the ZE-focused ProfileInfo initialization. When initialized with ProfileInfo, the CLI reproduces the problem of not creating the new Zowe config files. The ConvertV1Profiles.convert function does report errors within the object that it returns. That message is:
Our approach will be to initialize additional required information within ProfileInfo, so that ZE has a workable environment. The good news is that we have a workable test-bed to make changes and debug in CLI with an environment similar to ZE. |
Closed by PR #2182. The 2 external behavior changes are:
|
Describe the bug
While trying to adopt the 8.0.0-next.202405241828 for Zowe Explorer and updating the breaking changes around converting v1 profiles with ConvertV1Profiles.convert() we are seeing that the converted information isn't being written to a file and the schema file isn't being created. Looking over the code it seems it should be handled. I tested this on macOS and Windows with same result. I also see that the handler is handling the removal of the SCS plugin, but the delete method it relys on is not public for extenders. I agree with it not being public but if that's the case should the ConvertV1Profiles.convert() handle this check and delete if needed for extenders.
Expected and actual results
Details about the behavior:
Describe your environment
Additional context
The text was updated successfully, but these errors were encountered: