zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
108 stars 85 forks source link

Display a reason why the CLI prompts for host, port, etc #2115

Closed gejohnston closed 2 months ago

gejohnston commented 2 months ago

Is your feature or enhancement request related to a problem or limitation? Please describe

When no configuration is found, the current CLI behavior is to prompt for connection properties as shown below:

zowe zos-files list data-set "SYS1.PARMLIB*"
Enter the host name of your service:

This is a necessary and appropriate prompt, but the user may have no idea why they are being prompted.

Describe your enhancement idea

A brief explanation before such a prompt would be beneficial. For example:

zowe zos-files list data-set "SYS1.PARMLIB*"
No Zowe client configuration exists.
Therefore, you will be asked for the connection properties
that are required to complete your command.

Enter the host name of your service:

If the user only had V1 profiles in place during V2, the V1 profiles would automatically be used. In V3, V1 profiles are ignored. In V3, if the user only has V1 profiles in place, the user will get the same un-described prompt as shown below. This could be even more confusing for customers who were used to V1 profiles automatically working.

zowe zos-files list data-set "SYS1.PARMLIB*"
Enter the host name of your service:

This situation could also be addressed with a slightly modified description when only V1 profiles exist, as follows:

zowe zos-files list data-set "SYS1.PARMLIB*"
No Zowe client configuration exists.
Only V1 profiles exist. V1 profiles are no longer supported.
You should convert your V1 profiles to a newer Zowe client configuration.
Therefore, you will be asked for the connection properties
that are required to complete your command.

Enter the host name of your service:

Describe alternatives you've considered

Provide any additional context

Both of the 2 new prompts are already implemented in ConnectionPropsForSessCfg. However, the changes are currently comment-out because the changes cause 219 unit test failures and 144 system tests failures due to differences in output. Thus, the implementation effort is trivial, but the test updates will take much more work.

The current behavior would not be considered an error, so the priority of this enhancement would be considered low. The only urgency for this enhancement is that it would be a breaking change and will have to be implemented before V3 is released.

github-actions[bot] commented 2 months ago

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.

gejohnston commented 2 months ago

Implemented by pull request "Display messages before prompting for properties" #2123