-
Notifications
You must be signed in to change notification settings - Fork 92
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
Feature copy datasets #2051
Feature copy datasets #2051
Conversation
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2051 +/- ##
==========================================
+ Coverage 90.70% 90.75% +0.05%
==========================================
Files 86 86
Lines 8109 8245 +136
Branches 1712 1751 +39
==========================================
+ Hits 7355 7483 +128
- Misses 753 761 +8
Partials 1 1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
Signed-off-by: KutluOzel-b <[email protected]>
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.
Thanks for working on this feature @KutluOzel-b ! Just a couple things I've found while testing:
- Since the "Copy Data Set" option brings up a dialog for the new dataset(s) names and doesn't require the user to initiate the paste operation, should the feature be renamed to something like "Duplicate data set(s)" ? Also, would it be possible to add a title to the input box to describe its intent, e.g. "New name for copy of 'DATASET1'" ? This would help provide some clarity to the end-user when the input box appears.
- When right-clicking on data set members (PDS), the "Copy Member" option now says "Copy Data Set".
- Trying to copy one PS data set, and providing the name of an existing PS data set as the new name, results in a z/OSMF REST API error:
In this situation we could probably disregard z/OSMF API errors, or just reject the operation before making the API request if the new name already matches one of the existing datasets.
Hey @traeok , Thanks for review . I had a purpose while huddling copy features together which was make it more simple and let user control over the operation he/she does. I'm thinking having "copy member", "copy dataset", "duplicate datasets", "copy sequential datasets" is a not a good way of achieving good ux. Regarding the attempt of copying already existing a datasets ; I'm not sure there is an api for checking if a dataset with selected name is existing or not and dismissing api errors might be confusing considering operation is done or not. |
I agree that having too many different "Copy" operations would be redundant and confusing for the user - we could always stick with "Copy" here as the user is intentionally right-clicking on a dataset node anyway.
In hindsight it is probably more complicated to ensure there isn't an overlap in existing/new data set names, so we could always leave that up to the user. Going to do some quick tests to make sure it is working as intended and then I will update the review 👍 |
Signed-off-by: Billie Simmons <[email protected]>
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.
Thanks @KutluOzel-b this is working good. I do have a couple things I wanted to mention.
were we changing the Copy Dataset
to just Copy
? I remember the discussion and see paste was changed to just Paste
. Also, I have to click on the data set (closing & reopening) to see the newly added files. Is there a way we can have this automatically refresh after paste is finished?
Signed-off-by: zFernand0 <[email protected]>
Seems like the Theia tests broke after merging from main. 😢 |
Signed-off-by: zFernand0 <[email protected]>
packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpMvsApi.ts
Outdated
Show resolved
Hide resolved
It could be from the Theia version update to 1.35.0 |
Seems like that's the case since replaying a successful run from |
…ess localication Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: zFernand0 <[email protected]>
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.
LGTM!
title: localize("paste.dataSet.InPrg", "Copying File(s)"), | ||
}, | ||
() => { | ||
return ZoweExplorerApiRegister.getMvsApi(nodes[0].getProfile()).copyDataSet(lbl, dsname, null, replace === "replace"); |
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.
If copyDataSet hasn't been picked up by an extender yet we should have a check for this otherwise user will see messages like below.
We shouldn't expect extenders to add 'Not Supported' like I see in the FTP package here, it should be handled by the ZE extension like we have in the past where if the particular API didn't exist we either
- handle it the old way if this is a new way
- return the error of this action not being supported if the new api doesn't exist
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.
And error message will appear indicating that Copying datasets is not supported
However, that leaves the question of whether we want to prevent the allocateLike
from happening or not.
As it stands, I believe the new Copy/Paste experience is a little better than before.
Do we want to address the AllocateLike (and possibly other misbehaviors that we haven't found yet) in this PR?
(Personal opinion)
I have considered going with a similar approach as in #2082 where we rely on the clipboard instead of performing a complex, multi-step, error-prone, user interaction for such functionality.
However, some design decisions need to be discussed. For example, the USS file system may not require allocation of resources.
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.
I think Allocate like can be a future PR
into feature/copy/dsMulti Signed-off-by: zFernand0 <[email protected]>
…the copyDataSet method Signed-off-by: zFernand0 <[email protected]>
packages/zowe-explorer/i18n/sample/src/dataset/actions.i18n.json
Outdated
Show resolved
Hide resolved
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.
LGTM, check was added for the API function 👍 thanks @zFernand0
Signed-off-by: zFernand0 <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
thanks for the updates @zFernand0 LGTM
Please see this comment for context: #2051 (comment)
Proposed changes
add feature copy datasets ( pds, sequential, members across pds) with multi select capabilities.
Release Notes
#1550
Changelog:
Types of changes
What types of changes does your code introduce to Zowe Explorer?
Put an
x
in the boxes that applyChecklist
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 revieweryarn workspace vscode-extension-for-zowe vscode:prepublish
has been executedPlease see this comment for context: #2051 (comment)