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

copy pds into new target data set enhancement #2393

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

pujal0909
Copy link
Contributor

@pujal0909 pujal0909 commented Dec 20, 2024

What It Does

The enhancement creates a new PDS and copies the source members when a target PDS is inputted that does not exist. The response informs the user a new PDS has been created.
#2349
How to Test

Use the copy command with a target PDS that does not currently exist
zowe zos-files copy ds "existing-pds" "new-pds"

Review Checklist
I certify that I have:

Additional Comments

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.32%. Comparing base (5f86044) to head (be0c2e3).
Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
packages/zosfiles/src/methods/copy/Copy.ts 91.30% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2393      +/-   ##
==========================================
- Coverage   91.32%   91.32%   -0.01%     
==========================================
  Files         638      638              
  Lines       18210    18231      +21     
  Branches     3931     3942      +11     
==========================================
+ Hits        16630    16649      +19     
- Misses       1579     1580       +1     
- Partials        1        2       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pujal0909 pujal0909 changed the title copy pds into new target data set functionality copy pds into new target data set enhancement Dec 20, 2024
@pujal0909 pujal0909 marked this pull request as ready for review January 6, 2025 17:28
Copy link

github-actions bot commented Jan 6, 2025

📅 Suggested merge-by date: 1/20/2025

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.

Looks pretty good, thanks @pujal0909! Left a few comments

packages/zosfiles/src/methods/copy/Copy.ts Outdated Show resolved Hide resolved
packages/zosfiles/src/methods/copy/Copy.ts Outdated Show resolved Hide resolved
packages/zosfiles/src/methods/copy/Copy.ts Outdated Show resolved Hide resolved
@pujal0909 pujal0909 requested a review from t1m0thyj January 6, 2025 19:56
@t1m0thyj t1m0thyj linked an issue Jan 6, 2025 that may be closed by this pull request
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.

Tested the functionality and it LGTM 🙂

@pujal0909 Please add a system test for the case where target data set does not exist.

Question for @adam-wolfe and @anaxceron - should we update the help text for the zowe copy ds command to explain that if the target data set does not exist, it will be created?

packages/zosfiles/src/methods/copy/Copy.ts Outdated Show resolved Hide resolved
packages/zosfiles/src/methods/copy/Copy.ts Outdated Show resolved Hide resolved
@t1m0thyj t1m0thyj dismissed their stale review January 6, 2025 20:52

Requested changes addressed

@adam-wolfe
Copy link
Contributor

adam-wolfe commented Jan 6, 2025

Tested the functionality and it LGTM 🙂

@pujal0909 Please add a system test for the case where target data set does not exist.

Question for @adam-wolfe and @anaxceron - should we update the help text for the zowe copy ds command to explain that if the target data set does not exist, it will be created?

I think so. I would also change this line:
image

@pujal0909 pujal0909 requested a review from t1m0thyj January 7, 2025 17:58
Copy link
Contributor

@anaxceron anaxceron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor comment re: a changelog.

packages/zosfiles/CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Pujal <[email protected]>
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality LGTM, thanks Pujal! I had couple small requests for changes and a follow-up question...


In the event where a user tries to copy to the same data set, can we return early from the command? Currently, if I try copying a PDS from source A.B.C to the same destination (A.B.C), the command copies each member, even though the source and destination are identical:

image

packages/cli/src/zosfiles/-strings-/en.ts Outdated Show resolved Hide resolved
packages/zosfiles/CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Pujal <[email protected]>
Signed-off-by: Pujal <[email protected]>
@pujal0909 pujal0909 force-pushed the copy-pds-enhancement branch from d342773 to 82135ec Compare January 8, 2025 15:58
Signed-off-by: Pujal <[email protected]>
Signed-off-by: Pujal <[email protected]>
@pujal0909 pujal0909 requested review from anaxceron and traeok January 8, 2025 16:35
@pujal0909 pujal0909 requested a review from awharn January 9, 2025 15:45
pujal0909 and others added 2 commits January 9, 2025 14:53
Signed-off-by: Pujal <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
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 @pujal0909!

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

Successfully merging this pull request may close these issues.

Give users the ability to create a copy of a pds
6 participants