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

Fix incomplete files when downloading data sets #2167

Merged
merged 6 commits into from
Jun 7, 2024

Conversation

t1m0thyj
Copy link
Member

@t1m0thyj t1m0thyj commented Jun 5, 2024

What It Does

Fixes #744

How to Test

  • Test that the issue with downloading small data sets using BufferBuilder is fixed:
const { BufferBuilder, ProfileInfo } = require("@zowe/imperative");
const { Download } = require("@zowe/zos-files-for-zowe-sdk");

(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 Fix for request steam failure imperative#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:

Additional Comments

Thanks to @traeok for his BufferBuilder implementation in Zowe Explorer 😋

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@           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           

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

t1m0thyj and others added 4 commits June 5, 2024 16:39
Co-authored-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Co-authored-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
@t1m0thyj t1m0thyj changed the title WIP Fix incomplete files when downloading data sets Fix incomplete files when downloading data sets Jun 6, 2024
@t1m0thyj t1m0thyj added the needs-ported Indicates that a PR needs to be ported (master - lts-incremental) label Jun 6, 2024
@t1m0thyj t1m0thyj marked this pull request as ready for review June 6, 2024 00:30
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.

Thanks for the fix Timothy, LGTM

@t1m0thyj t1m0thyj requested a review from anaxceron June 6, 2024 19:20
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.

Just made one small comment -- looks good @t1m0thyj

packages/zosfiles/CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Copy link

sonarqubecloud bot commented Jun 7, 2024

@t1m0thyj t1m0thyj merged commit 8a7f816 into master Jun 7, 2024
19 checks passed
@t1m0thyj t1m0thyj deleted the fix/download-dataset-corruption branch June 7, 2024 16:18
@t1m0thyj t1m0thyj added the release-minor Indicates a minor feature has been added label Jun 7, 2024
Copy link

github-actions bot commented Jun 7, 2024

Release succeeded for the master branch. 🎉

The following packages have been published:

  • npm: @zowe/imperative@5.24.0
  • npm: @zowe/zos-files-for-zowe-sdk@7.26.0
  • npm: @zowe/zos-workflows-for-zowe-sdk@7.26.0
  • npm: @zowe/zos-jobs-for-zowe-sdk@7.26.0
  • npm: @zowe/cli@7.26.0

Powered by Octorelease 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ported Indicates that a PR needs to be ported (master - lts-incremental) release-minor Indicates a minor feature has been added released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download.dataset partially downloads ( corrupts) files?
4 participants