Commit graph

928 commits

Author SHA1 Message Date
398b8aab05 Log the time loading new revisions takes 2019-06-21 15:46:53 +02:00
548e628398 Set #:fallback? to #t
If a substitute fails, just build it anyway.
2019-06-21 15:45:50 +02:00
f6ffcb5f02 Remove the revision labels from the links
As that seems neater.
2019-06-20 14:42:38 +02:00
6e1a6c9808 Remove the compare form from the index page
It isn't very useful, as you have to know the commits. Now that there's Git
branch information, it should be possible to access this in a more useful way.
2019-06-20 14:34:00 +02:00
d07e3d9ba8 Move the derivations off the compare page
To the compare/derivations page. Previously, the compare/derivations page was
comparing more than the derivations, notably the package metadata. This change
avoids that, and also reduces the information overload on the compare page.
2019-06-20 14:29:56 +02:00
bb02511607 Don't have all the inputs use a monospace font
Only those where it's appropriate for the data, like commit hashes.
2019-06-20 14:19:11 +02:00
66364207f4 Process jobs starting with the most recent
Conventionally, you'd process the oldest job in a queue, but at the moment, it
would be more useful to have recent information more promptly, and fill in the
historical gaps later. I'm not sure this'll always be the case, but for now,
flip the order in which jobs are processed.
2019-06-19 23:54:12 +01:00
ea80311c49 Use revision labels on the index page as well
Also flip the branch and revision columns around, and add date information to
the branch column.
2019-06-19 23:39:53 +01:00
a168b23c24 Add labels to revisions on the branches and branch pages
And always link to the revision page. Now the label let's you know if you
should expect information or not for that revision.
2019-06-19 22:49:57 +01:00
e93b8f948e Improve the Unknown revision page
Make it similar to the revision page, as some of the information, like the
link to the relevant CGit instance might be available.
2019-06-19 22:03:55 +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
7f0a0ed3b1 Time everywhere a derivation is built when loading a new revision
As this is useful information.
2019-06-17 16:28:11 +01:00
ed0745096a Add a new page listing jobs 2019-06-17 11:21:58 +01:00
9c18c90505 Fix indicating if a revision is queued for processing 2019-06-17 11:21:36 +01:00
b1c0ec6c97 Remove some peek calls that have crept in 2019-06-16 14:21:34 +01:00
32ff341089 Link to the latest processed revision for a branch page 2019-06-16 10:45:22 +01:00
de8858c274 Make some pages around revisions more generic
So that they can also be used for the /branch/foo/latest-processed-revision
pages. The content is the same, but the title, link, and some of the links on
the page are different.
2019-06-16 10:27:14 +01:00
33956b394f Improve the error message when a load revision job fails
It's useful to know the commit.
2019-06-15 11:07:42 +01:00
13e2f87555 Support accessing the latest processed revision for a branch
This makes is easier to get the latest data for a branch in a single request,
rather than making one request to find the latest revision, then another to
get the data.
2019-06-13 23:14:04 +01:00
0bd1fc7e87 Display a backtrace for errors in channel->derivation-file-name
To help with debugging.
2019-06-13 23:13:34 +01:00
11144a5fe9 Catch the guix available when built
And use it for the hosting the inferiors, rather than computing the guix
package at runtime. This simplifies the behaviour when the Guix Data Service
is deployed as a Guix package.
2019-06-13 23:11:35 +01:00
6f379c7937 Rework creating /etc when building the derivation for a revision
Within an inferior. Just use the presence of open-inferior/container directly,
as this is more explicit.
2019-06-13 22:58:15 +01:00
7c75591f44 Don't show failing jobs on the index page
I'm not sure quite how to treat these yet, but for now, just stick with the
previous behaviour of showing revisions which haven't been processed yet,
along with the ones that have been successfully processed.
2019-06-13 19:19:04 +01:00
3a073d402d Display the request in one go
Otherwise, concurrent requests can cause the output to be interleaved.
2019-06-13 19:07:07 +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
64be346c8d Add sqitch and asset related config values 2019-06-08 10:28:03 +01:00
88922d9f11 Tweak the Makefile.am to install the right things
Install the assets and sqitch files, as they are needed. Remove the test
related sources.
2019-06-08 10:27:07 +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
33cf8d66f6 Add a healthcheck endpoint
This indicates currently if the database is accessible and a simple query can
be performed. I'm mostly looking at using this when writing a system test for
this service.
2019-06-06 21:08:34 +01:00
aad2c9d9e8 Extract the database connection handling from the server
Previously, one of the first things that happened when responding to a request
was a database connection was made, even when serving the CSS. This is
unnecessary, so move the database connection handling in to the controller.

Also, to allow for separating it out from the assets, separate the assets out
from the parts of the controller that require a database connection.
2019-06-06 20:43:54 +01:00
544dc1558f Add a new test to cover some of the loading new revisions code 2019-06-02 22:02:12 +01:00
5d06a28577 Add more detailed new revision job handling
Create a new events table for the new guix revision jobs, and update this when
processing a job starts, as well as finished with success or failure.

Additionally, remove the dependnency on open-inferior/container, as this
functionality isn't merged in to Guix master yet.
2019-06-02 22:00:29 +01:00
4ccf3132b6 Record job success without deleting the job record
Previously, the records for jobs would be deleted. It's useful to know when
jobs were inserted in to the database, as well as when they succeeded (if they
have). This change also makes it possible to keep track of jobs that have
failed, as they won't be deleted.
2019-06-02 21:48:02 +01:00
f03a750705 Add some missing test files to Makefile.am 2019-06-02 16:19:06 +01:00
95ad50a80c Fix #:no-default-when in the query-parameters module
It now actually looks at the fields which have been provided.
2019-05-20 08:22:41 +01:00
9c23451482 Handle the 404 case when viewing store items 2019-05-20 08:17:56 +01:00
6add08b109 Add missing revision handling
As previously the pages would render, but with no data.
2019-05-19 22:31:07 +01:00
cc0ecdc055 Add #:code to render-json 2019-05-19 22:30:50 +01:00
2c35331075 Add #:code option to render-html 2019-05-19 22:23:22 +01:00
e92e095ee9 Add an all results option to the packages page 2019-05-19 21:28:01 +01:00
0a7e6a76f3 Add #:no-default-when option to parse-query-parameters
Where there are multiple interrelated fields, then it's useful to only apply
the default if another field hasn't been specified.
2019-05-19 21:26:38 +01:00
9f94e3278e Improve the query-parameters module for checkbox support 2019-05-19 21:26:14 +01:00
78fb3fafc0 Add type support to form-horizontal-control
Particularly to support checkboxes.
2019-05-19 21:24:50 +01:00
d4b23f81c1 Cache the pages which don't really change for a day 2019-05-18 20:25:34 +01:00
0ca5748c0f Enable passing extra headers for JSON responses
Mostly to enable passing the cache-control header.
2019-05-18 20:25:05 +01:00
03faff5da0 Remove the HTTP headers from the html module
Given that the headers may be the same, regardless whether it's HTML or JSON
being sent in the body of the response, I think it makes more sense to handle
the headers in the controller.
2019-05-18 20:08:34 +01:00