zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
108 stars 85 forks source link

Fix incomplete files when downloading data sets #2167

Closed t1m0thyj closed 3 weeks ago

t1m0thyj commented 3 weeks ago

What It Does

Fixes #744

How to Test

(async () => { // Load connection info from default z/OSMF profile const profInfo = new ProfileInfo("zowe"); await profInfo.readProfilesFromDisk(); const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf"); const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true }); const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs); const stream = new BufferBuilder(); const response = await Download.dataSet(session, "SYS1.MACLIB(ABEND)", {stream}); console.log(stream.read()); })();


* Test that there is no regression in cross-LPAR copy related to https://github.com/zowe/imperative/pull/1022
`zowe files copy dsclp <sourceDsname> <targetDsname> --target-zosmf-profile <profileName>`
where the source dsname points to a large sequential DS (>16KB)

**Review Checklist**
I certify that I have:
- [x] tested my changes
- [x] added/updated automated tests
- [x] updated the changelog
- [x] followed the [contribution guidelines](https://github.com/zowe/zowe-cli/blob/master/CONTRIBUTING.md)

**Additional Comments**
<!-- Anything else noteworthy about this pull request. This section is optional. -->
Thanks to @traeok for his `BufferBuilder` implementation in Zowe Explorer 😋 
codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.14%. Comparing base (770478c) to head (6f4f5e6). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2167 +/- ## ======================================= Coverage 91.13% 91.14% ======================================= Files 636 637 +1 Lines 19054 19064 +10 Branches 3901 3900 -1 ======================================= + Hits 17365 17376 +11 + Misses 1688 1687 -1 Partials 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

github-actions[bot] commented 3 weeks ago

Release succeeded for the master branch. :tada:

The following packages have been published:

Powered by Octorelease :rocket: