Commit graph

1464 commits

Author SHA1 Message Date
5b82be803c Fix the select-guix-revision-for-branch-and-datetime query
I think it was broken with the git_branches/git_commits switch.
2022-05-30 23:29:42 +01:00
4b8846a861 Remove cross derivation targets that don't make sense
This matches the previous behaviour without using the platform data.
2022-05-27 10:09:09 +01:00
fb8353559f Take advantage of the new (guix platform) module
This means there's less reliance on the hardcoded lists of systems and targets
and mappings between them.
2022-05-26 00:24:55 +01:00
786a5fa041 Improve the package derivation by guix revision range insert queries 2022-05-26 00:23:56 +01:00
e0f5ad3f51 Add missing comma in query 2022-05-24 13:56:48 +01:00
b73cfa5d49 Fix delete-guix-revision-package-derivation-entries
For the table schema change.
2022-05-24 12:22:52 +01:00
512b43ec73 Fix expected exec-query value when no branch exists 2022-05-24 08:43:32 +01:00
d4bb0ffaaa Fix more issues with the git_commits introduction 2022-05-23 22:49:51 +01:00
6d403cbc8d Allow filtering package derivations based on build server builds
This means you can query for derivations where builds exist or don't exist on
a given build server.

I think this will come in useful when submitting builds from a Guix Data
Service instance.
2022-05-23 22:39:32 +01:00
40035bcf9a Fix more of rebuilding one of the tables 2022-05-23 21:18:59 +01:00
3596eceed5 Add missing git_branches query part to insert query 2022-05-23 20:22:54 +01:00
e5cb793d4e Raise a clearer exception when a linter crashes 2022-05-23 19:19:57 +01:00
64be52844e Partition the package_derivations_by_guix_revision_range table
And create a proper git_branches table in the process.

I'm hoping this will help with slow deletions from the
package_derivations_by_guix_revision_range table in the case where there are
lots of branches, since it'll separate the data for one branch from another.

These migrations will remove the existing data, so
rebuild-package-derivations-table will currently need manually running to
regenerate it.
2022-05-23 19:10:25 +01:00
89545caa3f Fix branch links on the repository page
Thanks to Tobias for reporting.
2022-05-20 12:18:58 +01:00
198b6ef719 Only clear the %store-table when it's defined 2022-05-17 12:06:09 +01:00
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
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
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
27c34a9ca5 Fix a couple of things on the package substitute availability page
When there's a target, render the heading neatly, and include the target
parameter in the URLs.
2022-03-12 10:49:19 +00:00
c0679185b8 Fix an issue with the /builds page 2022-03-11 13:27:59 +00:00
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
df4e0a7a61 Add to the hardcoded list of valid targets
Since the hardcoded list in the load-new-guix-revision code has been updated.
2022-03-11 11:50:10 +00:00
0f07826a20 Extract out the code for starting an inferior 2022-03-11 11:22:08 +00:00
8379427cbb Process each system target pair individually
As the cross targets take quite some time.
2022-03-11 11:12:18 +00:00
9db755f27d Disable value history in the inferior repl
This might help reduce memory usage a little.
2022-03-11 11:11:53 +00:00
0e3f65062a Compute more cross derivations 2022-03-11 10:07:08 +00:00
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
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
3a90798567 Address a few issues in the load new guix revision tests 2022-03-02 18:23:26 +00:00
f86657915e Try to further speed up inserting missing derivation source files
Switch from using a recursive query to doing a breath first search through the
graph of derivations, as I think PostgreSQL wasn't doing a great job of
planning the recursive queries (it would overestimate the rows involved, and
prefer sequential scans for the derivation_outputs table).
2022-03-02 18:00:36 +00:00
c5b504e94a Speed up the finding of missing sources
Use larger batches and more efficient duplicate deletion.
2022-03-01 20:57:26 +00:00
6cd3541d1a Add a faster delete-duplicates function
Which is useful when deleting duplicates from large lists.
2022-03-01 20:34:06 +00:00
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
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
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
4a1088c216 Switch to guile-fibers@1.1
I think the main change required is just to stop accessing the now missing
current-fiber parameter.
2022-02-09 17:20:54 +00:00
8ed53099ba Fix some URL encoding issues around derivation names 2022-01-31 20:27:11 +00:00
86cd96ea87 Rename data to nars for package derivation outputs
As this is clearer.
2022-01-31 20:26:47 +00:00
752d21ad05 Improve the way the field fields work on various pages
Remove the brackets from the values since this makes the set of values more
consistent, and don't display the no additional fields value on the page.
2022-01-31 20:25:06 +00:00
f1418c4e88 Support querying package derivation outputs without the nars
Since this speeds up the response if you don't need the nar information.
2022-01-31 20:24:27 +00:00
11ec8a8064 Make the revision derivation counts numbers 2022-01-22 18:47:38 +00:00
cbef46e682 Include the commit hash in the revision JSON response
For the latest processed revision, this is useful for looking up which is the
latest processed revision.
2022-01-22 17:18:05 +00:00
a7c9daab6a Process derivations in chunks
Which should reduce the peak memory usage.
2022-01-14 15:25:53 +00:00
5a1b6d41eb Fix chunk-for-each! calling proc when there's nothing to do 2022-01-14 15:25:35 +00:00
5ae8b796a7 Rename chunk-map! to chunk-for-each!
As that better reflects what it does.
2022-01-14 15:25:13 +00:00
fcf1177d2c Don't count exiting with a status of 0 as a failure 2022-01-14 15:24:12 +00:00
21cb33a859 Re-write insert-derivation-inputs in a more memory efficient manor
Previously it would compute a long list of strings, potentially more than
100,000 elements long, then split this string up and insert it in chunks. Only
then could memory be freed.

This new approach builds the strings in batches for the insertion query, then
moves on to the next batch. This should mean that more memory can be freed and
reused along the way.
2022-01-12 18:18:15 +00:00
6102553d94 Record job failure on non-0 exit status
This is helpful when the jobs fail through Guile running out of memory for
example.
2022-01-12 18:17:52 +00:00
f1d8d76c4d Improve the process jobs script signal handling
The return value of sleep is unreliable (see guile bug #53139), so use a
signal handler instead.
2022-01-09 10:30:03 +00:00