vscode-extension-for-zowe icon indicating copy to clipboard operation
vscode-extension-for-zowe copied to clipboard

feat(ds-list): Allow all datasets to be listed

Open zFernand0 opened this issue 2 years ago • 3 comments

Proposed changes

This PR is intended to resolve most (and hopefully all) issues related to errors that may prevent datasets from being listed in Zowe Explorer

Release Notes

Milestone: 2.5.1

Changelog:

  • Added the ability to list all datasets, even those with Imperative Errors. #235 & #2036
  • Surfaced any errors from a dataset Recall/Migrate operation. #2032
  • New API call dataSetsMatchingPattern to allow filtering datasets via a pattern.

Types of changes

What types of changes does your code introduce to Zowe Explorer? Put an x in the boxes that apply

  • [x] 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

  • [x] I have read the CONTRIBUTOR GUIDANCE wiki
  • [x] PR title follows Conventional Commits Guidelines
  • [x] PR Description is included
  • [ ] gif or screenshot is included if visual changes are made
  • [x] yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • [x] All checks have passed (DCO, Jenkins and Code Coverage)
  • [x] I have added unit test and it is passing
  • [ ] I have added integration test and it is passing
  • [x] There is coverage for the code that I have added
  • [x] I have tested it manually and there are no regressions found
  • [ ] I have added necessary documentation (if appropriate)
  • [x] Any PR dependencies have been merged and published (if appropriate)

Further comments

This PR introduces a way to test any registered command in the extension.ts file. Let's chat 🥳 image

zFernand0 avatar Dec 08 '22 16:12 zFernand0

Codecov Report

Base: 72.21% // Head: 72.30% // Increases project coverage by +0.08% :tada:

Coverage data is based on head (6dcfd3d) compared to base (2cbb8f5). Patch coverage: 95.83% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2038      +/-   ##
==========================================
+ Coverage   72.21%   72.30%   +0.08%     
==========================================
  Files          75       76       +1     
  Lines        7940     7979      +39     
  Branches     1666     1672       +6     
==========================================
+ Hits         5734     5769      +35     
- Misses       2206     2210       +4     
Impacted Files Coverage Δ
...-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts 10.21% <0.00%> (-0.16%) :arrow_down:
...kages/zowe-explorer/src/dataset/ZoweDatasetNode.ts 95.86% <100.00%> (-1.57%) :arrow_down:
packages/zowe-explorer/src/dataset/actions.ts 90.71% <100.00%> (+0.21%) :arrow_up:
packages/zowe-explorer/src/extension.ts 43.79% <100.00%> (+0.74%) :arrow_up:
...ckages/zowe-explorer/src/generators/icons/index.ts 100.00% <100.00%> (ø)
...e-explorer/src/generators/icons/items/fileError.ts 100.00% <100.00%> (ø)
packages/zowe-explorer/src/globals.ts 91.52% <100.00%> (+0.07%) :arrow_up:
packages/zowe-explorer/src/shared/context.ts 98.66% <100.00%> (+0.03%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Dec 12 '22 18:12 codecov[bot]

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs Vulnerability A 0 Vulnerabilities Security Hotspot A 0 Security Hotspots Code Smell A 1 Code Smell

No Coverage information No Coverage information 11.0% 11.0% Duplication

The Code Smell and the duplication are a result of copying the testing structure of other commands. I do believe we could use some refactoring to reduce code duplication in the future.

zFernand0 avatar Dec 13 '22 15:12 zFernand0

SonarCloud Quality Gate failed.    Quality Gate failed Bug A 0 Bugs Vulnerability A 0 Vulnerabilities Security Hotspot A 0 Security Hotspots Code Smell A 1 Code Smell No Coverage information No Coverage information 11.0% 11.0% Duplication

The Code Smell and the duplication are a result of copying the testing structure of other commands. I do believe we could use some refactoring to reduce code duplication in the future.

Working on such refactoring in test/extension-ts

zFernand0 avatar Dec 22 '22 13:12 zFernand0

Will this pull also address issue #1907 which prevents the VSCode "Datasets" listing from succeeding because it does not respect the base or zosmf profile RTO value? Having any more than about 45 distinct datasets in a given HLQ causes the error "timeout receiving response (>30 secs)" and the only alternative is to reduce the number of datasets in that HLQ or use a more restrictive (longer) HLQ. This is not friendly or useful at all.

pjfarleyiii avatar Dec 24 '22 18:12 pjfarleyiii

Will this pull also address issue #1907 which prevents the VSCode "Datasets" listing from succeeding because it does not respect the base or zosmf profile RTO value? Having any more than about 45 distinct datasets in a given HLQ causes the error "timeout receiving response (>30 secs)" and the only alternative is to reduce the number of datasets in that HLQ or use a more restrictive (longer) HLQ. This is not friendly or useful at all.

Hey @pjfarleyiii, After some testing, I'm afraid this PR won't solve #1907 image

We have already been discussing a proper solution which is for the underlying APIs (that Zowe Explorer depends on) to recognize any valid properties specified in your profiles 😋

zFernand0 avatar Jan 05 '23 20:01 zFernand0

I remember discussion about only using the list command without flags for tree then retrieve attributes at a later time. Has this refactor issue been created, and should it be added to v3 epic?

Just created it:

  • https://github.com/zowe/vscode-extension-for-zowe/issues/2077

UPDATE: I misunderstood the initial ask for the future enhancement we wanted to make around the same area. Here is the issue:

  • https://github.com/zowe/vscode-extension-for-zowe/issues/2078

zFernand0 avatar Jan 11 '23 13:01 zFernand0

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
11.2% 11.2% Duplication

sonarqubecloud[bot] avatar Jan 11 '23 18:01 sonarqubecloud[bot]