-
Notifications
You must be signed in to change notification settings - Fork 96
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
Support for copy/paste of MVS files within and cross lpars #3387
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
📅 Suggested merge-by date: 1/27/2025 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3387 +/- ##
==========================================
- Coverage 93.18% 93.18% -0.01%
==========================================
Files 120 120
Lines 12502 12572 +70
Branches 2885 2732 -153
==========================================
+ Hits 11650 11715 +65
- Misses 851 856 +5
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[email protected]>
Signed-off-by: likhithanimma1 <[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.
Left a couple of comments re: changelogs
Signed-off-by: likhithanimma1 <[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.
@@ -49,13 +49,11 @@ export namespace ZoweExplorerZosmf { | |||
} | |||
|
|||
public getSession(profile?: imperative.IProfileLoaded): imperative.Session { | |||
if (!this.session) { |
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 we remove this check, we are already going to call the _getSession and replacing the "existing one"
is that desired, or will that cause some breakage in certain edge cases?
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 the check is in place, in the function copyDataSetCrossLpar
after generating the sourceSession
with the help of this.getSession(sourceprofile)
the targetSession will also be generated same as sourceSession with the call this.getSession()
which is not the case when u want to paste the copied dataset to different LPAR.
this.getSession(sourceprofile), | ||
{ dsn: toDataSetName, member: toMemberName }, | ||
options, | ||
{ volume: undefined }, |
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.
What if the source dataset is not cataloged? It would seem that ZE won't be able to find it in order to perform the copy operation 😢
On the other hand, if we do not want to support uncataloged datasets, we should probably not even specify volume: undefined
. Given that volume is also optional in IOptions
, why not just pass an empty object instead?
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.
Have made it to send an empty object {}
packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpMvsApi.ts
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.
As a general comment, I like the attention to detail that went though refactoring the copy/paste operations.
I would like to discuss a bit more on the design/implementation decisions taken here 🙏
all things considered, this PR, LGTM! 😋
Array<{ | ||
memberName: string; | ||
contextValue: string; | ||
profileName: string; | ||
dataSetName: string; | ||
}> | ||
> { |
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'm curious to understand a bit more of the background of moving from returning an object to returning a Promise<Array<object>>
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.
In case of copy of PDS, I wanted all of its corresponding members to be copied to the clipboard through this function getNodeLabels
. So, thought of changing it to Array<object>
.
Signed-off-by: likhithanimma1 <[email protected]>
https://github.com/zowe/zowe-cli/blob/97a3c6877baa8eb5322df03d34763358f421cad1/packages/zosfiles/src/methods/copy/Copy.ts#L344 |
I think you are right 🤯 Thanks for looking into this a bit further 🙏 See: |
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! 😋
I've added the following issue to the v3.2.0 release plan
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 a question about the code changes, the missing CHANGELOG had me look into changes made in the FTP extension.
options: zosfiles.ICrossLparCopyDatasetOptions, | ||
sourceprofile: imperative.IProfileLoaded | ||
): Promise<zosfiles.IZosFilesResponse> { | ||
throw new ZoweFtpExtensionError("Copy dataset cross lpar is not supported in ftp extension."); |
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.
What can we expect with an extender that works with this on day 1 and a user tries but their extension wasn't updated like we see the zFTP extension? Should a check be done in ZE making this statement like we do for other new APIs/functionality?
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.
@JillieBeanSim Removed it from ftp as the ZE functionality already has the check in place for it.
Signed-off-by: likhithanimma1 <[email protected]>
7196577
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.
changelog looks great, thanks @likhithanimma1!
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! 😋
Thanks for addressing the feedback 🙏
Proposed changes
Issue: #3012
With this PR, Zowe Explorer now supports copy and paste of MVS files (seq, pds, and members) on same and also cross lpars.
Release Notes
Milestone:
Changelog: Implemented copy/paste functionality of datasets within and cross lpars. #3012
Types of changes
Checklist
General
yarn workspace vscode-extension-for-zowe vscode:prepublish
pnpm --filter vscode-extension-for-zowe vscode:prepublish
Code coverage
Deployment
Further comments