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

Ssh error #2081

Merged
merged 18 commits into from
Mar 13, 2024
Merged

Ssh error #2081

merged 18 commits into from
Mar 13, 2024

Conversation

ATorrise
Copy link
Contributor

@ATorrise ATorrise commented Mar 6, 2024

What It Does
Fixes #1031 :

  • enables addition of user/password to ssh profile (which will never support apiml) when apimltoken is present in base
  • provides better error message for debugging connectivity to plugins. not possible to be precise as plugins manage themselves differently and it will not always be clear why connectivity is unsuccessful. Failure could be due to any of the 3 options when an apiml token is present:
    • service failure
    • apiml is not supported by that plugin (not easy for us to programatically discern)
    • invalid/expired credentials or properties

How to Test

  • For vscode launch.json
    {
        "type": "node",
        "request": "launch",
        "name": "ssh error",
        "program": "${workspaceFolder}/zowe-cli/packages/cli/lib/main.js",
        "console": "integratedTerminal",
        "args": ["zos-uss", "issue", "ssh", "echo test"],
        "outputCapture": "std",
        "resolveSourceMapLocations": null
    },
  • Regular command:
    zowe zos-uss issue ssh "echo test"

Review Checklist
I certify that I have:

Additional Comments
Handling connectivity errors with other plugins that aren't yet supported by apiml should be a topic for discussion amongst team (ie: CICS and MQ)

Result of PR:
image

New error handling for other plugins apiml doesn't support AND that have yet to implement supportedAuthTypes?: AUTH_TYPE_CHOICES[]
image

@ATorrise ATorrise linked an issue Mar 6, 2024 that may be closed by this pull request
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.93%. Comparing base (4e08fa7) to head (777a558).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2081      +/-   ##
==========================================
- Coverage   90.94%   90.93%   -0.01%     
==========================================
  Files         616      616              
  Lines       17386    17393       +7     
  Branches     3621     3586      -35     
==========================================
+ Hits        15811    15817       +6     
- Misses       1574     1575       +1     
  Partials        1        1              

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

Signed-off-by: Amber Torrise <[email protected]>
Signed-off-by: Amber Torrise <[email protected]>
@zFernand0 zFernand0 self-requested a review March 7, 2024 13:56
@ATorrise ATorrise marked this pull request as ready for review March 7, 2024 14:30
@ATorrise ATorrise requested review from t1m0thyj and awharn March 7, 2024 14:33
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.

To fix #1031 I'm not sure that the error message needs to be changed. I believe for SSH commands we wanted to prompt for user/password if they are missing instead of showing the error (since SSH doesn't support token authentication).

…allback

Co-authored-by: Amber Torrise <[email protected]>

Signed-off-by: Timothy Johnson <[email protected]>
@t1m0thyj t1m0thyj self-requested a review March 8, 2024 20:35
Signed-off-by: Amber Torrise <[email protected]>
Signed-off-by: Amber Torrise <[email protected]>
packages/cli/CHANGELOG.md Outdated Show resolved Hide resolved
packages/zosuss/CHANGELOG.md Show resolved Hide resolved
@t1m0thyj t1m0thyj dismissed their stale review March 12, 2024 14:21

requested changes for errors/prompting have been addressed

Signed-off-by: Amber Torrise <[email protected]>
Signed-off-by: Amber Torrise <[email protected]>
@ATorrise ATorrise changed the title Ssh legible error Ssh error Mar 12, 2024
Copy link
Member

@awharn awharn left a comment

Choose a reason for hiding this comment

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

Just one small comment up for discussion. This implementation looks great! 🚀

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 @ATorrise!

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! 😋
left a small comment re: Andrew's idea 😋

packages/zosuss/src/SshBaseHandler.ts Outdated Show resolved Hide resolved
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 addressing the comment so quickly! 🥳
LGTM! 😋

Copy link

sonarcloud bot commented Mar 13, 2024

@traeok traeok merged commit f3b9cb4 into next Mar 13, 2024
44 checks passed
@traeok traeok deleted the ssh-error branch March 13, 2024 19:30
Copy link

Release succeeded for the next branch. 🎉

The following packages have been published:

Powered by Octorelease 🚀

ATorrise pushed a commit that referenced this pull request Mar 26, 2024
ATorrise added a commit that referenced this pull request Apr 1, 2024
porting changes from original pr #2081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Unexpected command error when using SSH
5 participants