Commit Graph

44 Commits

Author SHA1 Message Date
Christopher Baines c3cb04cb80 Use fibers when processing new revisions
Just have one fiber at the moment, but this will enable using fibers for
parallelism in the future.

Fibers seemed to cause problems with the logging setup, which was a bit odd in
the first place. So move logging to the parent process which is better anyway.
2023-11-05 13:46:20 +00:00
Christopher Baines f5acc60288 Make some sweeping changes to loading new revisions
Move in the direction of being able to run multiple inferior REPLs, and use
some vectors rather than lists in places (maybe this is more efficient).
2023-11-02 12:16:17 +00:00
Christopher Baines d4bb0ffaaa Fix more issues with the git_commits introduction 2022-05-23 22:49:51 +01:00
Christopher Baines 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
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 cdb41cfa3c Fix query typo in branches-by-package-version 2021-05-12 08:27:48 +01:00
Christopher Baines e38bddcae5 Reformat a couple of package related queries 2021-04-24 06:00:47 +01:00
Christopher Baines b430c632b7 Create a table for systems
And use it for the systems in the derivations and package derivations tables.

The primary motivation here is to allow quickly working out what systems the
database contains, and having a small table with just the right data seems a
good way to do that.
2021-04-23 11:14:51 +01:00
Christopher Baines f47d337a72 Have branches-by-package-version look at latest processed revision
This means branches aren't omitted if the latest commit hasn't been processed
yet.
2021-03-15 10:29:36 +00:00
Christopher Baines 663bd1411a Add a /package/NAME page
This might be useful for working out when a non-master branch contains a newer
version of a package, or someone has sent in a patch for a newer version
already.
2021-03-14 21:48:43 +00:00
Christopher Baines 48cdf102fe Fix various issues linking to builds 2021-01-03 10:54:45 +00:00
Christopher Baines e273e22042 Switch queries across to use latest_build_status 2020-10-13 19:35:40 +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
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 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 a3ac33c0e1 Provide the packages page with translations
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
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 a50bc3342f Fix the new package-versions-for-branch query
This recent change simply didn't work, the ordering was bad and the window
function wasn't properly defined. It now should hopefully work, although
there's an interesting case where different versions are available for
different systems/targets, which isn't handled particularly well.
2020-03-31 20:47:53 +01:00
Christopher Baines 102f7a0536 Implement version history using the derivations table
Rather than having two big tables looking at the history, just use the
derivations table as it has all the information.

This will allow deleting the package_versions_by_guix_revision_range table
which should help save time when importing revisions, and reduce the size of
the database.
2020-03-24 20:17:18 +00:00
Christopher Baines 96bf658dfc Fix the date ordering on the package output history page 2020-03-24 20:17:00 +00:00
Christopher Baines f4583e5fe6 Add a new function to get the outputs for a package on a branch
Similar to the one above for derivations, this just looks at outputs. This
filters out equivalent derivations, which can be useful.
2020-03-21 10:37:22 +00:00
Christopher Baines b19227c086 Order build statuses by id, not timestamp
Some builds from Cuirass change status at the same timestamp, so use the id
for ordering instead.
2020-03-01 15:57:35 +00:00
Christopher Baines 0cea51cc79 Add copyright and license headers to a bunch of source files
That were missing them.
2019-12-26 10:16:55 +00:00
Christopher Baines e45db1cd30 Include builds on the derivation history page 2019-12-22 21:42:49 +00:00
Christopher Baines 04bb2d52bc Add first version of a page with the history of package derivations
Some filtering options need adding for the system and target, as it's
currently hardcoded, but the general page does work.
2019-11-09 20:07:34 +00:00
Christopher Baines b36294da4a Fix some missing branch constraints in package-versions-for-branch
The lack of these meant that versions on other branches could appear in the
results.
2019-10-17 21:24:48 +01:00
Christopher Baines 818be2ed98 Fix some long lines in the package-versions-for-branch query 2019-10-17 21:24:22 +01:00
Christopher Baines ab8a02cf13 Sort package versions on a branch by version as well
To fix the order when the first_datetime matches.
2019-10-08 19:44:09 +01:00
Christopher Baines fb301a8495 Add a package page, showing versions for a revision 2019-10-03 21:35:29 +01:00
Christopher Baines 59c342ffde Add a new page to show package versions available on a branch
This is useful when looking back through history at what package versions were
previously available.
2019-09-27 17:28:46 +01:00
Christopher Baines 465f262ded Tweak the textual search to rank exact name matches higher
Previously, if you searched for packages like Ruby or Guile, the actual Ruby
and Guile packages would be low in the rankings, as the terms Ruby or Guile
don't appear much in the descriptions.

Therefore, change the ordering to make these exact matches appear higher up.
2019-09-26 18:29:17 +01:00
Christopher Baines 1a55022524 Improve the package and package-metadata modules
Add tests around the package module, extract out the use of the
inferior-package record assessors so that they aren't part of the tests, and
switch across the package-metadata module to use
insert-missing-data-and-return-all-ids.
2019-09-05 16:07:23 +02:00
Christopher Baines 6c90fe4324 Reduce code duplication in the package module
By using insert-missing-data-and-return-all-ids.
2019-09-05 16:07:23 +02:00
Christopher Baines 83012b101b Allow specifying the fields on the packages page
This is mostly for the JSON output, as it allows much more information to be
included.
2019-05-16 22:28:16 +01:00
Christopher Baines 4a5f42ee52 Add a function for searching for packages 2019-05-12 21:16:10 +01:00
Christopher Baines 0bdc555ff8 Add some basic pagination to the packages page
Lower powered devices will have problems displaying all ~9000+ packages, so
return a smaller number by default.
2019-05-12 20:45:33 +01:00
Christopher Baines b1ab70a226
Delete duplicate entries in the package-entries list
This can happen when the same package is defined with two names, for example,
with deprecated-package.
2019-03-28 22:42:18 +00:00
Christopher Baines e117bb1d87
Many changes
A large proportion of these changes relate to changing the way
packages relate to derivations. Previously, a package at a given
revision had a single derivation. This was OK, but didn't account for
multiple architectures.

Therefore, these changes mean that a package has multiple derivations,
depending on the system of the derivation, and the target system.

There are multiple changes, small and large to the web interface as
well. More pages link to each other, and the visual display has been
improved somewhat.
2019-03-11 22:11:14 +00:00
Christopher Baines b0eaf9cf7a
Add a few new pages
For showing more information about builds, revisions and derivations.
2019-03-06 22:59:27 +00:00
Christopher Baines 5a9262b38d
Initial commit
This is a service designed to provide information about Guix. At the
moment, this initial prototype gathers up information about packages,
the associated metadata and derivations.

The initial primary use case is to compare two different revisions of
Guix, detecting which packages are new, no longer present, updated or
otherwise different.

It's based on the Mumi project.

[1]: https://git.elephly.net/software/mumi.git
2019-02-07 22:26:57 +00:00