-
Notifications
You must be signed in to change notification settings - Fork 86
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
[v3] Download special char issue #2366
Conversation
Signed-off-by: jace-roell <[email protected]>
Signed-off-by: jace-roell <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2366 +/- ##
=======================================
Coverage 91.27% 91.27%
=======================================
Files 636 636
Lines 18071 18083 +12
Branches 3895 3862 -33
=======================================
+ Hits 16495 16506 +11
- Misses 1575 1576 +1
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with the example string in the PR description and was able to reproduce the same output without any data loss.
Thanks Jace for the fix! LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once a question on the V2 PR is resolved and applied in this PR if needed, then this PR looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 😋
Release succeeded for the The following packages have been published:
Powered by Octorelease 🚀 |
What It Does
This PR resolves an issue where special characters could become corrupted when downloading large files. The corruption was caused by each chunk buffer being converted to a string when calling the processNewLines() function and then converted back to a buffer. This PR introduces support for passing buffers directly into the processNewLines() function to prevent corruption.
How to Test
The issue arises when a special character appears as the last character of a stream chunk. To reproduce, create a PDS file containing exclusively special characters with a size larger than the default chunk size (>8KB). In such cases, the last character of each chunk may be corrupted and appear as two unknown characters.
To observe this issue, download a PDS file that meets the criteria using the following example command (assuming the use of IBM-1147 encoding):
zowe zos-file download ds <PDSMEMBER> --encoding "IBM-1147"
where
<PDSMEMBER>
is a file larger than 8KB containing special characters.Example Line (about 105 are required in a file to exceed 8KB):
àèéìòùÀÈÉÌÒÙ°àèéìòùÀÈÉÌÒÙ°àèéìòùÀÈÉÌÒÙ°àèéìòùÀÈÉÌÒÙ°àèéìòùÀÈÉÌÒÙ°àèéìòùÀÈÉÌÒÙ°à
Review Checklist
I certify that I have: