Commit graph

122 commits

Author SHA1 Message Date
71f483c816 Add a few imports in preparation for Guile 3 2020-02-27 21:12:16 +00:00
2f41fe79be Adapt some license related code to work without mock in the tests
With Guile 3, there's a potential for mock to work in even fewer
circumstances. So, adapt the code to enable writing the tests without mock.
2020-02-24 21:47:34 +00:00
ce10833459 Switch to using some shorter syntax for logging time taken
In the load-new-guix-revision module.
2020-02-24 21:31:04 +00:00
f57b5c4a9a Add missing ROLLBACK for transaction 2020-02-24 18:50:34 +00:00
cee9acaa87 Refactor the logging setup out of process-load-new-guix-revision-job
To simplify both procedures.
2020-02-24 18:46:53 +00:00
36254f98e3 Improve the job logging
Switch to using a sequence for the ids in the log parts table, and spawn a
thread to listen for output from the inferior processes, and enter it in to
the database.
2020-02-15 17:42:07 +00:00
40f6de27f6 Make deleting the existing log parts optional 2020-02-15 16:49:37 +00:00
46c8ce5b82 Define a new parameter for a port used for the inferior error output 2020-02-15 13:41:17 +00:00
f6f51bbe0d Fake the store connection in the tests
So that the tests don't require a store connection.
2020-02-14 09:18:28 +00:00
5410961f65 Add temporary roots for channel instance derivations 2020-02-13 23:11:36 +00:00
0ef3349ed8 Use a more long lived store connection for loading data
As this will enable registering temporary roots, to avoid store items being
garbage collected.
2020-02-13 23:11:36 +00:00
9be7dbac0b Start storing channel instance derivations
These are the ones that relate to Guix pull.
2020-02-11 08:56:24 +00:00
406aa5e160 Switch using set-current-system to parameterize
As this is neater.
2020-02-11 08:55:34 +00:00
e0ee3d224b Refactor how channel derivations are handled
Yet again...

This makes the channel-derivations for each system accessible within the
load-new-guix-revision procedure, in preparation for storing them in the
database.
2020-02-09 21:40:56 +00:00
60d53f898f Collpase store-item-for-channel in to channel->guix-store-item 2020-02-09 21:06:12 +00:00
13b0ebe561 Start computing channel instance derivations for multiple systems
These aren't stored yet, but this is a start.
2020-02-09 21:03:05 +00:00
beab4babac Further refactor channel->derivation-file-name
To reduce the line length.
2020-02-09 16:44:18 +00:00
9c38115c3d Refactor channel->derivation-file-name to reduce line length 2020-02-09 16:39:46 +00:00
3ee481110e Shift extracting channel news to later on
To avoid race conditions between jobs, have it happen after the call to
extract-information-from.
2020-02-09 10:20:36 +00:00
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
8f0d5b51b1 Store information about system tests 2020-02-03 09:57:02 +01:00
65850669a0 Log the time to lock package_versions_by_guix_revision_range 2020-02-02 11:14:35 +01:00
908f6d3eee Log the time to lock load-new-guix-revision-inserts 2020-02-02 11:14:35 +01:00
956aa9ecb0 Log the time taken to acquire advisory session locks 2020-02-02 10:10:25 +01:00
f59354ed23 Call add-temp-root for the derivation file names
In an attempt to stop the derivations from being garbage collected between the
time they're generated, and when they're potentially read by the Guix Data
Service.
2020-02-02 08:30:02 +01:00
ee82c2c71d Refactor processing lint warnings
Extract out a function to make the code slightly easier to read.
2020-02-01 10:32:49 +01:00
1ab6ecd64f Use the line numbers to make the package deduplication more stable
Previously this would just compare on the version if the name was the same,
but there are package definitions that share the name and version (itstool is
one example).

To try and make this more stable, to avoid weird errors, and unstable
comparisons between revisions, use the line number when deduplicating
packages.
2020-01-21 23:55:36 +00:00
a66cbd41f9 Fail early if a package lookup fails when loading a revision
I think this might be happening when packages are filtered out as
duplicates (by name and version), but then a reference to a duplicate occurs
somewhere, like in a lint warning.
2020-01-21 23:53:52 +00:00
b43fe39ab8 Fix setting GUIX_LOCPATH when using open-inferior/container 2020-01-13 22:24:18 +00:00
2062badf51 Add a small table of recent job events
To make it easier to see what recently happened.
2020-01-12 17:30:52 +00:00
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
f2343b5fc9 Switch to using package-supported-systems, not the transitive one
This seems to work better for both generating the non-cross and cross
derivations. Previously, using the package-transitive-supported-systems
approach didn't generate some cross derivations.
2019-12-31 10:29:02 +00:00
df9d0bbdd1 Improve generating derivations for foreign architectures
Use the second argument to package-transitive-supported-systems to correctly
identify the different bootstrap path for non x86_64 and i686-linux. The
previous implementation did work, but only up until a merge of core-updates
changed the bootstrap approach.
2019-12-31 10:23:29 +00:00
5163398e54 Add pagination to the jobs page 2019-12-26 23:03:12 +00:00
0cea51cc79 Add copyright and license headers to a bunch of source files
That were missing them.
2019-12-26 10:16:55 +00:00
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
474d942cbb Better handle errors within process-load-new-guix-revision-job 2019-12-23 19:28:13 +00:00
639f24bb22 Extract management of package_derivations_by_guix_revision_range
... entries in to a separate module, to split the code up a little further.
2019-12-22 16:09:32 +00:00
ebefc7815e Fix the use of defined? in relation to channel news
This worked fine in a REPL, but here it seems the module needs to be passed.
2019-12-22 15:23:16 +00:00
c8b93cb0d0 Add new derivation_output_details_set_id column to the builds table
As this will hopefully provide a faster way of associating derivations with
builds.
2019-12-12 20:07:22 +00:00
78695c46a1 Just update the package derivation entries that need updating
Previously, all the entries for the branch were deleted, but not, only the
entries for the branch, that are present in the revision that was loaded will
be deleted. This is more efficient, as it avoids deleting and recreating
entries in the table that shouldn't have changed.
2019-11-24 20:18:08 +00:00
f23ee71ea7 Insert channel news entries when loading new guix revisions
If the channel-news-for-commit function is present.
2019-11-21 19:56:19 +00:00
2e8ca7f547 Extract out creating the guix-revision from extract-information-from
To allow for using the guix-revision-id when inserting channel news entries.
2019-11-21 19:56:19 +00:00
66d726f1fd Refactor channel handling in the load-new-guix-revision module
To allow for passing the channel to channel-news-for-commit.
2019-11-21 19:56:19 +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
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
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
af1ffc2393 Add a page for queued jobs 2019-10-12 21:16:39 +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