-
Notifications
You must be signed in to change notification settings - Fork 92
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
Implemented unix command #2515
Implemented unix command #2515
Conversation
@likhithanimma1 shouldn't this point to the zowe:next branch? |
Yes |
await Profiles.getInstance().checkCurrentProfile(profile); | ||
} | ||
if (Profiles.getInstance().validProfile !== ValidProfileEnum.INVALID) { | ||
session = ZoweExplorerApiRegister.getUssApi(profile).getSession(); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable
failNotFound: false, | ||
}; | ||
|
||
const profileTwo: imperative.IProfileLoaded = { |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## next #2515 +/- ##
==========================================
- Coverage 92.95% 92.91% -0.04%
==========================================
Files 108 109 +1
Lines 9898 10083 +185
Branches 2053 2107 +54
==========================================
+ Hits 9201 9369 +168
- Misses 696 713 +17
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Likhitha Nimma <[email protected]>
a34145c
to
29467b8
Compare
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
packages/zowe-explorer/i18n/sample/src/command/UnixCommandHandler.i18n.json
Outdated
Show resolved
Hide resolved
Signed-off-by: Likhitha Nimma <[email protected]>
Requested changes have been addressed
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving some comments here after looking over the code, still planning to test functionality.
I wonder if we should begin registering ssh profiles since it would be required to do UNIX cmds via zosmf profiles, as well as zftp profiles if we choose to add the functionality there too. This addition may be out of scope for this PR though.
CodeCov warnings that can be addressed should be, like the unused variable notifications.
Should we have a limit on stored commands, some items stored in history use the global values for save limit. Also, should we make the different types of commands have their own history so we don't see MVS & TSO commands from history show with the UNIX commands?
This could also be handled in a separate PR but wanted to bring it up for discussion.
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM! thanks @likhithanimma1 for adding this awesome feature for v3 and thanks for addressing all our concerns and requests
Signed-off-by: Likhitha Nimma <[email protected]>
packages/zowe-explorer/CHANGELOG.md
Outdated
|
||
## TBD Release | ||
|
||
- Added the Issue UNIX Commands feature. [#1326](https://github.com/zowe/vscode-extension-for-zowe/issues/1326) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get this changelog moved to top of file please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes moved to the top
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the missing ssh
profiles from the quick pick @likhithanimma1! I'm now seeing the ssh
profiles in that list as expected.
However, after selecting my SSH profile and entering a path, an error dialog appears saying that Zowe Explorer tried to call a non-existing Common API:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@likhithanimma1 Thanks for implementing this new feature 🙂
A few comments:
- In the quickpick I would expect z/OSMF profiles to be excluded from the list:
I think we can useProfileManagement.getRegisteredProfileNameList
to filter the profile list, but his may depend on Check if profile is registered to tree the action relies on for quickpick list #2539 which is being merged into "next" in [next] Merge from maintenance with 2.12.1 & 2.12.2 #2588. - For the path prompt, can we make entering a path optional? If no path is entered, we could default to the user home directory (
~
) which matches the behavior of SSH.
I agree with that. Maybe we can add those back whenever we leverage the z/OSMF APIs for dealing with z/OS Unix commands |
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Signed-off-by: Likhitha Nimma <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @likhithanimma1 for this new functionality and for addressing all of the feedback
I think it makes sense to offer the profile selection as a future enhancement - since the current logic selects the default SSH profile regardless of what a user chooses in this quick pick, can we hide/comment this out until profile selection is supported? The quick pick might inspire confusion from end users if it doesn't respect their selection. |
@traeok this profile quick pick is offered when the user chooses to issue command from the command palette. Yes if only using zosmf profiles it seems redundant but if using an extender profile, the extender may not have the api yet or the extender doesn't require ssh connection to issue unix command. There are a lot of variables when looking at it from an extender's pov. Also, the procedure follows other issue command procedures from the command palette like TSO & MVS. This PR has the basic functionality with extender's in mind and can be built upon in future, progress over perfection especially with the v3 work. With future PRs we can add checks and handling of multiple ssh profiles, we can even update the procedure to check for extender types and if only zosmf profiles or all types require ssh profile then proceed with default or offer ssh profile option. There are many ways to build on top of this work, but it's good to go ahead and get basic functionality in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JillieBeanSim Thank you for clarifying on extenders, I did not fully realize the scenario for extenders that do not require SSH for Unix commands.
Since a default SSH profile would be a pre-requisite for profile types that don't support UNIX commands out of the box, we might want to mention this behavior in Zowe Docs for awareness. Otherwise users might try to execute Unix commands through a z/OSMF profile without having a default SSH profile set in their config.
I also realize that there is still a good bit of time before v3 GA, so the behavior or UX may change in the future.
@anaxceron tagging for reference regarding v3 readiness/feature doc 😅
Thanks @likhithanimma1 for this feature & addressing the feedback! Tested and working as expected, this is an awesome addition for v3 😋 LGTM
Proposed changes
Implemented "Issue Unix Command" feature in Zowe Explorer
Release Notes
Milestone:
Changelog:
Types of changes
What types of changes does your code introduce to Zowe Explorer?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the revieweryarn workspace vscode-extension-for-zowe vscode:prepublish
has been executedFurther comments