Commit graph

4 commits

Author SHA1 Message Date
Nicolas Dandrimont
a66e24bfa2 Ignore psqlrc when loading the rubygems database dump
The SQL dump contains ownership instructions that can't be run if you
don't have the right users in your database clusters. When someone has a
psqlrc with ON_ERROR_STOP, this fails the load of the dump.

Use the opportunity to trigger an exception when psql returns a non-zero
exit code, rather than continue with an empty/inconsistent database.
2022-12-05 13:52:23 +01:00
Antoine Lambert
82b936a277 rubygems: Fix debug log 2022-10-13 16:40:35 +02:00
Antoine Lambert
108816f232 rubygems: Use gems database dump to improve listing output
Instead of using an undocumented rubygems HTTP endpoint that only
gives us the names of the gems, prefer to exploit the daily PostgreSQL
dump of the rubygems.org database.

It enables to list all gems but also all versions of a gem and its
release artifacts. For each relase artifact, the following info are
extracted: version, download URL, sha256 checksum, release date
plus a couple of extra metadata.

The lister will now set list of artifacts and list of metadata as extra
loader arguments when sending a listed origin to the scheduler database.
A last_update date is also computed which should ensure loading tasks
for rubygems will be scheduled only when new releases are available since
last loadings.

To be noted, the lister will spawn a temporary postgres instance so this
require the initdb executable from postgres server installation to be
available in the execution environment.

Related to T1777
2022-10-07 16:54:48 +02:00
Franck Bret
52ccf49e11 RubyGems: List origins from https://rubygems.org
Related T1777
2022-09-29 14:19:06 +02:00