- 
                Notifications
    You must be signed in to change notification settings 
- Fork 106
feat: Data set and USS download commands #3843
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
| I want to get more review feedback now the majority of it is in - note that this PR is still waiting on zowe/zowe-cli#2620 and zowe/zowe-cli#2618 (and maybe zowe/zowe-cli#2619 too but lower priority and could go out without those fixes) | 
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
| 
 Looking at this screenshot has made me realize that we have a lot of context menu options 😂 that said, I'm wondering if we would want to place download/upload in its own section? We could move the Upload options below the "Copy Path" options and group them with the download ones.. 🤔 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments re: minor edits to wording.
| "initializeUSSFavorites.error.buttonRemove": "initializeUSSFavorites.error.buttonRemove", | ||
| "File does not exist. It may have been deleted.": "File does not exist. It may have been deleted.", | ||
| "Pulling from Mainframe...": "Pulling from Mainframe...", | ||
| "The 'move' function is not implemented for this USS API.": "The 'move' function is not implemented for this USS API.", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "The 'move' function is not implemented for this USS API.": "The 'move' function is not implemented for this USS API.", | |
| "The 'Move' function is not implemented for this USS API.": "The 'move' function is not implemented for this USS API.", | 
| "initializeUSSFavorites.error.buttonRemove": "", | ||
| "File does not exist. It may have been deleted.": "", | ||
| "Pulling from Mainframe...": "", | ||
| "The 'move' function is not implemented for this USS API.": "", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "The 'move' function is not implemented for this USS API.": "", | |
| "The 'Move' function is not implemented for this USS API.": "", | 
| "File path" | ||
| ] | ||
| }, | ||
| "Profile does not exist for this file.": "Profile does not exist for this file.", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we say "A profile ... "?
| if (children.length > Constants.MIN_WARN_DOWNLOAD_FILES) { | ||
| const proceed = await Gui.showMessage( | ||
| vscode.l10n.t( | ||
| "This data set has {0} members. Downloading a large number of files may take a long time. Do you want to continue?", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "This data set has {0} members. Downloading a large number of files may take a long time. Do you want to continue?", | |
| "This data set has {0} members. Downloading a large number of files can take a long time. Do you want to continue?", | 
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
| I haven't tried the UX myself yet, but from the video I wasn't quite sure what I expected to happen about choosing encodings. The wording suggests I can choose the encoding of every file somehow ... but I can't quite envisage the GUI for this! A couple of suggestions on the notifications.... I feel like when I get a few notifications that are quite generic like "File downloaded" or "New copy completed" and I find myself wondering if that was a notification I got just now, or one I got a while back that should have cleared. My stance for CICS has been to try and be a bit more descriptive with what the notification is e.g. "New copy completed on MYPROG1" or similar. We could be more descriptive in the notifications here, although I'm not set on that. We could also provide a link in the notification to the file, or the directory we downloaded to. Again I don't think this is a must-have if there is a time pressure. | 
| Thanks a lot for the feedback dave, I really appreciate it🙂 The video is actually super out of date now I really should post a new one for better feedback, apologies! 
 Instead of putting encoding options right into the download options quick pick, I have an option for "Choose Encoding" and if it is checked, it will also enter the existing choose encoding quick pick used for upload/open with encoding. For downloading members of a PDS, this encoding will be applied to all members, which does make sense given they all follow the same characteristics - but for a USS directory, files in a directory can have all kinds of encodings so this is much tricker. So for downloading USS directories, I have the same "Choose Encoding" option but the resulting encoding selection quick pick is almost the same as the existing one but with an additional "Auto-detect file encoding" option which essentialls selects no encoding and relies on the encoding detection in zowe-cli which uses USS file tags and stuff. 
 This is a good point, I think I will implement that. Currently, I have it only saying what type of download has occured but I definately should include the path of the thing downloaded and/or resulting file path too. What I do have now though is when a warning or error occurs, the user can click "View Details" and it will open the Troubleshooting webview with the command response from zowe-cli which contains a lot more details about the download. These types of details can't be shown in notifcations because of being too verbose. A warning can occur, for example, if overwrite is off and a file was skipped because of the overwrite and in the details it prints which files were skipped and not skipped (same as in zowe-cli (whch I have an open PR for to add overwrite support to all commands except USS directories (which it already exists for), so you can currently only test this with those)). 
 A link is a good idea! | 
| 
 Still debugging this, it's a strange error with the Jest JUnit reporting where it fails to locate the package JSON. Plan to read over some of the changes to get a better grasp of why this is happening | 
| 
 Only vague thought I had is that I tried to use MockedProperty as much as possible instead of Object.defineProperty and maybe that usage has caused some weird side effect? | 
| 
 Skimming through the tests, I do see a few  | 
| 
 Oooh right yeah I kinda only remembered I needed to dispose of it once I am done after I had done most of the testing and then I thought hmmm should I go through all of them to make sure I dispose properly and then I thought nahh I'm sure it's probably fine 😂 | 
| 
 Hmm looks like I haven't actually updated the data set download commands to use the prompt for encoding yet, oops... I will do that when I have time 😅 | 
| USS download commands 2025-10-22.19-43-53.mp4 | 



Proposed changes
Adds 5 new commands:
Didn't add command for download all data sets even though its in the API because of #2536 but happy to add it if something thinks it would be useful to have it in ZE...
2025-09-05.11-33-07.mp4
2025-10-22.19-43-53.mp4
Release Notes
Milestone: 3.4.0
Changelog:
Types of changes
Checklist
General
yarn workspace vscode-extension-for-zowe vscode:prepublishpnpm --filter vscode-extension-for-zowe vscode:prepublishCode coverage
Deployment
Further comments
Please could someone (ideally someone on zowe cli team who worked on downloads api) have a look at the options I am passing into downloads and if I am missing any/getting some wrong etc. Also pretty sure I am handling encoding/tagging wrong in the USS code if someone could look at that. Thanks