Commit Graph

64 Commits

Author SHA1 Message Date
Ludovic Courtès 773fe2a19f Add dependency on Guile-lzlib.
Guix no longer provides the (guix lzlib) module.  This commit arranges
to use Guile-lzlib instead.
2020-08-26 11:27:54 +02:00
Christopher Baines 308e553b11 Guard against some changes in how guile-json represents null values 2020-06-19 14:12:56 +01:00
Christopher Baines 3cc14ae03a Add a couple of options to select-derivation-outputs-in-revision
To filter outputs by whether particular substitute servers have a substitute.
2020-05-03 21:20:53 +01:00
Christopher Baines 68420b1085 Support controlling the fields returned for package derivations
Mostly so that the builds can be avoided when querying for all the
derivations, as that's slow.
2020-04-24 10:17:12 +01:00
Christopher Baines 6fb3892712 Make it clearer that some things relate to package derivations
Rather than derivations in general.
2020-04-24 09:12:39 +01:00
Christopher Baines 64f1abd9ea Add i586-gnu as a valid system
This is present currently on core-updates. Ideally the valid-systems would
adapt to the revision, but for the moment just add it everywhere.
2020-04-20 08:57:44 +01:00
Christopher Baines e108ed34e2 Change the sort order for derivations on the package version page
Put the non-cross built derivations first.
2020-03-21 10:54:57 +00:00
Christopher Baines b19227c086 Order build statuses by id, not timestamp
Some builds from Cuirass change status at the same timestamp, so use the id
for ordering instead.
2020-03-01 15:57:35 +00:00
Christopher Baines 617af6c9d3 Properly sort the derivation outputs 2020-02-15 19:54:17 +00:00
Christopher Baines 374dc25440 Improve system and target query parameter handling 2020-02-13 23:11:59 +00:00
Christopher Baines f1989e8758 Rework cross derivations support
Stop using the system values as targets, and remove package derivation entries
where this is the case.

Switch the non-cross derivation case to have a target of "", rather than
matching the system, as this makes more sense, and is more consistent now that
the target values no longer match the system values.

Hardcode some more correct target values, and use these instead. Hopefully
this can be better integrated with Guix in the future.

This commit also includes a migration attempting to shrink some indexes.
2020-02-08 11:16:08 +00:00
Christopher Baines e070c20030 Make valid-systems quicker
In the future, it would be good to pull this from the database again, but in
some way which is really quick.
2020-01-05 12:01:06 +00:00
Christopher Baines d7036bdd37 Implement the search query input on the derivation outputs page 2020-01-04 22:15:39 +00:00
Christopher Baines ceb1f95a19 Add a function to search for derivations in a revision 2020-01-04 21:45:27 +00:00
Christopher Baines e5aca1f317 Remove the outputs from the query behind the revision derivations
As that data is now unused.
2020-01-04 21:20:32 +00:00
Christopher Baines b26ba82dad Add more timing and debugging output to the load process
To help identify what's taking the most time.
2020-01-04 11:20:02 +00:00
Christopher Baines d107830300 Add a #:loop? option to backfill-derivation-source-file-nars 2020-01-03 21:42:52 +00:00
Christopher Baines a6302a32ef Make it possible to specify the batch size
In backfill-derivation-source-file-nars.
2019-12-31 14:58:31 +00:00
Christopher Baines 2cb5309851 Display details for the derivation source files
If the nar file is available.
2019-12-30 12:32:20 +00:00
Christopher Baines 7881eec315 Add a function to backfill missing derivation source file nars
If the file exists in the local store, then read it and add an entry to the
derivation_source_file_nars table. This will help to fill in the missing
entries, as currently entries are only added when the derivation source file
isn't in the database when the load new revision job runs.
2019-12-30 11:26:23 +00:00
Christopher Baines 7e7cc1c8f1 Rework insert-derivation-sources to use a helper function
This means it returns ids properly.
2019-12-29 16:04:45 +00:00
Christopher Baines d15ba4f25c Serve narinfo files for derivation sources 2019-12-29 16:04:45 +00:00
Christopher Baines da3a294496 Serve nar files for the derivation source files 2019-12-29 16:04:45 +00:00
Christopher Baines 67af7e17f0 Generate and store nars for derivation source files
This'll allow serving nars for these derivation source files.
2019-12-29 16:04:45 +00:00
Christopher Baines f56935a8a6 Change the language around reproducibility/matching outputs
It's more accurate to describe the specifics of the relevant data here through
terms like "matching" and "not matching", as a statement that something built
reproducibility needs to be made alongside the test conditions. So just say
that build outputs matched, or didn't match, as this is more descriptive of
the data available.
2019-12-27 14:05:12 +00:00
Christopher Baines 7654877991 Improve the builds info on the revision package version page
Show multiple builds, and link to the build page.
2019-12-27 00:09:07 +00:00
Christopher Baines 0e3c28ffbd Fix more cases where equivalent builds were missed 2019-12-26 23:22:54 +00:00
Christopher Baines 0cea51cc79 Add copyright and license headers to a bunch of source files
That were missing them.
2019-12-26 10:16:55 +00:00
Christopher Baines 120af42c24 Add a function to fetch references for derivations
This replicates the store item references for the derivation, through looking
up the inputs which the derivation references, and also the sources.
2019-12-26 09:34:41 +00:00
Christopher Baines e3d8a23716 Add a function to fetch a derivation by file name hash 2019-12-26 09:34:35 +00:00
Christopher Baines b504094262 Use the returned file name in select-derivation-by-file-name
They should be the same, but it seems more sensible to return the value from
the database.
2019-12-26 09:34:08 +00:00
Christopher Baines a92d4d0cf2 Add a function serialize a derivation
This effectively duplicates the behaviour in Guix for serializing derivations,
but this uses the database representation in the Guix Data Service, rather
than the records Guix uses.
2019-12-26 09:04:00 +00:00
Christopher Baines 21e298f68c Ensure output ordering for derivations is correct
This affects the formatted derivation output.
2019-12-26 09:03:38 +00:00
Christopher Baines dd94f59acf Fix the representation of the fixed output derivation hashes
Previously, they were nix-base32-string encoded, but the representation in the
derivations is base16, so it doesn't make sense to use a different
representation in the database.

Therefore, add some code that runs before the start of each job to convert the
data in the database. It was easier to do this in Guile with the existing
support for working with these bytevector representations. After some
migration period, the code for converting the old hashes can be removed.
2019-12-26 08:53:51 +00:00
Christopher Baines 4eb5a3417c Group derivation input outputs together by derivation
Both in terms of the code fetching the data from the database, as well as the
formatted and detail outputs. This corrects an error in the formatted output
for derivations where inputs would be duplicated.
2019-12-26 08:52:04 +00:00
Christopher Baines 4af643136e Allow filtering by system and target on the derivation-outputs page
So that this can match up with the package reproducibility page.
2019-12-16 20:29:28 +00:00
Christopher Baines 9dddf2c606 Implement the reproducibility status filter
On the derivation-outputs page.
2019-12-14 17:10:23 +00:00
Christopher Baines f13077d087 Remove non-existent export from the derivation module 2019-12-12 20:07:22 +00:00
Christopher Baines eecfdeb9e4 Add a function to select the outputs in a revision 2019-12-12 20:07:22 +00:00
Christopher Baines 544f122ff5 Fix related builds in select-derivations-in-revision
Rather than just counting builds where the derivation matches, select builds
based on the derivation outputs, which accounts for different but equivalent
derivations.
2019-12-12 20:07:22 +00:00
Christopher Baines a965ba1f6a Start storing and identifying sets of derivation outputs
Derivations are effectively equivalent if they produce the same set of
outputs, which is possible because of the equivalence of fixed output
derivations. A fixed output derivation can be different, but equivalent,
because it produces the same fixed output.

To better allow tracking equivalent derivations, primarily to allow working
out what derivations might correspond to a build, store the sets of derivation
outputs, and which derivations they relate to.
2019-12-12 20:07:22 +00:00
Christopher Baines 0cebb97340 Add a function to select derivations in a revision 2019-12-12 20:07:22 +00:00
Christopher Baines 20c75e1103 Fix some queries relating to the build_status table changes 2019-11-28 19:32:00 +00:00
Christopher Baines 759ced5c9d Add a function for selecting derivation source files 2019-11-21 19:54:54 +00:00
Christopher Baines 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
Christopher Baines 41afcef9a6 Add a function to select derivation sources 2019-11-09 20:47:38 +00:00
Christopher Baines 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
Christopher Baines 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
Christopher Baines 2485da7cfc Use numbers for ids in the derivation model
As this is easier to handle when doing queries with PostgreSQL, as you can use
the type information to determine how to handle the values.
2019-09-05 16:07:23 +02:00
Christopher Baines c1fad22cd1 Handle a change in guix with the <derivation-input> record
The first field is now a <derivation> record, rather than a store path for the
derivation.

It's probably not necessary to cope with two versions, but this is what I've
done currently.
2019-09-01 17:40:16 +01:00