Commit graph

23 commits

Author SHA1 Message Date
8e23d38660 Handle migrations and server startup better
The server part of the guix-data-service doesn't work great as a guix service,
since it often fails to start if the migrations take any time at all.

To address this, start the server before running the migrations, and serve the
pages that work without the database, plus a general 503 response. Once the
migrations have completed, switch to the normal behaviour.
2022-06-17 13:13:21 +01:00
8beab2511c Query substitutes for latest processed revisions periodically
This is a step towards having up to date substitute availability data.
2021-11-16 19:08:46 +00:00
d1a2a7125c Fix a regression with running sqitch
Introduced in 0dc05982cd.
2021-07-11 12:40:48 +01:00
b4188bda9d Run sqitch in the change mode
Since this rolls back migrations less, which is good when the rollback bit
isn't always implemented.
2021-07-04 10:43:13 +01:00
0dc05982cd Try to adapt the PostgreSQL paramstring to use with sqitch 2021-06-16 13:44:00 +01:00
3225766207 Make it easier to get to a repl 2020-10-10 13:44:37 +01:00
18b6dd9e6d Stop opening a PostgreSQL connection per request
This was good in that it avoided having to deal with long running connections,
but it probably takes some time to open the connection, and these changes are
a step towards offloading the PostgreSQL queries to other threads, so they
don't block the threads for fibers.
2020-10-03 09:22:29 +01:00
a0263a0eae Set a statement timeout of 60 seconds for web requests
This will help stop queries running for an unnecessarily long time, longer
than NGinx will wait for example.
2020-04-24 09:00:20 +01:00
ded4df6632 Move and improve the "starting the server" message
Move it after the output relating to narinfo signing, and include the host.
2020-03-14 13:14:29 +00:00
a03e1601de Improve handling of errors
Adjust the previously unused error page code, and start to use it. Only show
the error if configured to do so, to avoid leaking secret information.
2020-03-14 12:46:02 +00:00
7342280ead Guard against failures when loading the narinfo signing public key 2019-12-26 10:49:14 +00:00
54b3d8d93a Fix the option alist element names for the narinfo signing key 2019-12-26 10:47:29 +00:00
66e886a6b4 Serve narinfo files for derivations 2019-12-26 09:34:43 +00:00
5663235048 Rework the builds and build_status tables as well as related code
Allow for build status information to be submitted by POST request. This
required some changes to the builds and build_status tables, as for example,
the Cuirass build id may not be available, and the derivation may not be know
yet, so just record the derivation file name.
2019-11-24 20:18:08 +00:00
977609c66e Rewrite localhost for sqitch
As this means that like psql, the unix socket will be used.
2019-10-01 19:03:34 +01:00
3df0b43146 Use line buffering for the input and output ports
As these are used for logging, which is done on a line by line basis. Remove
the now redundant calls to (force-output).
2019-06-17 18:09:10 +01:00
5323f24133 Add --port and --host as options to the guix-data-service 2019-06-13 19:06:53 +01:00
bd292d6f57 Add an option to create a pid-file
This'll help the a service manager (like the shepherd) know when the service
is ready, which at the moment, means the database migrations have happened.
2019-06-11 07:40:26 +01:00
cf5dace846 Change to the sqitch directory to run deploy
As this means it can find the relevant files.
2019-06-11 07:22:17 +01:00
93fdefc7b1 Pass the --db-client option to sqitch deploy
So that it can always find psql.
2019-06-11 07:15:01 +01:00
d7586e88fa Pass --plan-file to the sqitch deploy command 2019-06-08 10:28:14 +01:00
42c608e004 Add a --update-database option
This runs Sqitch on startup, which should make managing the database easier,
as you just have to restart the service with this option, and the database
should be updated if necessary.
2019-06-07 07:33:34 +01:00
5a9262b38d
Initial commit
This is a service designed to provide information about Guix. At the
moment, this initial prototype gathers up information about packages,
the associated metadata and derivations.

The initial primary use case is to compare two different revisions of
Guix, detecting which packages are new, no longer present, updated or
otherwise different.

It's based on the Mumi project.

[1]: https://git.elephly.net/software/mumi.git
2019-02-07 22:26:57 +00:00