Commit graph

305 commits

Author SHA1 Message Date
ab51599057 Include the hash algorithm and hash on the formatted derivation page 2019-11-10 09:41:32 +00:00
34318fbb50 Improve select-derivation-outputs-by-derivation-id
It now converts the recursive value to a boolean.
2019-11-10 09:39:45 +00:00
a658d64b46 Add a page to show a formatted derivation representation
The HTML is very rough, and the way it's displayed is also rough, but it does
provide a way to understand the derivation. I'm also unsure it's a perfect
representation, but it's a start at least.
2019-11-09 20:50:53 +00:00
41afcef9a6 Add a function to select derivation sources 2019-11-09 20:47:38 +00:00
7b3bc5bcfa Improve some derivation model functions
Return integer values for ids, rather than strings (as this type is more
appropriate). Also, better parse the derivation arguments and environment
variables.
2019-11-09 20:39:47 +00:00
4710d4e398 Add a function to help parse PostgreSQL arrays 2019-11-09 20:27:14 +00:00
04bb2d52bc Add first version of a page with the history of package derivations
Some filtering options need adding for the system and target, as it's
currently hardcoded, but the general page does work.
2019-11-09 20:07:34 +00:00
1442d17a3d Add a new table to describe the history of derivations
There's already the package_versions_by_guix_revision_range table, but I think
it would be also useful to be able to see how derivations change over time.
2019-11-09 19:59:55 +00:00
fea4dc9385 Sort the derivation inputs by derivation file name
As this is the way they're sorted in the derivation.
2019-11-03 16:04:51 +00:00
5e1808b4c2 Work around a problem loading guix revisions
Between b13b9384bc43bf93c754c037956c8ef9a99c2b41 and
601171a9bc7ca6e4acb932895a07c0ca9aedfdac, this method failed, so catch the
error to allow loading the affected revisions.
2019-11-03 15:46:44 +00:00
5e2bc7c6e9 Fix various warnings relating to the controller refactoring 2019-10-18 18:44:42 +01:00
263eb0e0a9 Handle unknown requests better within controllers 2019-10-18 17:23:59 +01:00
c9e0e311bb Send inferior error output to stderr
Ideally this would go in to the database somehow as well, but the only idea I
have for that is pass in a pipe, and then spawn a thread to read from the
other end of that pipe in a loop to send the output to the database.

That hasn't been written yet, so just send the output to stderr for now.
2019-10-18 17:15:45 +01:00
917d031d4f Remove unused inferior-package-transitive-supported-systems function 2019-10-18 17:15:25 +01:00
b36294da4a Fix some missing branch constraints in package-versions-for-branch
The lack of these meant that versions on other branches could appear in the
results.
2019-10-17 21:24:48 +01:00
818be2ed98 Fix some long lines in the package-versions-for-branch query 2019-10-17 21:24:22 +01:00
4ce8d9e830 Extract the comparison pages out from the main modules
In to their own modules. This should help make the code more understandable,
and allow future refactoring for readability.
2019-10-14 19:24:14 +01:00
94256c4fa1 Move the unknown-revision function to the correct module 2019-10-14 18:38:11 +01:00
86db73c05a Refactor the repository pages code
Move it out of the main controller and html modules to better separate the
code, which should allow to make it easier to read in the future.
2019-10-14 18:28:25 +01:00
49ea210382 Refactor the revision pages
Move the code to a more specific controller and html module. There's a lot of
code related to the revision pages, and having it separated will help with
refactoring it.
2019-10-14 17:55:08 +01:00
660df79a69 Remove the query-parameters from controller-with-database-connection
As I believe it's unused.
2019-10-13 21:12:43 +01:00
06723370e5 Refactor the jobs pages code
Move the code out of the main controller and html modules. There's now too
much code in these modules, so begin to separate the functionality, starting
with the small amount of code for the jobs pages.
2019-10-13 21:10:10 +01:00
955ada8bca Add a compare-by-datetime page
This is to compare the state of a branch (or two different branches) at two
different times. This complements the ability to compare by revision to be
able to just compare by date and time. The relevant revisions are determined,
and then compared as normal.

This is only a very rough initial implementation, as I'm hoping to refactor
the code to reduce duplication.
2019-10-13 20:51:47 +01:00
15db1b0688 Add a variant of compare/derivations to work with a branch and datetime 2019-10-13 19:47:19 +01:00
fc6aeab4ed Add select-guix-revision-for-branch-and-datetime
To get the guix revision that was on a branch at a given date and time.
2019-10-13 19:46:04 +01:00
9fa2e9e5ac Improve linking between the Jobs and Job queue pages 2019-10-12 21:50:13 +01:00
2b9c882e5a Improve error handling for comparison pages 2019-10-12 21:43:34 +01:00
af1ffc2393 Add a page for queued jobs 2019-10-12 21:16:39 +01:00
2279f1e013 Remove the now redundant with-base-and-target-commits function
Uses of this have been replaced with parse-query-parameters.
2019-10-12 18:40:18 +01:00
116775ad06 Switch the compare page to use parse-query-parameters 2019-10-12 18:39:45 +01:00
30051a3740 Switch the compare/packages page to use parse-query-parameters 2019-10-12 17:30:01 +01:00
356a5954b2 Add support for using a database URI
As this is useful when working with pg_tmp.
2019-10-08 19:45:41 +01:00
ab8a02cf13 Sort package versions on a branch by version as well
To fix the order when the first_datetime matches.
2019-10-08 19:44:09 +01:00
dbe171bc75 Handle potentially serving assets from the store 2019-10-06 14:23:15 +01:00
eab5a70976 Add a new static-asset-from-store-renderer function
Previously, the assets would be served from the store normally, but this meant
that they were read from disk each time, and stat calls were used to determine
when they were last modified.

This doesn't work for files in the store, as the timestamps are normalised,
therefore add a renderer that takes advantage of the asset directory being in
the store. All the files are read at startup, and then stored in memory. Also,
the process start time is used as a value for the last modified header, which
isn't ideal, but it's better than 1970.
2019-10-06 14:19:26 +01:00
7e5d54148d Add assets-dir-in-store? to the config module
To allow looking up if the assets are in the store, which will happen if the
Guix Data Service is running from a Guix package.
2019-10-06 14:18:38 +01:00
8019d2e687 Add "No lint warning changes" message to compare page 2019-10-05 11:11:22 +01:00
a104fbc5e1 Link from the revision package page to the version history page 2019-10-03 22:08:06 +01:00
fb301a8495 Add a package page, showing versions for a revision 2019-10-03 21:35:29 +01:00
a40a8f0f92 Rename render-revision-package to render-revision-package-version
As this name is more specific.
2019-10-03 20:15:56 +01:00
427063c812 Make it easier to retry jobs
Add a new event 'retry', and run jobs where the number of retry events is
greater or equal to the number of failure events.

Also add an index to the git_branches table to make the finding jobs query a
bit faster.
2019-10-02 21:54:11 +01:00
48bdb35f3e Hide deleted branches on the index page
To keep the page length down. All branches can still be seen on the page for
specific repositories.
2019-09-29 17:12:50 +01:00
e486ba6274 Remove a redundant query condition
The git_branches.commits column doesn't allow NULL values.
2019-09-29 17:12:20 +01:00
b90e6289ac Fix the 'NULL' values in git_branches for the commits
The git_branches table had 'NULL' values for some commits where the branch was
deleted, importantly this was the string 'NULL', not an actual NULL value.

This commit fixes that, migrating the existing values to be '', and changing
the relevant code.

The primary key is also extended to include the datetime field, as this is
important to allow a branch to be deleted twice.
2019-09-29 17:10:04 +01:00
580900b0f4 Fail early if the inferior is #f
This happens when the repl can't be loaded for example.
2019-09-29 10:45:46 +01:00
208122317a Try setting the en_US.UTF-8 locale, if the normalised fails
Older versions of the glibc-locales package just contain the UTF-8 variants,
not utf8.
2019-09-29 10:44:53 +01:00
d236f05d0f Don't error when processing revisions of Guix without graft support 2019-09-29 10:44:25 +01:00
c81d1e04ea Handle loading revisions without the (guix lint) module
This is a recent addition, so to support loading revisions without it, better
handle the error when loading the module.
2019-09-29 00:21:25 +01:00
15b94238c5 Unset the GUILE_LOAD_* environment variables when using inferiors
Otherwise modules from outside of the inferior can leak in.
2019-09-28 23:56:41 +01:00
16ed3e376e Provide the job id for jobs on the revision page
Using the title element, as the identifier is internal, but it's useful for
development to be able to find it out, if you want to run the job for testing.
2019-09-28 23:55:50 +01:00