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 Data set bug + DeferredPromise format fix #2413

Merged
merged 28 commits into from
Jan 30, 2025
Merged

Copy Data set bug + DeferredPromise format fix #2413

merged 28 commits into from
Jan 30, 2025

Conversation

pujal0909
Copy link
Contributor

@pujal0909 pujal0909 commented Jan 16, 2025

What It Does

#2369
Added a new --safe-replace (--safe-rep) option to the copy command that prompts users to confirm whether they want to overwrite the contents of the target data set.

Also, made a small format fix on the DeferredPromise.ts and DeferredPromise.unit.test files.

How to Test

Use the --safe-replace flag with the copy command. A prompt will appear, where you can respond with "y/N".
zowe zos-files copy ds "data-set1" "data-set2" --safe-replace

Review Checklist
I certify that I have:

Additional Comments

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>
pujal0909 and others added 3 commits January 16, 2025 13:18
…AM.ams.temp

Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com>
…AM.ams.temp

Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.35%. Comparing base (68e0962) to head (cdf4915).
Report is 29 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2413      +/-   ##
==========================================
+ Coverage   91.34%   91.35%   +0.01%     
==========================================
  Files         639      639              
  Lines       18259    18269      +10     
  Branches     3949     3844     -105     
==========================================
+ Hits        16678    16690      +12     
+ Misses       1579     1577       -2     
  Partials        2        2              

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

Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
@pujal0909 pujal0909 changed the title Copy Data set bug Copy Data set bug + DeferredPromise format fix Jan 17, 2025
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
@pujal0909 pujal0909 marked this pull request as ready for review January 17, 2025 16:40
Copy link

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

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 <pujal.gandhi@broadcom.com>
Copy link

Reminder: This pull request has a merge-by date coming up within the next 24 hours. Please review this PR as soon as possible.

@t1m0thyj @zFernand0 @awharn @traeok @jace-roell @ATorrise @adam-wolfe

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.

LGTM, thanks for the fix Pujal!

I noticed that when answering "N" to the continue prompt that the message says "Data set copied aborted..." This should be changed to "Data set copy aborted":

image

Regardless, I'm approving since this wording existed before the PR.

pujal0909 and others added 2 commits January 29, 2025 15:38
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com>
Copy link
Member

@zFernand0 zFernand0 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! 😋

Just one small snapshot update needed
npx jest packages/zosfiles/__tests__/__unit__/utils/ZosFilesUtils.unit.test.ts -u 🙏

pujal0909 and others added 3 commits January 29, 2025 16:10
Co-authored-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com>
Co-authored-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.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>
Copy link
Member

@zFernand0 zFernand0 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 for addressing the comments so quickly 🙏


Just one snapshot missing (I think)
npx jest packages/cli/__tests__/zosfiles/__integration__/copy/ds/cli.files.copy.ds.integration.test.ts -u

@zFernand0 zFernand0 self-requested a review January 29, 2025 22:03
pujal0909 and others added 2 commits January 30, 2025 08:41
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
@zFernand0
Copy link
Member

Thanks for fixing the snapshots. 🥳
Let's wait for the required CI checks to pass before merging 🙏

@zFernand0 zFernand0 merged commit af0c3ba into master Jan 30, 2025
23 checks passed
@zFernand0 zFernand0 deleted the copy-ds-bug branch January 30, 2025 14:53
@zFernand0 zFernand0 added the release-current Indicates that there is no new functionality being delivered label Jan 30, 2025
},
{
name: "safe-replace",
aliases: ["safe-rep", "--sr"],
Copy link
Member

@awharn awharn Jan 30, 2025

Choose a reason for hiding this comment

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

I believe the alias should be sr, not --sr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-current Indicates that there is no new functionality being delivered
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

6 participants