-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Is your feature or enhancement request related to a problem or limitation? Please describe
I am implementing the download commands in Zowe Explorer with a user option to allow overwriting downloaded files if modified (for downloading a whole data set or all data sets or a uss directory).
Additionally, for performance reasons, if you download a massive data set, let's say with 1k members, and it fails on file 900, instead of redownloading all of them, it should just download the last 100 (or just the files that failed if don't fail fast). But if user wants to always overwrite (in case any of the first 900 files are modified) then respect the option.
However I have found that all data set related commands do not support the existing overwrite option - only ussDir uses it. Existing downloaded files are always overwritten.
Describe your enhancement idea
Ideally we would use the existing overwrite option.
However, this would be a breaking change because
- Current default behaviour: (overwrite is not used) download the file regardless of if it exists or not
- New default behaviour: (overwrite is false/not supplied) if the file already exists and has been modified, don't download the file
So actually we need to add a new option that has the opposite default of overwrite, let's say skipExisting or similar.
Then new default behaviour will be the same as before, but now if skipExisting is true, then check if file exists and if so, don't download the file.
Question for maintainers: If we are implementing a new option for all functions except ussDir, could we mark overwrite as deprecated, implement the new option in all places (including ussDir alongside overwrite) and then remove overwrite in next major release?
Describe alternatives you've considered
Just don't provide any overwrite option and warn that it will always overwrite except when downloading a uss directory?
OR
Implement overwrite functionality at the ZE level.
This is not a good solution however as I would not be able to use the downloadAllMembers or allDataSets functions for their representive commands in ZE.
Because I can check if the files are all there and overwrite is off, then don't do the download. But if one file is missing then the call to the downloadAllMembers/allDataSets functions would still redownload the entire directory with all the files overwritten.
And I can't do both because of how the task is tracked so in that case I'd have to implement the method that downloads each indidivual file and recreate basically all the logic of the whole directory download but with overwriting supported.
Provide any additional context
Metadata
Metadata
Assignees
Labels
Type
Projects
Status