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

1259 commits

Author SHA1 Message Date
Christopher Baines 0f22e3ab40 Rework insert-blocked-builds to make it more efficient
This also fixes a typo in the partition name.
2022-11-11 11:29:37 +00:00
Christopher Baines 4101c6b897 Stop using exception handling when inserting blocked_builds entries
As it doesn't work in a transaction.
2022-11-11 10:51:12 +00:00
Christopher Baines 01e54c36db Add missing test description 2022-11-11 10:35:09 +00:00
Christopher Baines 989916b740 Add a blocking builds page 2022-11-11 10:35:09 +00:00
Christopher Baines 1fb291be40 Add support for incrementally tracking blocked builds
This will hopefully provide a less expensive way of finding out if a scheduled
build is probably blocked by other builds failing or being canceled.

By working this out when the build events are recieved, it should be more
feasible to include information about whether builds are likely blocked or not
in various places (e.g. revision comparisons).
2022-11-11 10:35:09 +00:00
Christopher Baines 95064d39a3 Log heap size when computing system tests 2022-11-06 08:53:04 +01:00
Christopher Baines 1e2826e095 Add more granular logging for computing system test derivations 2022-11-06 08:47:58 +01:00
Christopher Baines d06230fcf4 Close postgresql connections when the thread pool thread is idle
I think the idle connections associated with idle threads are still taking up
memory, so especially now that you can configure an arbitrary number of
threads (and thus connections), I think it's good to close them regularly.
2022-10-23 11:28:37 +01:00
Christopher Baines aaec813cba Fix JSON response for unknown revisions 2022-10-17 16:07:46 +01:00
Christopher Baines 8dd164665a Expose Guile GC metrics
As the guix-data-service process seems to be using excessive amounts of
memory, and this will be useful to track it.
2022-10-09 11:13:28 +01:00
Christopher Baines ff77bbea7e Make it possible to increase the number of thread pool threads
And double the default to 16.
2022-10-02 15:08:18 +01:00
Christopher Baines ce2e13aa45 Log delays in the thread pool channel
As I think with lots of requests, this could become a bottleneck.
2022-10-02 14:57:02 +01:00
Christopher Baines 640386a84d Insert guix revision lint warnings in chunks
To avoid long running queries.
2022-09-17 08:53:23 +02:00
Christopher Baines 78a5abee21 Improve chunking when inserting derivation inputs
Chunk the values inserted in the query, rather than the derivations involved,
as this is more consistent.
2022-09-17 08:53:23 +02:00
Christopher Baines 7050ea749f Reduce some chunk sizes 2022-09-17 00:40:51 +02:00
Christopher Baines 35cf9ba1bc Chunk inserting guix revision package derivation entries 2022-09-15 16:25:41 +02:00
Christopher Baines 8ef896b103 Further reduce some chunk sizes 2022-09-15 16:25:31 +02:00
Christopher Baines 37e8af60fb Chunk the data for some queries in insert-missing-data-and-return-all-ids
This helps to avoid queries getting logged as slow just because of the amount
of data.
2022-09-15 09:18:19 +01:00
Christopher Baines d791c2bd8a Format some queries generated in insert-missing-data-and-return-all-ids 2022-09-14 15:42:16 +01:00
Christopher Baines f41bfcf8b6 Reduce some chunk sizes
As these queries are still slow enough to be logged.
2022-09-14 15:42:00 +01:00
Christopher Baines 189b9a4e86 Implement the JSON response for package reproducibility 2022-09-14 10:52:04 +01:00
Christopher Baines ec3dba4894 Implement the JSON response for package substitute availability 2022-09-14 10:37:33 +01:00
Christopher Baines e3062abf33 Speed up finding the locales for a revision 2022-09-14 10:26:03 +01:00
Christopher Baines 12af30c039 Reduce chunk size for inserting dervation inputs
As this query can take some time.
2022-09-14 09:48:59 +01:00
Christopher Baines 77c4e1cb63 Reduce the chunk size for querying related derivation ids
And include the chunk size in the log message.
2022-09-13 21:00:04 +01:00
Christopher Baines ad39492cf0 Support per repository configuration for fetching substitutes
This is so that data.qa.guix.gnu.org can be configured only to query the
branches from the main repository.
2022-09-09 12:39:38 +01:00
Christopher Baines 45e25c2436 Make caching exceptions when querying for substitutes more reliable 2022-09-09 12:33:15 +01:00
Christopher Baines 076331325a Log more information about heap size when loading derivation info
To better understand the memory usage when this is happening.
2022-09-05 14:23:10 +01:00
Christopher Baines b3d59c650a Use much smaller chunks when trying to run the derivation linter
Since larger chunks still ran in to inferior memory usage problems.
2022-09-05 14:22:38 +01:00
Christopher Baines aa8c9dbffa Compute lint warnings for packages in chunks
In an attempt to reduce the peak memory usage, and avoid running in to the:

  Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS

issue.
2022-09-05 08:40:27 +01:00
Christopher Baines 1043b51bff Include lint warnings in the JSON /compare response 2022-08-22 17:42:37 +01:00
Christopher Baines ee73d2cc98 Return 503 for the /healthcheck if the service is starting up
As this is a little clearer.
2022-07-15 09:24:46 +01:00
Christopher Baines 1962b1f61c Fix missing NULL variable 2022-07-09 17:14:55 +01:00
Christopher Baines 39487cd7e6 Improve deleting derivations
Drop the batch size to get rid of warnings about memory usage and improve the
logging by adding duration information.
2022-07-08 20:55:58 +01:00
Christopher Baines 788571f53f Set builds derivation output details set id if information available
The build event information can now contain the derivation outputs, as well as
the name of the derivation. This allows the Guix Data Service to join builds
up with derivations, even if it doesn't know about the derivation being built.
2022-07-08 13:48:08 +01:00
Christopher Baines 6da5e8e67b Sort derivation output details ids
To ensure that direct array comparison can be used in the query.
2022-07-08 13:47:52 +01:00
Christopher Baines db37d9f6a8 Split out inserting derivation output details sets
So that this can be used when inserting builds.
2022-07-08 13:47:52 +01:00
Christopher Baines 811256a920 Split out inserting into derivation_output_details
So that this can be done when inserting builds.
2022-07-08 13:47:52 +01:00
Christopher Baines 8e23d38660 Handle migrations and server startup better
The server part of the guix-data-service doesn't work great as a guix service,
since it often fails to start if the migrations take any time at all.

To address this, start the server before running the migrations, and serve the
pages that work without the database, plus a general 503 response. Once the
migrations have completed, switch to the normal behaviour.
2022-06-17 13:13:21 +01:00
Christopher Baines d19eb07138 Add an index on git_commits
And also remove the duplicates that have crept in.
2022-06-17 12:54:43 +01:00
Christopher Baines 3b5950024b Add an index on package_derivations_by_guix_revision_range
This helps render the package version range related pages.
2022-06-17 12:51:10 +01:00
Christopher Baines 22c2ed2fa7 Fix ambiguous id column in delete-guix-revisions query 2022-06-16 12:46:32 +01:00
Christopher Baines 754f64718f Fix DELETE query in delete-revisions-from-branch 2022-06-16 12:38:51 +01:00
Christopher Baines be45e4251e Fix ambiguous id column in delete-from-git-commits 2022-06-16 12:30:08 +01:00
Christopher Baines 71aaf1016b Remove duplicate AND from delete-from-git-commits query 2022-06-16 12:25:47 +01:00
Christopher Baines 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
Christopher Baines 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
Christopher Baines 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
Christopher Baines 786a5fa041 Improve the package derivation by guix revision range insert queries 2022-05-26 00:23:56 +01:00
Christopher Baines e0f5ad3f51 Add missing comma in query 2022-05-24 13:56:48 +01:00