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

feat(v3): FileSystemProvider implementation for Data Sets, USS and Jobs #2777

Merged
merged 235 commits into from
Apr 19, 2024

Conversation

traeok
Copy link
Member

@traeok traeok commented Mar 12, 2024

Proposed changes

Check out the new page on ZE wiki for details on FSP infrastructure: https://github.com/zowe/zowe-explorer-vscode/wiki/FileSystemProvider

  • Implement the FileSystemProvider and add tests
    • Base provider (for extenders to leverage to create their own providers 😋)
    • Data Sets tree
    • USS tree
      • Drag and drop (same LPAR)
      • Drag and drop (same LPAR)
      • Drag and drop (different LPARs) - stretch goal
        • Files
        • Folders
    • Jobs tree
  • Implement the onResourceChanged function to allow extenders to watch FileSystemProvider changes
    • Extenders can add event listeners to each one of these events returned by the command.

Misc. changes:

  • Added a zowe.placeholderCommand command so that we can disable items in the tree view 😋
    • this is helpful for the "no data sets found" and similar nodes that we create to give information
    • they will be greyed out now to differentiate between an "actionable node" and a placeholder/disabled one
  • Added a MockedProperty class to clean up mocked properties defined using Object.defineProperty
  • Added confirmation dialogs for Pulling from Mainframe and changing encoding if the contents are unsaved in the editor

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)

t1m0thyj and others added 30 commits October 20, 2023 14:51
Co-authored-by: Trae Yelovich <traeok@users.noreply.github.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Co-authored-by: Trae Yelovich <traeok@users.noreply.github.com>
Co-authored-by: Fernando Rijo Cedeno <zFernand0@users.noreply.github.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
…gement

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>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
- added uploadBufferAsFile for FTP api
- updated getContents to support "stream" (writing and reading from temp file) over FTP
- updates to drag & drop for extender support

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>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
…ptions in file context menu

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
…flict path

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
…elocated doc on move

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
…es if removed

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
…ider

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>
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>
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>
….TreeItem

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
…mon logic

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>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok requested a review from t1m0thyj April 10, 2024 19:14
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
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.

Trying to compare V2 with this PR and found something a bit strange when opening empty spool files 😋

The following spool file open just fine (with no content) in V2
image

But the same spool file fails to load in this PR:
image

Not sure if this affects other areas though 😋

@traeok
Copy link
Member Author

traeok commented Apr 11, 2024

Trying to compare V2 with this PR and found something a bit strange when opening empty spool files 😋
The following spool file open just fine (with no content) in V2
But the same spool file fails to load in this PR
Not sure if this affects other areas though 😋

@zFernand0 Hmm... this must be specific to empty spool files, as although I am able to open all of my spool files, they all have contents. I can also open both empty data sets and empty USS files.

Thanks for reporting this, I'll take a look 😅

Update: I think this should be resolved with eec408c, I noticed a fallback was missing for nullish buffer contents

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@zFernand0 zFernand0 self-requested a review April 11, 2024 21:52
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
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.

When saving a USS file opened via an FTP profile, the save operation hangs for me.

Everything else LGTM - tested misc actions with both z/OSMF and FTP 😁

packages/zowe-explorer/package.json Show resolved Hide resolved
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok
Copy link
Member Author

traeok commented Apr 15, 2024

When saving a USS file opened via an FTP profile, the save operation hangs for me.

Everything else LGTM - tested misc actions with both z/OSMF and FTP 😁

Thanks @t1m0thyj, resolved in bb4f232

@traeok traeok requested a review from t1m0thyj April 15, 2024 13:23
@traeok traeok dismissed zFernand0’s stale review April 15, 2024 13:43

Bug fix was implemented to resolve requested changes

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.

Since I am traveling and had some VPN issues, I noticed that error messages have changed when a ds search fails. Not sure if the change in behavior is intentional? I think this could be addressed as a separate issue, and plan to approve the PR once my connection is fixed 😋

Before After
zOSMF image image
zFTP image image

@t1m0thyj
Copy link
Member

Since I am traveling and had some VPN issues, I noticed that error messages have changed when a ds search fails. Not sure if the change in behavior is intentional? I think this could be addressed as a separate issue, and plan to approve the PR once my connection is fixed 😋

Discussed with @traeok, the zFTP resourceUri error was a red herring because the extension hadn't finished loading yet. For the change in zOSMF error message I filed a separate issue: #2847

@traeok traeok requested a review from t1m0thyj April 15, 2024 16:39
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!

Copy link

sonarcloud bot commented Apr 18, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
15.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@JillieBeanSim
Copy link
Contributor

JillieBeanSim commented Apr 19, 2024

With approvals will go ahead and merge, we can open and address issues for anything found dealing with trees in v3 separately.

Thanks @traeok, @t1m0thyj, and @zFernand0 for all the hard work that went into the update and for all testers! This is HUGE! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use vscode.FileSystemProvider for content downloaded from mainframe Support for Drag-Drop within VSCode
7 participants