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

63 commits

Author SHA1 Message Date
Christopher Baines
f553a7490d Change the git_branches table primary key
To allow for having branches in multiple git repositories.
2019-08-05 20:02:06 +01:00
Christopher Baines
84197686ce Fix some duplicated values in tables
The licenses table, along with the package_metadata table had duplicate
values. This could happen as the unique constraints on those tables didn't
properly account for the nullable fields.

The duplicates in those tables also affected the license_sets, packages,
package_derivations tables in a similar way. Finally, the
guix_revision_package_derivations table was also affected.

This commit adds a migration to fix the data, as well as the constraints. THe
code to populate the licenses and package_metadata tables is also updated.
2019-08-04 09:39:40 +01:00
Christopher Baines
2ea78cff47 Tweak how logs are stored
Previously, the query for the jobs page was really slow, as it checked the
load_new_guix_revision_job_log_parts table for each job, doing a sequential
scan through the potentially large table.

Adding an index didn't seem to help, as the query planner would belive the
query could return loads of rows, where actually, all that needed checking is
whether a single row existed with a given job_id.

To avoid adding the index to the load_new_guix_revision_job_log_parts table,
and fighting with the query planner, this commit changes the
load_new_guix_revision_job_logs table to include a blank entry for jobs which
are currently being processed. This is inserted at the start of the job, and
then updated at the end to combine and replace all the parts.

This all means that the jobs page should render quickly now.
2019-07-07 21:23:18 +01:00
Christopher Baines
d96add30a0 Record the output from loading new revisions to the database
So that it can easily be shown through the web interface. There's two tables
being used. One which temporarily stores the output as it's output while the
job is running, and other which stores the whole log once the job has
finished.
2019-06-22 01:51:49 +02:00
Christopher Baines
5d06a28577 Add more detailed new revision job handling
Create a new events table for the new guix revision jobs, and update this when
processing a job starts, as well as finished with success or failure.

Additionally, remove the dependnency on open-inferior/container, as this
functionality isn't merged in to Guix master yet.
2019-06-02 22:00:29 +01:00
Christopher Baines
4ccf3132b6 Record job success without deleting the job record
Previously, the records for jobs would be deleted. It's useful to know when
jobs were inserted in to the database, as well as when they succeeded (if they
have). This change also makes it possible to keep track of jobs that have
failed, as they won't be deleted.
2019-06-02 21:48:02 +01:00
Christopher Baines
16799a34a9 Store license information for packages
And display this on the package page.

This uses a couple of new tables, and an additional field in the
package_metadata table.

Currently, the order of the licenses in the package definition isn't stored,
as I'm not sure the order in the list is significant.
2019-05-15 08:05:14 +01:00
Christopher Baines
7341d17254 Store and display the location of packages
Store the location a package can be found at, and display this on the package
page.

If available, link off to the git repository containing the package.
2019-05-13 21:07:48 +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
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
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
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