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

Issue Unix Command API changes #2866

Merged
merged 4 commits into from
Apr 23, 2024
Merged

Issue Unix Command API changes #2866

merged 4 commits into from
Apr 23, 2024

Conversation

likhithanimma1
Copy link
Contributor

Proposed changes

Making the sshSession parameter optional for issueUnixCommand Api so that profiles that doesn't require ssh can also have it.

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 apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

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 reviewer

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • gif or screenshot is included if visual changes are made
  • yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found
  • I have added necessary documentation (if appropriate)
  • Any PR dependencies have been merged and published (if appropriate)

Further comments

JillieBeanSim and others added 2 commits April 18, 2024 14:55
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
Signed-off-by: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com>
Signed-off-by: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com>
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 91.00000% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 93.47%. Comparing base (505e6c4) to head (8fa0582).

Files Patch % Lines
...es/zowe-explorer/src/command/UnixCommandHandler.ts 90.72% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2866      +/-   ##
==========================================
- Coverage   93.51%   93.47%   -0.05%     
==========================================
  Files         121      121              
  Lines       10732    10740       +8     
  Branches     2246     2249       +3     
==========================================
+ Hits        10036    10039       +3     
- Misses        695      700       +5     
  Partials        1        1              

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

Signed-off-by: likhithanimma1 <142219673+likhithanimma1@users.noreply.github.com>
Copy link

sonarcloud bot commented Apr 22, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
13.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

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.

LGTM, thanks @likhithanimma1!

Tested with this PR and I'm able to issue Unix commands for z/OSMF nodes. If I right-click a zFTP node and try to issue a Unix command, I receive "Not implemented yet" error which I think is expected behavior 👍

Copy link
Contributor

@JillieBeanSim JillieBeanSim 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 @likhithanimma1

@JillieBeanSim JillieBeanSim merged commit 494f759 into next Apr 23, 2024
27 of 28 checks passed
@JillieBeanSim JillieBeanSim deleted the unixCmd-ext-no-ssh branch April 23, 2024 12:28
@zFernand0
Copy link
Member

Apologies in advance for bringing up (again) the conversation about the sshSession being optional.
For context, Trae (#2830 (comment)) and I (#2830 (review)) left a comment on the previous PR.

Since an extender can call the API directly, I'm curious as to why we made sshSession optional without providing a suitable replacement. Here are some examples:

  • with BPXBATCH (may require JCL jobcard construction)
  • with REXX (over TSO commands)

There may be other ways to provide such functionality without requiring an SSH session 😋

Could someone help me understand this a bit better? 😋

@JillieBeanSim
Copy link
Contributor

JillieBeanSim commented Apr 25, 2024

Hey @zFernand0 if there are other ways to issue a unix command using the zosmf profile we can add that, but when this was first discussed as a new functionality using the ssh profile with zosmf was the path forward. Since some extenders don't require the ssh profile to issue unix commands, similar to TSO commands with check of TSO profile for account number, the passing of the session is an optional parameter. I don't believe there would be a replacement value sent for extenders that don't need it since they can grab this.session like other APIs for the service session information on demand.

@zFernand0
Copy link
Member

Thanks for providing more details.
I see, I guess I never considered the possibility to call the ZoweExplorerZosmfApi.issueUnixCommand without a session since it may fail with an ugly cannot read property of undefined 😋

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

Successfully merging this pull request may close these issues.

4 participants