Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

zowe plugins enhancement #852

Merged
merged 14 commits into from
Oct 6, 2022
Merged

zowe plugins enhancement #852

merged 14 commits into from
Oct 6, 2022

Conversation

namanpatel1112
Copy link
Contributor

@namanpatel1112 namanpatel1112 commented Jul 13, 2022

Created new command zowe plugins firststeps <my-plugin>. Once a plugin is installed, a user can separately run zowe plugins firststeps <my-plugin> to instruct them if additional steps are needed to enable the plugin to function. If no first steps are defined for <my-plugin>, then the output from running the firststeps command will indicate that no additional steps are needed, and the user can start using <my-plugin>. First steps are defined by plugin developers in imperative.ts within the zowe-cli-sample-plugin repo.

Resolves zowe/zowe-cli#1325

@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Base: 89.02% // Head: 89.09% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (423880a) compared to base (5c1a821).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #852      +/-   ##
==========================================
+ Coverage   89.02%   89.09%   +0.06%     
==========================================
  Files         200      202       +2     
  Lines       10802    10827      +25     
  Branches     2415     2420       +5     
==========================================
+ Hits         9617     9646      +29     
+ Misses       1185     1181       -4     
Impacted Files Coverage Δ
...imperative/src/plugins/PluginManagementFacility.ts 92.91% <ø> (+0.52%) ⬆️
...ns/cmd/showfirststeps/showfirststeps.definition.ts 100.00% <100.00%> (ø)
...ugins/cmd/showfirststeps/showfirststeps.handler.ts 100.00% <100.00%> (ø)
packages/rest/src/client/AbstractRestClient.ts 87.45% <0.00%> (+0.73%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@namanpatel1112 namanpatel1112 changed the title add command definition and handler zowe plugins enhancement Jul 19, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jul 20, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

10.0% 10.0% Coverage
0.0% 0.0% Duplication

@AmandaDErrico AmandaDErrico force-pushed the 1325-zowe-plugins-enhancement branch 2 times, most recently from c7c198a to bcfa375 Compare September 1, 2022 19:06
@AmandaDErrico AmandaDErrico marked this pull request as ready for review September 15, 2022 20:16
Copy link
Member

@gejohnston gejohnston left a comment

Choose a reason for hiding this comment

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

I am a little confused about the behavior. The implementation appears to implement a separate zowe plugins firststeps command. However, the comments before the pluginFirstSteps?: string; definition states the following which implies that the first steps are shown in the help.

"You can assign the first steps to the plugin that is showed in the root level help for the core CLI."

I do not object to either approach (I can see value in either one). I would find it helpful (for review purposes) if you edited the PR's initial conversation comment to provide a thorough description of the intended behavior, maybe a sample of the command, and identify edge cases like:

  • Will it show up in the help?
  • Will it only be displayed when the user types a zowe plugins firststeps command?
  • Should the firststeps command be automatically run by the zowe plugins install command?
  • Should the zowe plugins install command print a message telling the user to consider running the zowe plugins firststeps command?
  • What will the zowe plugins firststeps command do when a plugin does not have the pluginFirstSteps property defined?

I am not currently requesting that any of the above items be implemented. I am just asking for clarification about what the currently implemented command will do in these cases.

@AmandaDErrico
Copy link
Contributor

I am a little confused about the behavior. The implementation appears to implement a separate zowe plugins firststeps command. However, the comments before the pluginFirstSteps?: string; definition states the following which implies that the first steps are shown in the help.

"You can assign the first steps to the plugin that is showed in the root level help for the core CLI."

I do not object to either approach (I can see value in either one). I would find it helpful (for review purposes) if you edited the PR's initial conversation comment to provide a thorough description of the intended behavior, maybe a sample of the command, and identify edge cases like:

* Will it show up in the help?

* Will it only be displayed when the user types a `zowe plugins firststeps` command?

* Should the firststeps command be automatically run by the `zowe plugins install` command?

* Should the `zowe plugins install` command print a message telling the user to consider running the `zowe plugins firststeps` command?

* What will the `zowe plugins firststeps` command do when a plugin does not have the pluginFirstSteps property defined?

I am not currently requesting that any of the above items be implemented. I am just asking for clarification about what the currently implemented command will do in these cases.

Thanks Gene, I've updated the PR description. I've also clarified the pluginFirstSteps documentation in IImperativeConfig.

Copy link
Member

@gejohnston gejohnston 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 the clarification. Everything you state as an objective looks right in the code to me.

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

Please fix lint warnings in IImperativeConfig.ts. Everything else LGTM, I'll wait to approve since we're awaiting feedback from @anaxceron on what the command name should be 🙂

@anaxceron
Copy link

anaxceron commented Sep 26, 2022

Please fix lint warnings in IImperativeConfig.ts. Everything else LGTM, I'll wait to approve since we're awaiting feedback from @anaxceron on what the command name should be 🙂

@AmandaDErrico @t1m0thyj @gejohnston @zFernand0

I think a good solution here would be "takefirststeps."

I think going w/ something like "getstarted" is a bit vague, whereas "takefirststeps" lets you know right away that (1) you may be dealing w/ a sequence of actions, and (2) it involves action you want to take at the initial phase of your set up, rather than something that takes place later on.

Otherwise, I was thinking "beginfirststeps" or "startfirstepts," but ultimately I thought having two words that relate to beginnings/starts/initiations came off as redundant.

I also thought "triggerfirststeps" could work, but I wondered if it implied that the "first steps" would only happen in the back end.

I'm open to any option, but wanted to explain my preference for "takefirststeps." Hope this helps.

@gejohnston
Copy link
Member

I will suggest a slight alternative, which never occurred to me until Ana's three word suggestion of "takefirstSteps".

Since this command only displays instructions, my suggestion would be "show-first-steps". I suggest the dashes because dashes are used in most of our other multi-word parameters, so it would be consistent.

@anaxceron
Copy link

I will suggest a slight alternative, which never occurred to me until Ana's three word suggestion of "takefirstSteps".

Since this command only displays instructions, my suggestion would be "show-first-steps". I suggest the dashes because dashes are used in most of our other multi-word parameters, so it would be consistent.

@AmandaDErrico @t1m0thyj @gejohnston @zFernand0: I think this is the best option.

namanpatel1112 and others added 12 commits September 26, 2022 16:47
Signed-off-by: namanpatel1112 <namanpatel1112@gmail.com>
Signed-off-by: namanpatel1112 <namanpatel1112@gmail.com>
Signed-off-by: namanpatel1112 <namanpatel1112@gmail.com>
Signed-off-by: namanpatel1112 <namanpatel1112@gmail.com>
Signed-off-by: namanpatel1112 <namanpatel1112@gmail.com>
Signed-off-by: Amanda D'Errico <amanda.derrico@ibm.com>
Signed-off-by: Amanda D'Errico <amanda.derrico@ibm.com>
Signed-off-by: Amanda D'Errico <amanda.derrico@ibm.com>
Signed-off-by: Amanda D'Errico <amanda.derrico@ibm.com>
Signed-off-by: Amanda D'Errico <amanda.derrico@ibm.com>
Signed-off-by: Amanda D'Errico <amanda.derrico@ibm.com>
Signed-off-by: Amanda D'Errico <amanda.derrico@ibm.com>
Signed-off-by: Amanda D'Errico <amanda.derrico@ibm.com>
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.

Changes LGTM! 😋

Left a question in the comments.

Other questions:

  • Should we update the sample-plugin to showcase this new feature ?
  • Should this be a best practice for V3 conformance criteria ?

* @type {string}
* @memberof IImperativeConfig
*/
pluginFirstSteps?: string;
Copy link
Member

Choose a reason for hiding this comment

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

Text input here seems ok.
I'm curious if we would eventually support a custom "handler" (similar to pluginHealthCheck) that gives more flexibility to plugin developers on what they can do for the users in terms of setup/configuration.

Signed-off-by: Amanda D'Errico <40764145+AmandaDErrico@users.noreply.github.com>
@sonarcloud
Copy link

sonarcloud bot commented Oct 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@zFernand0 zFernand0 merged commit f9963b3 into master Oct 6, 2022
@zFernand0 zFernand0 deleted the 1325-zowe-plugins-enhancement branch October 6, 2022 17:51
@zFernand0 zFernand0 added the release-minor Indicates a minor feature has been added label Oct 6, 2022
@github-actions github-actions bot added released and removed release-minor Indicates a minor feature has been added labels Oct 6, 2022
@zFernand0 zFernand0 added release-minor Indicates a minor feature has been added and removed released labels Oct 7, 2022
@github-actions github-actions bot removed the release-minor Indicates a minor feature has been added label Oct 7, 2022
@zFernand0 zFernand0 added the release-minor Indicates a minor feature has been added label Oct 7, 2022
@awharn awharn added release-minor Indicates a minor feature has been added and removed release-minor Indicates a minor feature has been added labels Oct 7, 2022
@gejohnston gejohnston added release-minor Indicates a minor feature has been added and removed release-minor Indicates a minor feature has been added labels Oct 7, 2022
@zFernand0 zFernand0 added release-minor Indicates a minor feature has been added and removed release-minor Indicates a minor feature has been added released labels Oct 7, 2022
@t1m0thyj t1m0thyj added release-minor Indicates a minor feature has been added and removed release-minor Indicates a minor feature has been added labels Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-minor Indicates a minor feature has been added released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend zowe plugins verbs to show information for a plugin's first steps
7 participants