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

fix(error): Check if session is valid before calling proxy setup fn #3428

Merged
merged 8 commits into from
Feb 3, 2025

Conversation

traeok
Copy link
Member

@traeok traeok commented Jan 31, 2025

Proposed changes

Fixes #3425

Also adds two unit tests for CommonApi.getSession because we didn't have any unit tests for it..

Release Notes

Milestone: 3.1.1

Changelog:

  • ZE: Fixed an issue where a TypeError occurred when applying VS Code proxy settings to an invalid session.
  • No changelog for ZE API (only unit tests were added)

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):

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.20%. Comparing base (96370ae) to head (1fd5c46).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3428      +/-   ##
==========================================
+ Coverage   93.18%   93.20%   +0.01%     
==========================================
  Files         120      120              
  Lines       12582    12583       +1     
  Branches     2890     2905      +15     
==========================================
+ Hits        11725    11728       +3     
+ Misses        856      854       -2     
  Partials        1        1              

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

@traeok traeok force-pushed the fix/err/proxy-settings branch from 6f1f6ef to d0bc378 Compare January 31, 2025 15:37
@traeok traeok added the no-changelog Add to PR's that don't require a CHANGELOG update label Jan 31, 2025
@traeok traeok marked this pull request as ready for review January 31, 2025 16:34
Copy link

📅 Suggested merge-by date: 2/14/2025

anaxceron
anaxceron previously approved these changes Jan 31, 2025
JillieBeanSim
JillieBeanSim previously approved these changes Jan 31, 2025
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 @traeok for the fix
We can also add this issue, I tested the scenario I mentioned the other day and this also fixes it
#3415
and this one #3337 😄

@traeok traeok linked an issue Jan 31, 2025 that may be closed by this pull request
@JillieBeanSim
Copy link
Contributor

JillieBeanSim commented Jan 31, 2025

Also, @traeok would you mind creating port PRs for this (once merged) and the other bug fix you mentioned for 3.1.1 please?

@zFernand0 zFernand0 dismissed stale reviews from JillieBeanSim and anaxceron via 1fd5c46 February 3, 2025 18:28
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! 😋

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

@traeok
Copy link
Member Author

traeok commented Feb 3, 2025

The last merge commit into main had all passing stages. Since this last commit will not trigger the ze-build stage, I will bypass branch protections to allow this to be merged.

@traeok traeok merged commit 55bb5fa into main Feb 3, 2025
12 checks passed
@traeok traeok deleted the fix/err/proxy-settings branch February 3, 2025 21:32
@JillieBeanSim JillieBeanSim added this to the v3.1.1 milestone Feb 4, 2025
traeok added a commit that referenced this pull request Feb 5, 2025
…#3428)

* fix: check for valid session before calling proxy setup fn

Signed-off-by: Trae Yelovich <[email protected]>

* tests: CommonApi.getSession, reuse fake profile in other test

Signed-off-by: Trae Yelovich <[email protected]>

* chore: update ZE changelog

Signed-off-by: Trae Yelovich <[email protected]>

* fix: correct expected value in createZoweSchema test

Signed-off-by: Trae Yelovich <[email protected]>

* lint: resolve lint error in test code

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>
traeok added a commit that referenced this pull request Feb 5, 2025
…#3428)

* fix: check for valid session before calling proxy setup fn

Signed-off-by: Trae Yelovich <[email protected]>

* tests: CommonApi.getSession, reuse fake profile in other test

Signed-off-by: Trae Yelovich <[email protected]>

* chore: update ZE changelog

Signed-off-by: Trae Yelovich <[email protected]>

* fix: correct expected value in createZoweSchema test

Signed-off-by: Trae Yelovich <[email protected]>

* lint: resolve lint error in test code

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>
t1m0thyj pushed a commit that referenced this pull request Feb 6, 2025
* fix(error): Check if `session` is valid before calling proxy setup fn (#3428)

* fix: check for valid session before calling proxy setup fn

Signed-off-by: Trae Yelovich <[email protected]>

* tests: CommonApi.getSession, reuse fake profile in other test

Signed-off-by: Trae Yelovich <[email protected]>

* chore: update ZE changelog

Signed-off-by: Trae Yelovich <[email protected]>

* fix: correct expected value in createZoweSchema test

Signed-off-by: Trae Yelovich <[email protected]>

* lint: resolve lint error in test code

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>

* fix: correct expected value in createZoweSchema test

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>
zFernand0 added a commit that referenced this pull request Feb 18, 2025
* run l10n prepublish script

Signed-off-by: Trae Yelovich <[email protected]>

* fix: Avoid data-loss when creating new members (#3392) (#3397)

* fix: Avoid data-loss when creating new members (#3392)

* fix: Prompt users when creating members if the member exists

Signed-off-by: Fernando Rijo Cedeno <[email protected]>

* review: alternative way

Signed-off-by: Fernando Rijo Cedeno <[email protected]>

* test: add coverage for added memberFound logic

Signed-off-by: Fernando Rijo Cedeno <[email protected]>

* chore: update changelog

Signed-off-by: Fernando Rijo Cedeno <[email protected]>

* chore: cleanup commented code

Signed-off-by: Fernando Rijo Cedeno <[email protected]>

* chore: simplify fix 😋

Signed-off-by: Fernando Rijo Cedeno <[email protected]>

* Update packages/zowe-explorer/CHANGELOG.md

Co-authored-by: Trae Yelovich <[email protected]>
Signed-off-by: Fernando Rijo Cedeno <[email protected]>

---------

Signed-off-by: Fernando Rijo Cedeno <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]>

* chore: move the changelog entry to the right location

Signed-off-by: Fernando Rijo Cedeno <[email protected]>

---------

Signed-off-by: Fernando Rijo Cedeno <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]>

* Fix internal error when extenders register new profile types (#3412) (#3416)

* Fix internal error when extenders register new profile types (#3412)

Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Fernando Rijo Cedeno <[email protected]>

* chore: downgrade ubuntu runners to ubuntu-22.04 (#3406)

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Fernando Rijo Cedeno <[email protected]>
Signed-off-by: Trae Yelovich <[email protected]>
Co-authored-by: Timothy Johnson <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]>

* Prepare 3.1.0 release (#3398)

* update lerna and remove un-needed changelog headers

Signed-off-by: Billie Simmons <[email protected]>

* add notes to readme's of VSC for older releases location with link

Signed-off-by: Billie Simmons <[email protected]>

* run package command

Signed-off-by: Billie Simmons <[email protected]>

* chore: downgrade ubuntu runners to ubuntu-22.04

Signed-off-by: Trae Yelovich <[email protected]>

* fix: call Mutex.waitForUnlock instead of locking profile before request (#3409)

* fix: call Mutex.waitForUnlock instead of locking profile before request

Signed-off-by: Trae Yelovich <[email protected]>

* fix: AuthHandler.waitForUnlock

Signed-off-by: Trae Yelovich <[email protected]>

* tests: AuthHandler.waitForUnlock

Signed-off-by: Trae Yelovich <[email protected]>

* fix: add true opt-in support for profile locks w/ extender types

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>

* fix(ds): Pass correct DS name in `stat` when doing remote lookup (#3407)

* fix: use path.basename and helper fn to extract DS name

Signed-off-by: Trae Yelovich <[email protected]>

* test: add unit test to verify proper DS name

Signed-off-by: Trae Yelovich <[email protected]>

* chore: update changelog

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>
Co-authored-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>

---------

Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Trae Yelovich <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Fernando Rijo Cedeno <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]>
Co-authored-by: Timothy Johnson <[email protected]>
Co-authored-by: Fernando Rijo Cedeno <[email protected]>

* fix: update release config to allow minor release (#3419)

Signed-off-by: Trae Yelovich <[email protected]>

* Bump version to 3.1.0 [ci skip]

Signed-off-by: zowe-robot <[email protected]>

* Bump version to 3.2.0-SNAPSHOT [ci skip]

Signed-off-by: zowe-robot <[email protected]>

* Port #3428 into `release/3.1` (prep for 3.1.1 release) (#3435)

* fix(error): Check if `session` is valid before calling proxy setup fn (#3428)

* fix: check for valid session before calling proxy setup fn

Signed-off-by: Trae Yelovich <[email protected]>

* tests: CommonApi.getSession, reuse fake profile in other test

Signed-off-by: Trae Yelovich <[email protected]>

* chore: update ZE changelog

Signed-off-by: Trae Yelovich <[email protected]>

* fix: correct expected value in createZoweSchema test

Signed-off-by: Trae Yelovich <[email protected]>

* lint: resolve lint error in test code

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>

* fix: correct expected value in createZoweSchema test

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>

* Port #3417 Delete Keybinding fix (#3437)

* fix: Pass TreeView selection when node is undefined (#3417)

* fix: pass TreeView selection when node is undefined

Signed-off-by: Richelle Craw <[email protected]>

* fix: move node processing to USSActions

Signed-off-by: Richelle Craw <[email protected]>

---------

Signed-off-by: Richelle Craw <[email protected]>

* run prepublish

Signed-off-by: Billie Simmons <[email protected]>

* fix: correct expected value in createZoweSchema test

Signed-off-by: Trae Yelovich <[email protected]>

---------

Signed-off-by: Richelle Craw <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Trae Yelovich <[email protected]>
Co-authored-by: Richelle Craw <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]>

* update lerna to 3.1.1 (#3436)

Signed-off-by: Billie Simmons <[email protected]>

* Bump version to 3.1.1 [ci skip]

Signed-off-by: zowe-robot <[email protected]>

* Bump version to 3.2.0-SNAPSHOT [ci skip]

Signed-off-by: zowe-robot <[email protected]>

* run package & pretty commands

Signed-off-by: Billie Simmons <[email protected]>

* fix lint

Signed-off-by: Billie Simmons <[email protected]>

---------

Signed-off-by: Trae Yelovich <[email protected]>
Signed-off-by: Fernando Rijo Cedeno <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: zowe-robot <[email protected]>
Signed-off-by: Richelle Craw <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]>
Co-authored-by: Fernando Rijo Cedeno <[email protected]>
Co-authored-by: Timothy Johnson <[email protected]>
Co-authored-by: zowe-robot <[email protected]>
Co-authored-by: Richelle Craw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Add to PR's that don't require a CHANGELOG update size/M
Projects
Status: Closed
5 participants