-
Notifications
You must be signed in to change notification settings - Fork 201
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
Export vulnerablecode-data #1206
Conversation
This is how the data look like
and what should I do if vulnerability don't have any related package ? |
All these vulnerabilities don't have any related packages and it is old and not open source like you said @pombredanne |
@ziadhany LGTM! please add some unit tests for same |
102267c
to
8905f62
Compare
@pombredanne @TG1999 can you suggest a way to improve the performance ? |
@ziadhany For a data dump type of export, I would suggest simplifying the data structure by handling each model separately. Trying to load all relationships at once is likely to provide poor performance. You can look into the Django build-in |
d523f7a
to
027983a
Compare
I tried to use django dumpdata but I don't think this could work in this task. so I tried to use |
Using prefetching makes performance worse. Maybe I'm using it in the wrong way. |
@ziadhany what's pending on this ? |
yes, this PR is ready to be merged. |
@ziadhany please see, tests are failing |
Fix disk storage structure Redefine the disk storage structure Add a test for write_vul_data Rename file extension from yaml to yml again Add Filter before prefetch_related Add paginated again Fix typo in export and rename files from yaml to yml Fix filename error , Remove / from filename Create a query for distinct ecosystems Try to improve export performance again Try to improve export performance by load all data in memory before start writing on disk Improve export vulnerablecode data performance Try to improve export performance Try to improve performance by adding pagination Fix filename for export files Add multiple parameterizes for create_sub_path test . Add new format for exporting vulnerablecode-data Add a test Fix export test with yaml format Change the export format from json to yaml Add test for export command Add test for write_vuln_data function Edit export.py , Fix missing attribute in vuln_data Export vulnerablecode-data Add new format for exporting vulnerablecode-data Add a test Fix export test with yaml format Change the export format from json to yaml Add test for export command Add test for write_vuln_data function Edit export.py , Fix missing attribute in vuln_data Export vulnerablecode-data Add new format for exporting vulnerablecode-data Add a test Fix export test with yaml format Change the export format from json to yaml Add test for export command Add test for write_vuln_data function Edit export.py , Fix missing attribute in vuln_data Export vulnerablecode-data Signed-off-by: ziadhany <[email protected]>
This PR exports VulnerableCode data in a file system structure suitable for use in FederatedCode.