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

111 commits

Author SHA1 Message Date
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
8eac26b17d Remove the sha1_hash from the package_metadata table
I'm thinking about adding more fields to this table, and the sha1_hash values
will make this tricker.

Therefore, remove the value, and adjust the existing code to cope. This commit
also adds a new test which coveres some of the changed functionality.
2019-05-12 18:08:17 +01:00
Christopher Baines
0ab1c71722 Add a mock-inferior module
This to help test code which uses the (guix inferior) module.
2019-05-12 17:32:37 +01:00
Christopher Baines
d212682061 Add a (tests driver) module
Using the test driver from build-aux/test-driver.scm, as this shows the test
errors when tests fail.
2019-05-12 17:32:21 +01:00
Christopher Baines
de76f89cb3 Add initial JSON output for the package page 2019-05-12 10:11:14 +01:00
Christopher Baines
e64fc090cd Add a JSON variant of the packages page 2019-05-12 09:56:24 +01:00
Christopher Baines
b3f2aab8c9 Add a JSON variant of the revision page 2019-05-12 09:51:28 +01:00
Christopher Baines
bd8b9f951c Fix extension handling a bit more
Previously, it was spliting versions up for the package pages. To stop this,
now it just matches the extensions it knows about (currently .html and .json).
2019-05-12 09:32:58 +01:00
Christopher Baines
b15c8f706e Fix a request->path-components-and-mime-type bug
The first value should always be a list.
2019-05-11 23:02:54 +01:00
Christopher Baines
658a1a20b2 Improve the content negotiation handling in general
Previously, the routing layer handled the content negotiation, and the Accept
header was ignored. Now, the extension if one is provided in the URL is still
used, and more widely than before, but the Accept header is also taken in to
account.

This all now happens before the routing decisions are made, so the routing is
now pretty much extension independant (with the exception of the
/gnu/store/... routes).
2019-05-11 22:56:25 +01:00
Christopher Baines
640fb8a2ad Update the derivation comparison implementation
This adds more query parameter validation, and uses form-horizontal-control to
neaten up the view code.
2019-05-11 20:38:16 +01:00
Christopher Baines
512a583fa7 Add support for select elements to form-horizontal-control 2019-05-11 20:36:37 +01:00
Christopher Baines
94e321ec38 Add query-parameters->string 2019-05-11 20:36:18 +01:00
Christopher Baines
3d004f8597 Add #:required and #:multi-value support to parse-query-parameters 2019-05-11 20:34:53 +01:00
Christopher Baines
bec838caf9 Add ("") to parse-query-string
Otherwise a URL like https://example.com? will cause this to fail.
2019-05-11 20:33:49 +01:00
Christopher Baines
a81a016380 Add a guix-commit-exists? function 2019-05-11 20:33:35 +01:00
Christopher Baines
3611f7b122 Add some options to the branch page
Add handling for some query parameters to the branch page. This takes
advantage of the improvements for building forms and query parameter
validation.
2019-05-11 16:49:18 +01:00
Christopher Baines
a7053846f1 Add a form-horizontal-control function to better handle forms
Each input is pretty complex, and this function helps handle that complexity.
2019-05-11 16:48:24 +01:00
Christopher Baines
53665daee7 Add some word handling utilities
These are useful for constructing HTML ids and similar things.
2019-05-11 16:47:44 +01:00
Christopher Baines
f2e123b7ac Add a new query-parameters module
The query parameters feed in to the results shown, but also forms on
pages. Validation is important to avoid errors and security issues, but it's
also important to provide appropriate feedback to the user.

This module provides some utilities and structure around handling query
parameters.
2019-05-11 16:45:59 +01:00
Christopher Baines
b29178ff14 Don't enqueue jobs when branches are deleted 2019-05-05 20:23:55 +01:00
Christopher Baines
5028dfe706 Start to handle information about Git branches
Add some new pages /branches and /branch/... as well as a new git_branches
table. Also extend the email processing to enter the branch information in to
the database.
2019-05-05 20:06:28 +01:00
Christopher Baines
ce4c3c6ed3 Switch to storing Git repositories in a table
Rather than just storing the URL in the guix_revisions and
load_new_guix_revision_jobs tables. This will help when storing more
information like tags and branches in the future.
2019-05-05 14:36:52 +01:00
Christopher Baines
051962b54d Add a with-postgresql-transaction procedure
To help with running tests.
2019-05-05 13:35:17 +01:00
Christopher Baines
a171287f27 Try harder to handle errors when loading new revisions
If the repl enters a bad state, attempt to exit, and catch failures in the
parent process, and rollback the open transaction.
2019-05-01 09:26:03 +01:00
Christopher Baines
24f234f6d8 Fix "More information" link for target packages
On the packages comparison page.
2019-04-21 11:02:55 +01:00
Christopher Baines
7a34570ef8 Add missing (guix-data-service database) import 2019-04-17 08:28:36 +01:00
Christopher Baines
7c018a8c32 Add sqitch to guix-dev.scm
As it's used to manage the database schema.
2019-04-16 22:32:45 +01:00
Christopher Baines
15ba520610 Add missing build-aux files
And tweak the .gitignore to reduce the chance that similar files are missed in
the future.
2019-04-16 22:21:07 +01:00
Christopher Baines
d3261eb364 Add .dir-locals.el 2019-04-14 10:08:49 +01:00
Christopher Baines
ef4fd5ab4f Add an initial test
Along with the buildsystem changes to make `make check` work.
2019-04-14 10:08:11 +01:00
Christopher Baines
d69f77d59e Add some initial Sqitch migrations
These are based on the state of the current manually managed database.
2019-04-14 10:06:13 +01:00
Christopher Baines
70faad0437 Tweak the Sqitch configuration 2019-04-14 10:06:00 +01:00
Christopher Baines
2e45bb0696 Extract out some database functionality to another module 2019-04-14 10:04:51 +01:00
Christopher Baines
b352b5040a Add a .gitattributes file
This is recommended by the Sqitch docs.
2019-04-14 10:01:58 +01:00
Christopher Baines
0aa75dca56 Move the sqitch files in to the sqitch directory
To keep them together, and leave the top level repository directory clearer.
2019-04-13 12:47:49 +01:00
Christopher Baines
5621d52e97 Initialise Sqitch
It's a tool for managing the database schema.
2019-04-13 12:22:14 +01:00
Christopher Baines
dbec236928 Clear the packages derivation cache
As this should help prevent issues when the previously cached derivation is
removed from the store.
2019-04-10 20:20:42 +01:00
Christopher Baines
14cb5425d4 Improve the job processing
Speed up checking for new jobs, and remove debugging output.
2019-04-10 20:17:44 +01:00
Christopher Baines
6022edd074 Add a statistics page
To show the total number of derivations, and guix revisions.
2019-04-08 21:04:12 +01:00
Christopher Baines
0c72ee747c Add a function to get a count of Guix revisions 2019-04-08 21:03:59 +01:00
Christopher Baines
77397538f7 Add a function to get a count of derivations 2019-04-08 21:03:29 +01:00
Christopher Baines
1cdbdef513 Remove built guix-data-service-process-branch-updated-email file
It should never have been committed.
2019-04-08 21:02:57 +01:00
Christopher Baines
93d8798df5
More easily support stopping guix-data-service-process-jobs 2019-03-29 09:14:23 +00:00
Christopher Baines
d62ea8857d
Better handle failures when computing the transative supported inputs 2019-03-29 09:14:03 +00:00
Christopher Baines
944492bd79
Deduplicate inferior packages
As sometimes there can be duplicates, for example with deprecated packages.
2019-03-29 09:13:29 +00: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
4619b7b575
Support displaying builtin:download derivations 2019-03-28 21:02:16 +00:00
Christopher Baines
76d6027b7c
Try to handle the guix store item being garbage collected 2019-03-28 20:41:05 +00:00
Christopher Baines
0c6c413804
Handle missing derivations when rendering the comparison 2019-03-24 17:36:10 +00:00