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 12 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

Sorry, something went wrong.

Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

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

Project coverage is 91.27%. Comparing base (38b6ef8) to head (7aecf7a).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
packages/zosfiles/src/methods/copy/Copy.ts 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2393      +/-   ##
==========================================
- Coverage   91.28%   91.27%   -0.01%     
==========================================
  Files         638      638              
  Lines       18207    18222      +15     
  Branches     3895     3939      +44     
==========================================
+ Hits        16620    16633      +13     
- Misses       1586     1587       +1     
- Partials        1        2       +1     

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

pujal0909 and others added 3 commits December 20, 2024 13:52
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
@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 and others added 6 commits January 2, 2025 14:43
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com>
@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
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
@pujal0909 pujal0909 requested a review from t1m0thyj January 6, 2025 19:56
Copy link

sonarqubecloud bot commented Jan 6, 2025

@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?

/**
* Function that checks if the data set exists
**/
public static async dataSetExists(
Copy link
Member

Choose a reason for hiding this comment

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

If this method isn't used outside of this file, we may want to make it private for now.

dataSetName: string
): Promise<boolean> {
let dsnameIndex;
const dataSetList = await List.dataSet(session, dataSetName, {attributes: true, start: dataSetName});
Copy link
Member

Choose a reason for hiding this comment

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

Are attributes needed or if we just need names can we list without them?

@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

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
3 participants