Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add support for download static analysis (#475)
### Feature ### Add support for composing and downloading the static analysis report. New route: ` /applications/:id/analysis/report` endpoint returns the analysis report _tarball_. Adds `AnalysisWriter` used to create/write the Analysis resource to a temporary file. This is needed to support being streamed which bounds the memory footprint. Adds `ReportWriter` used to compose and stream the analysis report _tarball_. The AppLatestReport() delegates handling of the request to the writer. Dockerfile updated to copy the analysis report (tree) from the static-report project image to /tmp/analysis/report. The tree is used when creating the analysis report _tarball_. ### Side Effects ### Created a _new_ `tar` package the provides common, symmetrical functionality for reading and writing tar (g-zipped) content streams. This also fixes the problem of existing implementations reading entire files into memory. This will be used by the new endpoint for static reports. The implementation has been improved to eliminate loading the files into memory before zipping. Added `/test/tar` functional tests. Also, the BucketOwner & client getDir() and putDir() endpoints can be stripped down and refactored to delegate to the _new_ `tar` package. Adds: BaseHandler._Attachment_() method to simplify setting the Content-Disposition header in multiple places. closes #354 --------- Signed-off-by: Jeff Ortel <[email protected]>
- Loading branch information