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

252 commits

Author SHA1 Message Date
Christopher Baines e273e22042 Switch queries across to use latest_build_status 2020-10-13 19:35:40 +01:00
Christopher Baines 83884ed2ea Add a latest_build_status table
This will avoid many queries trying to figure out what the latest build status
is, which will hopefuly simplify queries as well as improving performance.
2020-10-13 19:31:43 +01:00
Christopher Baines f15dc5ab0b Include package details for the package derivation outputs JSON
So it's easier to match the output back to the package.
2020-10-13 18:51:21 +01:00
Christopher Baines f1eb2d3bd2 Change table-schema to detect when there are no results
This might give more insight to the [1] errors occuring for some builds.

1: error: couldn't find data for locale in ()
2020-10-08 17:36:21 +01:00
Christopher Baines 9f9c23010e Support storing whether to authenticate commits by git repository
To allow using the Guix Data Service when commits aren't authenticated.
2020-10-07 18:50:13 +01:00
Christopher Baines 125a35fce5 Reformat lint warning related query 2020-10-02 17:52:07 +01:00
Christopher Baines af40c1ac13 Speed up a query for derivation builds
This change removes a sequential scan from the query plan, making it much
faster.
2020-10-02 17:51:55 +01:00
Christopher Baines 992a0af63e Split off delete-revisions-from-branch from delete-data-for-branch
To support not deleting all of the revisions.
2020-09-26 18:23:21 +01:00
Christopher Baines faf46565ce Fix some package search issues
Previously, the name wasn't taken in to account when filtering results, so a
search like "git-annex" wouldn't find the git-annex package, since it's
synopsis or description doesn't include the name.

Filtering on the name made the queries much slower, so to address that, the
filtering by revision is moved to a separate part of the CTE, which means
PostgreSQL filters down the rows by quite a lot before it begins filtering by
name.

Also, add in a variant of the query without dashes (-) because that helps with
searches like ruby-engine.
2020-09-26 16:05:06 +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 857ac36711 Return a number from count-guix-revisions 2020-09-20 18:38:39 +01:00
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
Danjela Lura 086cb9c9d0 Modify the search-packages-in-revision query to make it faster
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-08-12 08:53:59 +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 a1af644310 Change select-required-builds-that-failed to exclude succeeded builds
Only include a failed build if that build server hasn't had any success
building that output. The Guix Build Coordinator can build one output with
many different builds, so this helps avoid showing lots of spurious failures.
2020-07-13 18:55:50 +01:00
Christopher Baines e9d4e74e56 Add builds to the store item page 2020-07-04 09:31:12 +01:00
Christopher Baines 69d3c83986 Improve select-builds-with-context
Support specifying the limit, and improve the ordering.
2020-07-03 20:32:45 +01:00
Christopher Baines dc8b442e12 Improve the linking to build servers
Add a build-url function that returns the URL to use, and use this where
appropriate.
2020-07-01 19:51:21 +01:00
Christopher Baines 1e2fefa7cf Change select-build procedures to avoid join issues
The number of build_status rows coming back was being amplified by the INNER
JOIN, using a subquery guards against this.
2020-07-01 19:42:42 +01:00
Christopher Baines 5ee8207565 Avoid duplicate build status entries
This effectively makes adding build status entries idempotent to some degree.
2020-07-01 09:35:29 +01:00
Christopher Baines 9192550331 Implement more support for builds from the Guix Build Coordinator
Builds from the Guix Build Coordinator might not have timestamps, and the id
from the build server is more important, as one build server can build the
same derivation many times.
2020-07-01 09:35:29 +01:00
Christopher Baines 911d0779ed Fix compute-token
For some reason the string-filter arguments were the wrong way around.
2020-06-28 21:42:05 +01:00
Christopher Baines 1d48885e6a Make build_status.timestamp nullable
The Guix Build Coordinator doesn't record timestamps for events
currently. This is something to fix, but allow for build statuses without
timestamps as they're not necessary.
2020-06-27 14:05:51 +01:00
Christopher Baines d687928a04 Implement insert-build-status using insert-build-statues
To reduce the number of code paths.
2020-06-27 14:05:51 +01:00
Danjela Lura f60c2eabce Add the packages-translation-availability page
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-26 17:54:19 +01:00
Danjela Lura bd3aa98620 Add indications for no translations available in the lint warnings page
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-26 17:54:19 +01:00
Danjela Lura d442d408ee Add locale values in the JSON response for the lint warnings page
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-26 17:54:19 +01:00
Danjela Lura 89aaf984ec Include locale in search-packages-in-revision
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-26 17:54:19 +01:00
Danjela Lura f16fdb44f1 Add indications for no translations available in the packages page
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-26 17:54:19 +01:00
Danjela Lura 5708b81002 Include locale in the JSON response for the packages page
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-26 17:54:19 +01:00
Danjela Lura 365bf27838 Fix the test-model-package test
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-19 16:03:32 +01:00
Danjela Lura a3ac33c0e1 Provide the packages page with translations
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-19 16:03:32 +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
Christopher Baines 308e553b11 Guard against some changes in how guile-json represents null values 2020-06-19 14:12:56 +01:00
Danjela Lura 480d718fa8 Fix lint checker tests
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-07 20:17:03 +01:00
Danjela Lura 533bf91ab1 Fall back to en_US.utf8 in the package page
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-07 20:17:03 +01:00
Danjela Lura d10c6f5aa9 Fall back to en_US.utf8 for the lint warnings page for a revision
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-07 20:17:03 +01:00
Danjela Lura ecd460867b Make the query that provides locale options look nicer
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-07 20:17:03 +01:00
Danjela Lura d3096de655 Use lint checker related translations on some pages
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-07 20:17:03 +01:00
Danjela Lura b8abe38352 Add checks to guard against null data
Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-06-07 20:17:03 +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 ae6541af1e Fix select-build-servers with respect to the lookup-builds field 2020-06-06 14:40:36 +01:00
Christopher Baines 916b594473 Make nar_urls file sizes optional 2020-06-03 06:56:59 +01:00
Christopher Baines b6754c8a4c Add a lookup_builds field to the build_servers table
This is to allow for build servers where only the substitutes should be
queried, and it shouldn't be assumed that they're running Cuirass.
2020-05-24 17:02:53 +01:00
Christopher Baines 2e3276e803 Tweak select-output-consistency-for-revision
I don't think this actually changes the result, but I think the query is a bit
better formed.
2020-05-03 21:27:55 +01:00
Christopher Baines c5a5684f1d Add a new package substitute availability page 2020-05-03 21:26:47 +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 b4111af288 Fix a window clause in package-outputs-for-branch
This was leading to the first and last revision datetimes to be wrong.
2020-05-03 09:53:09 +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