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

#3869 - Unzip federal restrictions file #4030

Closed
wants to merge 3 commits into from

Conversation

sh16011993
Copy link
Collaborator

@sh16011993 sh16011993 commented Dec 5, 2024

This draft PR contains the work related to finding a suitable library to perform the unzip for the federal restrictions file imported from the SFTP server.

Throughout my initial investigation, I tried to use the node:zlib library provided as a part of the core nodejs package. However, I ran into a few issues and it seems that this particular library works with the gzip compression formats and not with the zip formats.

I ran into the below error during the implementation:

image

As per my current understanding, we might have to use a 3rd party library to achieve the desired result.

Some other libraries for the task:
https://stackoverflow.com/questions/10308110/simplest-way-to-download-and-unzip-files-in-node-js-cross-platform

Other useful references used during development:

https://github.com/theophilusx/ssh2-sftp-client?tab=readme-ov-file#getpath-dst-options--stringstreambuffer
https://stackoverflow.com/questions/72684271/read-a-file-buffer-from-zip-file-buffer-data-in-nodejs
https://stackoverflow.com/questions/11611950/unzip-a-zip-file-using-zlib

@dheepak-aot dheepak-aot self-assigned this Dec 16, 2024
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.04% ( 3786 / 17180 )
Methods: 10.05% ( 219 / 2180 )
Lines: 25.42% ( 3281 / 12907 )
Branches: 13.66% ( 286 / 2093 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.43% ( 583 / 891 )
Methods: 59.26% ( 64 / 108 )
Lines: 68.54% ( 464 / 677 )
Branches: 51.89% ( 55 / 106 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 81.15% ( 1309 / 1613 )
Methods: 66.34% ( 134 / 202 )
Lines: 84.38% ( 1097 / 1300 )
Branches: 70.27% ( 78 / 111 )

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 67.4% ( 5922 / 8787 )
Methods: 65.09% ( 729 / 1120 )
Lines: 71.33% ( 4647 / 6515 )
Branches: 47.4% ( 546 / 1152 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants