Skip to content

fixes: Resolve TypeError in ProfilesCache; hide quick pick separators for old VS Code versions#2771

Merged
zFernand0 merged 14 commits into
maintenancefrom
fix/profcache-api-proposal
Mar 19, 2024
Merged

fixes: Resolve TypeError in ProfilesCache; hide quick pick separators for old VS Code versions#2771
zFernand0 merged 14 commits into
maintenancefrom
fix/profcache-api-proposal

Conversation

@traeok

@traeok traeok commented Mar 8, 2024

Copy link
Copy Markdown
Member

Proposed changes

Closes #2787

This PR also resolves 2 issues not documented on ZE repo:

  • Fixed a TypeError that occurred in ProfilesCache.checkMergingConfigAllProfiles when trying to iterate over an array that might not be defined at the time of access
    • Since we had a similar function checkMergingConfigSingleProfile, I refactored the function to use that instead and removed unnecessary error handling
  • Added version checks and filtering on all instances of QuickPickItem[] in Zowe Explorer to handle separators

Release Notes

Milestone: 2.15 (either .0 or .1 depending on time of release)

Changelog:

  • Fixed issue where VS Code quick pick separators were used in environments that did not support the feature.
  • Fixed TypeError encountered when iterating over the "profiles by type" in ProfilesCache.checkMergingConfigAllProfiles.

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)

traeok added 4 commits March 8, 2024 09:49
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
…ge.json

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok changed the title fixes: Resolve TypeError and optimize ProfilesCache.checkMergingConfigAllProfiles; version checking for quick pick separators fixes: Resolve TypeError in ProfilesCache.checkMergingConfigAllProfiles; version checking for quick pick separators Mar 8, 2024
@codecov

codecov Bot commented Mar 8, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 96.29630% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 93.30%. Comparing base (682b6fa) to head (4c34d50).

Files Patch % Lines
packages/zowe-explorer/src/globals.ts 83.33% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           maintenance    #2771      +/-   ##
===============================================
+ Coverage        93.27%   93.30%   +0.03%     
===============================================
  Files              102      102              
  Lines            10582    10575       -7     
  Branches          2276     2202      -74     
===============================================
- Hits              9870     9867       -3     
+ Misses             711      707       -4     
  Partials             1        1              

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

… in Theia

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok marked this pull request as ready for review March 8, 2024 19:47
@traeok traeok changed the title fixes: Resolve TypeError in ProfilesCache.checkMergingConfigAllProfiles; version checking for quick pick separators fixes: Resolve TypeError in ProfilesCache; hide quick pick separators for old VS Code versions Mar 11, 2024
@traeok traeok requested a review from anaxceron March 11, 2024 17:24
anaxceron
anaxceron previously approved these changes Mar 11, 2024

@anaxceron anaxceron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, Trae! Left a couple comments on the changelog items.

Comment thread packages/zowe-explorer-api/CHANGELOG.md Outdated
Comment thread packages/zowe-explorer/CHANGELOG.md Outdated
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Comment thread packages/zowe-explorer/package.json Outdated
Comment thread packages/zowe-explorer/src/dataset/DatasetTree.ts
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok requested a review from t1m0thyj March 12, 2024 12:57
anaxceron
anaxceron previously approved these changes Mar 12, 2024

@anaxceron anaxceron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thank @traeok

t1m0thyj
t1m0thyj previously approved these changes Mar 13, 2024

@t1m0thyj t1m0thyj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks @traeok!

zFernand0
zFernand0 previously approved these changes Mar 13, 2024

@zFernand0 zFernand0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes LGTM! 😋
Thanks for addressing the separators for older versions of VSC

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok force-pushed the fix/profcache-api-proposal branch from e783a86 to f40a368 Compare March 14, 2024 19:23
@traeok traeok requested a review from t1m0thyj March 14, 2024 19:25
zFernand0
zFernand0 previously approved these changes Mar 14, 2024

@zFernand0 zFernand0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! 😋

this.allProfiles.push(...allProfiles);
for (const profs of this.profilesByType.values()) {
profs.forEach((profile) => {
this.checkMergingConfigSingleProfile(profile);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clever way to clean things up a bit! 😋

anaxceron
anaxceron previously approved these changes Mar 14, 2024
@traeok traeok dismissed stale reviews from anaxceron and zFernand0 via 77e2fe3 March 14, 2024 20:16
@traeok traeok force-pushed the fix/profcache-api-proposal branch from 77e2fe3 to f40a368 Compare March 14, 2024 20:25
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok requested review from anaxceron and zFernand0 March 14, 2024 20:29
t1m0thyj
t1m0thyj previously approved these changes Mar 18, 2024

@t1m0thyj t1m0thyj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks @traeok!

zFernand0
zFernand0 previously approved these changes Mar 18, 2024

@zFernand0 zFernand0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! 😋
Curious if we should just update the lerna.json file in this PR? 😅

@JillieBeanSim JillieBeanSim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey @traeok this looks good. Are we planning a patch release and if so should the lerna be updated? I ask because we have been doing development against main and next and publishing from maintenance for minor and patch releases.

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok dismissed stale reviews from zFernand0 and t1m0thyj via 5789f2f March 19, 2024 12:40
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@zFernand0 zFernand0 merged commit 67bfed5 into maintenance Mar 19, 2024
@zFernand0 zFernand0 deleted the fix/profcache-api-proposal branch March 19, 2024 13:48
@github-actions

Copy link
Copy Markdown

Release succeeded for the maintenance branch. 🎉

The following packages have been published:

Powered by Octorelease 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants