2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/data-service.git synced 2023-12-14 03:23:03 +01:00
Commit graph

183 commits

Author SHA1 Message Date
Christopher Baines d4bb0ffaaa Fix more issues with the git_commits introduction 2022-05-23 22:49:51 +01:00
Christopher Baines e5cb793d4e Raise a clearer exception when a linter crashes 2022-05-23 19:19:57 +01:00
Christopher Baines 198b6ef719 Only clear the %store-table when it's defined 2022-05-17 12:06:09 +01:00
Christopher Baines 5727703d84 Clear cached store connections when fetching lint warnings
As I'm seeing the inferior process crash with [1] just after fetching the
derivation lint warnings.

This change appears to help, although it's probably just a workaround. When
there's more packages/derivations, the caches might need clearing while
fetching the derivation lint warnings, or this will need to be split across
multiple processes.

1: Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
2022-05-13 12:03:43 +01:00
Christopher Baines ff116d5e64 Clear out cached store connections in the load revision inferior
These cached store connections have caches associated with them, that take up
lots of memory, leading to the inferior crashing. This change seems to help.
2022-05-07 09:55:13 +01:00
Christopher Baines 9607bcedfe Move the builds.derivation_output_details_set_id update
To the end of the main revision processing transaction.

Currently, I think there are issues when this query does update some builds,
as those rows in the build table remain locked until the end of the
transaction. This then causes build event submission to hang. Moving this part
of the revision loading process to the end of the transaction should help to
mitigate this.
2022-04-16 18:47:54 +01:00
Christopher Baines 097e22ab5e Close the load revision inferior prior to inserting data
This means that the lock can be acquired after closing the inferior, freeing
the large amount of memory that the inferior process is probably using.
2022-03-11 13:27:55 +00:00
Christopher Baines 0f07826a20 Extract out the code for starting an inferior 2022-03-11 11:22:08 +00:00
Christopher Baines 8379427cbb Process each system target pair individually
As the cross targets take quite some time.
2022-03-11 11:12:18 +00:00
Christopher Baines 9db755f27d Disable value history in the inferior repl
This might help reduce memory usage a little.
2022-03-11 11:11:53 +00:00
Christopher Baines 0e3f65062a Compute more cross derivations 2022-03-11 10:07:08 +00:00
Christopher Baines fe556f4a4d Deduplicate inferior packages including replacements
Previously, duplicates could creep through if the duplicate wasn't exported,
and only found as a replacement. Now they're filtered out.

This isn't ideal, as duplicates aren't always mistakes, it would be useful
still to capture this package, but having multiple entries for the same
name+version causes the comparison functionality to break.
2022-03-04 14:22:10 +00:00
Christopher Baines 0cc749a1fa Simplify deduplicate-inferior-packages
Use the a-version and b-version variables, rather than calling the functions
again.
2022-03-04 14:20:41 +00:00
Maxime Devos 8ab72e633a Include the nl_NL.UTF-8 locale when processing revisions
It's 100% translated according to
<https://translate.fedoraproject.org/projecs/guix/guix/nl/>.

* guix-data-service/model/package-metadata.scm
  (locales): Add nl_NL.utf-8

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-03-02 21:05:30 +00:00
Christopher Baines 3a90798567 Address a few issues in the load new guix revision tests 2022-03-02 18:23:26 +00:00
Christopher Baines 4a9d45aa16 Skip dropping the log part sequence if there's a lock
So that the job completes. The sequence can be deleted later.
2022-02-21 13:02:57 +00:00
Christopher Baines a0a7d66b1d Move logging cleanup tasks to after the transaction commits
As I think some operations (like the database backup) can block the DROP
SEQUENCE bit, so at least this approach means that the main transaction should
commit and then the sequence is eventually dropped.
2022-02-19 09:54:39 +00:00
Christopher Baines 17167ef3e4 Change how package supported systems are handled
This code is a bit tricky, since it should be compatible with old and new guix
revisions. I think these changes stop computing package derivations for
invalid systems, while hopefully not breaking anything.
2022-02-18 12:21:08 +00:00
Christopher Baines 3840f588e5 Improve logging for system test derivation issues 2022-01-09 10:11:53 +00:00
Christopher Baines af209170f7 Track package replacements
Start at least looking for package replacements, and storing the
details (particularly the derivation). I'm looking at doing this so that build
servers using the Guix Data Service can build these derivations.
2021-07-11 11:57:05 +01:00
Christopher Baines 1a21bc40a8 Pass #:system to channel-instances->manifest
This is better than setting the %current-system, since more of the process
will run as native code.
2021-06-09 10:59:31 +01:00
Christopher Baines da0ee9dff0 Use filter-map rather than filter and map when processing linters
I guess this is a good change in general, but this seems to avoid a long
stack, which when a linter crashes, and the inferior tries to return the
exception details, and apparently hang the inferior/client as the reply isn't
written/read.
2021-05-16 20:54:07 +01:00
Christopher Baines 410f58cb43 Fix load revision jobs not failing if the extraction of data fails 2021-03-25 17:57:48 +00:00
Christopher Baines 07f903abaf Fix dropping the job lock 2021-02-05 11:07:07 +00:00
Christopher Baines 02b75d857a Reformat queries in the load-new-guix-revision module 2021-02-05 09:16:08 +00:00
Christopher Baines 570c667222 Tweak exception handling when loading revisions 2021-02-03 12:53:53 +00:00
Christopher Baines 643753ff46 Better handle retries for jobs
This was broken when the guix_revisions entry started being added before the
final commit.
2021-02-03 10:35:56 +00:00
Christopher Baines 7fbcb3a3c2 Store channel instance derivations in a separate transaction
This means that these derivations are stored, even if a later part of the
process fails. Having the channel instance derivations stored might help work
out why the failure occurred, or better display information about it.
2021-02-02 23:36:56 +00:00
Christopher Baines ea7331ad25 Don't ignore all system tests if computing one derivation fails 2021-01-14 20:45:03 +00:00
Christopher Baines bd8390673e Fix squee upgrade issues in the load-new-guix-revision module 2021-01-02 11:13:30 +00:00
Christopher Baines 64a4058cce Start to add compatibility with squee returning #f for null values
While maintaining compatibility for older versions of squee.
2021-01-02 10:06:27 +00:00
Christopher Baines 276c4ecd71 Vacuum the log parts table after deleting entries from it
To help keep the number of dead tuples down.
2020-11-17 20:49:47 +00:00
Christopher Baines e07b3291e8 Vacuum the package derivations table after each job
As each job deletes lots of rows in the table, vacuum it to free up space for
the next job.

I don't think this is something to do widely, but I wanted to try it out for
the tables which have a lot of churn.
2020-11-17 20:47:16 +00:00
Christopher Baines 6c47212c4d Improve the failed comparison page 2020-10-23 16:23:16 +01:00
Christopher Baines 4f3be14c16 Split the jobs metric in to succeede, queued and failed
Rather than just completed or not.
2020-10-09 20:19:28 +01:00
Christopher Baines 6023aa8caf Improve select-job-for-commit
It now returns #f or a list, rather than the empty list or a nested list.
2020-10-09 19:31:51 +01:00
Christopher Baines da8586f62d Guard against errors when recording job stderr output
This might help at least handle errors when inserting data in to PostgreSQL.
2020-10-09 19:28:06 +01:00
Christopher Baines 03ea66cf33 Use the git repository fetch with authentication value 2020-10-07 18:51:30 +01:00
Christopher Baines 6bc1da014f Better handle loading the (guix i18n) module in the inferior
Previously it would only be loaded if the (guix lint) module exists.
2020-09-26 16:07:53 +01:00
Christopher Baines 53341c70fc Change the locale codeset representation
From the normalized one, to the one actually contained within glibc. Recent
versions of glibc also contain symlinks linking the normalized codeset to the
locales with the .UTF-8 ending, but older ones do not.

Maybe handling codeset normalisation for queries would be good, but the locale
values ending in .UTF-8 are more compatible and allow the code to be
simplified. For querying, maybe there should be a locales table which handles
different representations.
2020-09-26 11:45:57 +01:00
Christopher Baines af2e12a9ef Add some new metrics about load new revision jobs 2020-09-20 19:13:23 +01:00
Danjela Lura 7984179f5e Guard against null package metadata ids
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-08-13 08:58:09 +01:00
Danjela Lura 5b3e5d9441 Update the package_metadata_tsvectors with new entries
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-08-12 08:53:49 +01:00
Christopher Baines a6a4a84b20 Avoid problems with lint warnings for duplicate packages
Use the deduplicated list of packages when fetching lint warnings, to avoid
duplicates. This was first seen in the following Guix commit
843344273c6a587b8e6c84d8406500fd64d8908a.
2020-08-09 16:53:26 +01:00
Danjela Lura 8d9a4d105c Get the translated package synopsis and descriptions into the database
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-19 16:03:32 +01:00
Danjela Lura f67bea719d Get the translated lint checker descriptions into the database
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-07 20:17:03 +01:00
Christopher Baines 4d4ee801c0 Guard against strange derivations for packages
Where the requested system doesn't match that of the returned derivation. This
seems to happen for packages like dev86, wine and go.
2020-04-24 21:37:35 +01:00
Christopher Baines d09a1ca791 Actually load the (guix lint) module if it's available 2020-04-20 14:29:33 +01:00
Christopher Baines 780ce66272 Adapt to the different inferior error handling
In recent versions of Guix on the Guix Data Service side, I don't think these
are system-error's, but a different type. For compatibility, just catch any
error.
2020-04-20 08:18:59 +01:00
Christopher Baines c4969eb33f Improve detecting if the (guix lint) module is available
Previously it would cause an error when it's not available, which is a bit
unnecessary.
2020-04-20 08:18:19 +01:00