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

Display messages before prompting for properties #2123

Merged
merged 10 commits into from
Apr 30, 2024
Merged

Conversation

gejohnston
Copy link
Member

What It Does

Display informative messages identifying why a user is being prompted for connection properties during a CLI command

How to Test

Create a situation where some connection properties are missing. Run a Zowe command. See the messages before the prompts.

Three scenarios exist in which messages are displayed.

  1. You have no configuration of any type. Note that unless your zosmf port is the default 443 value, the command will fail. This is the pre-existing behavior of Zowe CLI.
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: YourHostName
Enter the user name for your service (will be hidden):
Enter the password for your service (will be hidden):
  1. You only have V1 profiles. Same behavior regarding the zosmf port.
zowe zos-files list data-set "SYS1.PARMLIB*"
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: YourHostName
Enter the user name for your service (will be hidden):
Enter the password for your service (will be hidden):
  1. Some properties are missing in your zowe.config.json file. In this example, hostname is missing, and autoStore is true.
zowe zos-files list data-set "SYS1.PARMLIB*"
Some required connection properties have not been specified
in your 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: YourHostName
Stored properties in C:\path\to\your\config\directory\zowe.config.json: host
SYS1.PARMLIB
SYS1.PARMLIB.ARCHIVE
SYS1.PARMLIB.NEW
SYS1.PARMLIBN

Review Checklist
I certify that I have:

Additional Comments

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.98%. Comparing base (f72d69c) to head (1aa48a3).
Report is 2 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2123      +/-   ##
==========================================
+ Coverage   90.96%   90.98%   +0.01%     
==========================================
  Files         618      618              
  Lines       17473    17484      +11     
  Branches     3600     3605       +5     
==========================================
+ Hits        15895    15907      +12     
+ Misses       1577     1576       -1     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 😋

Comment on lines 371 to 372
"Some required connection properties have not been specified\n" +
"in your Zowe client configuration."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question:
What's our stance on arbitrarily wrapping CLI output?

Maybe we can have a quick UX review on this? 😋

Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Gene!

Signed-off-by: Gene Johnston <[email protected]>
Signed-off-by: Gene Johnston <[email protected]>
Copy link

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the TextUtils preferredWidth value with the terminal/process columns 😋

LGTM! 😋

@gejohnston gejohnston merged commit 677a2a2 into next Apr 30, 2024
19 checks passed
@gejohnston gejohnston deleted the msg-before-prompt branch April 30, 2024 13:54
Copy link

Release succeeded for the next branch. 🎉

The following packages have been published:

Powered by Octorelease 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants