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

feat: Introduce integrated terminal #3079

Merged
merged 70 commits into from
Jan 9, 2025
Merged

feat: Introduce integrated terminal #3079

merged 70 commits into from
Jan 9, 2025

Conversation

zFernand0
Copy link
Member

@zFernand0 zFernand0 commented Aug 29, 2024

Proposed changes

Introduces the MVS, TSO, and Unix command handlers as integrated terminals

How to test

  1. Build from source (or download the artifact from the latest build)
  2. Enable the Use Integrated Terminals setting
    image
  3. Issue commands 😋

Release Notes

Milestone: 3.1.0

Changelog: Introduces the MVS, TSO, and Unix command handlers as integrated terminals

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds or improves functionality)
  • Breaking change (a change that would cause existing functionality to not work as expected)
  • Documentation (Markdown, README updates)
  • Other (please specify above in "Proposed changes" section)

Checklist

General

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • All PR dependencies have been merged and published (if applicable)
  • A GIF or screenshot is included in the PR for visual changes
  • The pre-publish command has been executed:
    • v2 and below: yarn workspace vscode-extension-for-zowe vscode:prepublish
    • v3: pnpm --filter vscode-extension-for-zowe vscode:prepublish

Code coverage

  • There is coverage for the code that I have added
  • I have added new test cases and they are passing
  • I have manually tested the changes

Deployment

  • I have added developer documentation (if applicable)
  • Documentation should be added to Zowe Docs
    • If you're an outside contributor, please post in the #zowe-doc Slack channel to coordinate documentation.
    • Otherwise, please check with the rest of the squad about any needed documentation before merging.
  • These changes may need ported to the appropriate branches (list here):

Further comments

Merged and published:

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 93.36016% with 33 lines in your changes missing coverage. Please review.

Project coverage is 93.17%. Comparing base (ee5f9e6) to head (ee113df).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/zowe-explorer/src/commands/UnixCommandHandler.ts 88.09% 10 Missing ⚠️
...es/zowe-explorer/src/commands/TsoCommandHandler.ts 77.77% 8 Missing ⚠️
...es/zowe-explorer/src/commands/MvsCommandHandler.ts 83.87% 5 Missing ⚠️
.../zowe-explorer/src/commands/ZoweCommandProvider.ts 96.55% 4 Missing ⚠️
...-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts 66.66% 3 Missing ⚠️
packages/zowe-explorer/src/tools/ZoweTerminal.ts 98.95% 2 Missing ⚠️
...ckages/zowe-explorer/src/configuration/Profiles.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3079      +/-   ##
==========================================
+ Coverage   93.12%   93.17%   +0.05%     
==========================================
  Files         119      120       +1     
  Lines       12374    12487     +113     
  Branches     2682     2764      +82     
==========================================
+ Hits        11523    11635     +112     
- Misses        850      851       +1     
  Partials        1        1              

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

@zFernand0 zFernand0 self-assigned this Aug 29, 2024
@adam-wolfe adam-wolfe added this to the v3.1.0 milestone Sep 3, 2024
@zFernand0 zFernand0 mentioned this pull request Sep 5, 2024
15 tasks
Copy link

sonarqubecloud bot commented Sep 16, 2024

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarCloud

Signed-off-by: Fernando Rijo Cedeno <[email protected]>
…nto feat/int-term

Signed-off-by: Fernando Rijo Cedeno <[email protected]>
Signed-off-by: Fernando Rijo Cedeno <[email protected]>
Signed-off-by: Fernando Rijo Cedeno <[email protected]>
@zFernand0 zFernand0 marked this pull request as ready for review December 18, 2024 18:36
@zFernand0
Copy link
Member Author

Thanks @adam-wolfe and @traeok for testing.
I've just added a few more edge cases (with modifier keys) and made the "exit" approach the same as the node shell/interpreter 🙏
(To exit, press Ctrl+C again or Ctrl+D or type .exit) 😋

Trae, the ENV vars is a good catch.
As long as you split it in separate commands, it should work just fine.
Also, to resolve ENV vars, I believe echo requires "
MY_CUSTOM_VAR=world; echo "Hello $MY_CUSTOM_VAR"

@t1m0thyj t1m0thyj linked an issue Dec 23, 2024 that may be closed by this pull request
traeok
traeok previously approved these changes Jan 7, 2025
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 Fernando! I think folks are going to love the new UX 😋

I noticed after approving that there is a conflict, but I'll re-approve if needed!

Signed-off-by: Fernando Rijo Cedeno <[email protected]>
@zFernand0 zFernand0 requested a review from traeok January 8, 2025 20:18
Signed-off-by: Fernando Rijo Cedeno <[email protected]>
@adam-wolfe
Copy link
Contributor

Kind of an edge case, but if you have a config where the SSH profile has a secure array separate from your z/OSMF profile(s) like this:

"$schema": "./zowe.schema.json",
    "profiles": {
        "lpar1": {
            "properties": {
                "host": "...",
                "port": ...,
                "tokenType": "apimlAuthenticationToken"
            },
            "profiles": {
                "zosmf": {
                    "type": "zosmf",
                    "properties": {
                        "basePath": "..."
                    }
                },
                "ssh": {
                    "type": "ssh",
                    "properties": {
                        "port": ...
                    },
                    "secure": [
                        "user",
                        "password"
                    ]
                }
            },
            "secure": [
                "tokenValue"
            ]
        },

If your SSH password expires, you will get the error: [ERROR] Error preparing SSH connection for issuing UNIX commands, please check SSH profile for correctness.

It would be helpful to be told that authentication failed.

Also, the only way to update the SSH profile password is through zowe config secure using Zowe CLI, which is not ideal.

Signed-off-by: Fernando Rijo Cedeno <[email protected]>
@JillieBeanSim JillieBeanSim requested a review from traeok January 9, 2025 13:44
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.

thanks for the continuous work on this huge addition @zFernand0 I think it is looking good for a beta that has to be opted in to use. I do see things with issuing UNIX commands like cd-ing/traversing to new path doesn't work similiar to an ssh session but shouldn't hold up this work and can be a separate followup story along with edge cases mentioned.

@JillieBeanSim
Copy link
Contributor

@zFernand0 did you want to write a Medium blog or something to help raise awareness for how to opt in, use and any extender information for adoption?

@zFernand0
Copy link
Member Author

Hey Billie,
Thanks for the review 🙏

thanks for the continuous work on this huge addition @zFernand0 I think it is looking good for a beta that has to be opted in to use. I do see things with issuing UNIX commands like cd-ing/traversing to new path doesn't work similiar to an ssh session but shouldn't hold up this work and can be a separate followup story along with edge cases mentioned.

I still want to try and come up with a proper solution for Adam's edge case, but might do it as a separate PR 😋

@zFernand0 did you want to write a Medium blog or something to help raise awareness for how to opt in, use and any extender information for adoption?

That's a really good point! 🙏
I do think that people will benefit from a blog. That way we can showcase the functionality and also its current limitations 🙏

@zFernand0
Copy link
Member Author

Thanks for the reviews!
I believe this feature was only possible with your patience and careful attention to detail! 🙏

Merging! 🥳

@zFernand0 zFernand0 merged commit c0469cb into main Jan 9, 2025
37 checks passed
@zFernand0 zFernand0 deleted the feat/int-term branch January 9, 2025 15:05
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.

Add support for integrated terminals (MVS, SSH, TSO)
6 participants