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(ProfileUtils.ts): remove redundant isTheia() function in favor of global variable #2636

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

ArvindParekh
Copy link
Contributor

@ArvindParekh ArvindParekh commented Dec 21, 2023

Proposed changes

Fixes #2412

  • Removed the isTheia() function, since we already have globals.ISTHEIA that can be checked to determine whether we're running in a Theia environment.
  • Replaced the occurences of isTheia() with globals.ISTHEIA

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

@t1m0thyj t1m0thyj added the no-changelog Add to PR's that don't require a CHANGELOG update label Dec 22, 2023
traeok

This comment was marked as outdated.

@traeok traeok dismissed their stale review January 3, 2024 14:23

Didn't notice a test stage was failing

@traeok traeok self-requested a review January 3, 2024 14:23
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.

Hi @ArvindParekh,

I realized shortly after approving that some unit tests are failing - looks like its related to some Jest mocks for the removed ProfileUtils.isTheia function. Once those are resolved I will approve 👍

@JillieBeanSim JillieBeanSim added this to the v2.14.0 milestone Jan 3, 2024
@traeok
Copy link
Member

traeok commented Jan 10, 2024

SonarCloud code duplication resurfaced from old tests, no new duplication to worry about 😋
Fixed the broken unit tests from this change - also, I found a Theia test that was not working properly in utils.unit.test.ts, so I resolved that as well.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2b723f3) 93.30% compared to head (699b2da) 93.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2636      +/-   ##
==========================================
- Coverage   93.30%   93.28%   -0.03%     
==========================================
  Files         102      102              
  Lines       10506    10499       -7     
  Branches     2251     2250       -1     
==========================================
- Hits         9803     9794       -9     
- Misses        702      704       +2     
  Partials        1        1              

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

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.

Changes make sense to me
LGTM! 😋

Thanks @ArvindParekh and @traeok 😋

@ArvindParekh
Copy link
Contributor Author

Perfect :)
Thanks for the support @traeok 👍🏻

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

20.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@zFernand0 zFernand0 merged commit d8214e3 into zowe:main Jan 12, 2024
18 of 19 checks passed
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
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Remove isTheia function from ProfileUtils
5 participants