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

VSC Proxy Support #3291

Merged
merged 34 commits into from
Nov 25, 2024
Merged

VSC Proxy Support #3291

merged 34 commits into from
Nov 25, 2024

Conversation

JillieBeanSim
Copy link
Contributor

@JillieBeanSim JillieBeanSim commented Nov 4, 2024

Proposed changes

Needed: update of SDKs with zowe/zowe-cli#2330

instructions on installing/configuring squid proxy

Release Notes

Milestone: 3.1.0

Changelog:

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

@JillieBeanSim JillieBeanSim self-assigned this Nov 4, 2024
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.09%. Comparing base (07232b7) to head (9e1b653).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3291      +/-   ##
==========================================
+ Coverage   93.07%   93.09%   +0.01%     
==========================================
  Files         116      117       +1     
  Lines       12109    12129      +20     
  Branches     2783     2784       +1     
==========================================
+ Hits        11271    11291      +20     
  Misses        837      837              
  Partials        1        1              

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


🚨 Try these New Features:

Signed-off-by: Billie Simmons <[email protected]>
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Nov 4, 2024
@pull-request-size pull-request-size bot added size/L and removed size/XL labels Nov 5, 2024
Signed-off-by: Billie Simmons <[email protected]>
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Nov 6, 2024
Signed-off-by: Billie Simmons <[email protected]>
Copy link

Reminder: This pull request has a merge-by date coming up within the next 24 hours. Please review this PR as soon as possible.

@t1m0thyj @zFernand0 @rudyflores @SanthoshiBoyina1 @likhithanimma1

zFernand0
zFernand0 previously approved these changes Nov 21, 2024
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! 😋

Found an interesting things since I had forgotten to start my proxy server (or connect to VPN at all) 😋


If you proxy is down (or you are unable to connect to the mainframe in general), and you have datasets already added to your workspace...
It seems that Zowe Explorer takes a very, very long time to load, when in reality it is just waiting for the timeout to happen and the user only sees a bunch of errors on the output channel (not indicating what truly happened and what the request was, unless you had previously enabled "trace" level logs).

[2024/11/21 05:11:59] [ERROR] Failed to send an HTTP request.
[2024/11/21 05:11:59] [ERROR] Failed to send an HTTP request.
[2024/11/21 05:13:14] [ERROR] Failed to send an HTTP request.
[2024/11/21 05:13:14] [ERROR] Failed to send an HTTP request.

Same goes for other server errors like invalid certificates in the chain which we surface as 503 Service Unavailable.

[2024/11/21 05:19:33] [ERROR] Rest API failure with HTTP(S) status 503
[2024/11/21 05:19:33] [ERROR] Rest API failure with HTTP(S) status 503
[2024/11/21 05:19:33] [ERROR] Rest API failure with HTTP(S) status 503
[2024/11/21 05:19:33] [ERROR] Rest API failure with HTTP(S) status 503

Ideally we show more error details as to what these requests were (in the logs)

👀 @JillieBeanSim @t1m0thyj @traeok
Want to get your thoughts on this since this may be impacting end-users today 😢

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.

forgot one review comment

packages/zowe-explorer-api/src/profiles/ProfilesCache.ts Outdated Show resolved Hide resolved
@JillieBeanSim
Copy link
Contributor Author

LGTM! 😋

Found an interesting things since I had forgotten to start my proxy server (or connect to VPN at all) 😋

If you proxy is down (or you are unable to connect to the mainframe in general), and you have datasets already added to your workspace... It seems that Zowe Explorer takes a very, very long time to load, when in reality it is just waiting for the timeout to happen and the user only sees a bunch of errors on the output channel (not indicating what truly happened and what the request was, unless you had previously enabled "trace" level logs).

[2024/11/21 05:11:59] [ERROR] Failed to send an HTTP request.
[2024/11/21 05:11:59] [ERROR] Failed to send an HTTP request.
[2024/11/21 05:13:14] [ERROR] Failed to send an HTTP request.
[2024/11/21 05:13:14] [ERROR] Failed to send an HTTP request.

Same goes for other server errors like invalid certificates in the chain which we surface as 503 Service Unavailable.

[2024/11/21 05:19:33] [ERROR] Rest API failure with HTTP(S) status 503
[2024/11/21 05:19:33] [ERROR] Rest API failure with HTTP(S) status 503
[2024/11/21 05:19:33] [ERROR] Rest API failure with HTTP(S) status 503
[2024/11/21 05:19:33] [ERROR] Rest API failure with HTTP(S) status 503

Ideally we show more error details as to what these requests were (in the logs)

👀 @JillieBeanSim @t1m0thyj @traeok Want to get your thoughts on this since this may be impacting end-users today 😢

I think this could be part of the Error enhancement work we have going on and can create a follow up story to make sure all errors are at a higher log level than trace for sure.

@traeok
Copy link
Member

traeok commented Nov 21, 2024

If you proxy is down (or you are unable to connect to the mainframe in general), and you have datasets already added to your workspace... It seems that Zowe Explorer takes a very, very long time to load, when in reality it is just waiting for the timeout to happen and the user only sees a bunch of errors on the output channel (not indicating what truly happened and what the request was, unless you had previously enabled "trace" level logs).

[2024/11/21 05:11:59] [ERROR] Failed to send an HTTP request.
<snip>

👀 @JillieBeanSim @t1m0thyj @traeok Want to get your thoughts on this since this may be impacting end-users today 😢

As an alternative to fetching workspace items when Zowe Explorer opens, we can show a notification that we've detected Zowe Explorer resources and offer a "Fetch" button so that they are fetched on-demand. However, if we don't load the virtual workspace at the time its opened, the explorer pane will mark those items in yellow and put an exclamation point beside each one until they are fetched.

That said, I wouldn't be opposed to this behavior, and I also think this might serve as a short-term fix for some edge cases we were seeing with 401 errors in a workspace

zFernand0
zFernand0 previously approved these changes Nov 21, 2024
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 considering the feedback.
Let's chat during standup 🙏

still LGTM! 😋

packages/zowe-explorer-api/src/profiles/ProfilesCache.ts Outdated Show resolved Hide resolved
@JillieBeanSim
Copy link
Contributor Author

opened the following issues from discussion:

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.

Thanks for the changes regarding the session parameter 👍 LGTM

@JillieBeanSim JillieBeanSim merged commit 3e75cfe into main Nov 25, 2024
23 checks passed
@JillieBeanSim JillieBeanSim deleted the vsc-proxy-support branch November 25, 2024 13:34
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.

4 participants