Periodically generate a full database dump #198

Closed
opened 2024-09-26 12:54:01 +00:00 by proofconstruction · 10 comments
proofconstruction commented 2024-09-26 12:54:01 +00:00 (Migrated from github.com)

Currently, ingesting the full CVE list and a copy of nixpkgs can take several hours, dramatically reducing iteration speed.

To facilitate faster development, it would be useful to asynchronously generate DB dumps and cache them for easy downloading by developers.

Currently, ingesting the full CVE list and a copy of nixpkgs can take several hours, dramatically reducing iteration speed. To facilitate faster development, it would be useful to asynchronously generate DB dumps and cache them for easy downloading by developers.
RaitoBezarius commented 2024-10-08 14:51:04 +00:00 (Migrated from github.com)

Fixed by 5422c157fb.

Fixed by https://github.com/Nix-Security-WG/nix-security-tracker/commit/5422c157fb20c71cd6c0a7dd6825d5ce81527f99.
erictapen commented 2024-10-08 15:04:09 +00:00 (Migrated from github.com)

What's the URL endpoint for the downloadable dumps now? Didn't see that at first glance.

What's the URL endpoint for the downloadable dumps now? Didn't see that at first glance.
RaitoBezarius commented 2024-10-08 15:06:19 +00:00 (Migrated from github.com)
https://dumps.sectracker.nixpkgs.lahfa.xyz/
erictapen commented 2024-10-21 13:11:01 +00:00 (Migrated from github.com)

@RaitoBezarius the action is failing currently, so only one dump from 12 days is available on the bucket. Could you have a look? I'm still dumping directly from the staging host to get a working db, which is time consuming.

https://github.com/Nix-Security-WG/nix-security-tracker/actions/runs/11433700475/job/31806093828#step:9:18

@RaitoBezarius the action is failing currently, so only one dump from 12 days is available on the bucket. Could you have a look? I'm still dumping directly from the staging host to get a working db, which is time consuming. https://github.com/Nix-Security-WG/nix-security-tracker/actions/runs/11433700475/job/31806093828#step:9:18
fricklerhandwerk commented 2024-10-28 13:53:48 +00:00 (Migrated from github.com)

Restoring the dump fails for me with:

pg_restore: processing data for table "public.shared_nixderivationmeta_source_provenances"
pg_restore: processing data for table "public.shared_nixderivationoutput"
pg_restore: error: could not uncompress data: incorrect data check
Restoring the dump fails for me with: ``` pg_restore: processing data for table "public.shared_nixderivationmeta_source_provenances" pg_restore: processing data for table "public.shared_nixderivationoutput" pg_restore: error: could not uncompress data: incorrect data check ```
RaitoBezarius commented 2024-10-28 13:54:29 +00:00 (Migrated from github.com)

Can you provide a reproducer?

Can you provide a reproducer?
fricklerhandwerk commented 2024-10-28 13:55:59 +00:00 (Migrated from github.com)

I'm following the steps in CONTRIBUTING.md. It seems the download repeatedly doesn't finish around the 1GiB mark:

$ curl https://dumps.sectracker.nixpkgs.lahfa.xyz/web-security-tracker --output dump
...
curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)
I'm following [the steps in CONTRIBUTING.md](https://github.com/Nix-Security-WG/nix-security-tracker/blob/main/CONTRIBUTING.md#set-up-a-local-container). It seems the download repeatedly doesn't finish around the 1GiB mark: ```console $ curl https://dumps.sectracker.nixpkgs.lahfa.xyz/web-security-tracker --output dump ... curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2) ```
fricklerhandwerk commented 2024-10-30 10:53:28 +00:00 (Migrated from github.com)

Okay it seems being in a certain region of Germany messes up routing. It works from my VPS in Frankfurt...

Okay it seems being in a certain region of Germany messes up routing. It works from my VPS in Frankfurt...
RaitoBezarius commented 2024-10-30 11:08:07 +00:00 (Migrated from github.com)

@fricklerhandwerk Can you run from your weird German region:

$ tracepath dumps.sectracker.nixpkgs.lahfa.xyz          

and show me the result?

@fricklerhandwerk Can you run from your weird German region: ``` $ tracepath dumps.sectracker.nixpkgs.lahfa.xyz ``` and show me the result?
fricklerhandwerk commented 2024-10-31 10:20:27 +00:00 (Migrated from github.com)

Another problem is that the dump is not being made periodically. There seems to be a problem with the GitHub Action.

Another problem is that the dump is not being made periodically. There seems to be a problem with the GitHub Action.
Sign in to join this conversation.
No description provided.