guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] doc: Document database schema.


From: Maxim Cournoyer
Subject: Re: [PATCH] doc: Document database schema.
Date: Fri, 05 May 2017 08:36:47 -0700
User-agent: K-9 Mail for Android

On May 5, 2017 3:38:14 AM PDT, Ricardo Wurmus <address@hidden> wrote:
>* doc/cuirass.texi: Add "Database" node.
>---
>doc/cuirass.texi | 149
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 149 insertions(+)
>
>diff --git a/doc/cuirass.texi b/doc/cuirass.texi
>index 39d256f..c045002 100644
>--- a/doc/cuirass.texi
>+++ b/doc/cuirass.texi
>@@ -55,6 +55,7 @@ Tutorial sections:
> 
> Reference sections:
> * Invocation::                  How to run Cuirass.
>+* Database::                    About the database schema.
> 
> * Contributing::                Your help needed!
> * GNU Free Documentation License::  The license of this manual.
>@@ -192,6 +193,154 @@ Display an help message that summarize all the
>options provided.
> @end table
> 
>@c
>*********************************************************************
>address@hidden Database
>address@hidden Database schema
>address@hidden cuirass database
>address@hidden sqlite database
>address@hidden persistent configuration
>+
>+Cuirass uses a SQLite database to store information about jobs and
>past
>+build results, but also to coordinate the execution of jobs.
>+
>+The database contains the following tables: @code{Specifications},
>address@hidden, @code{Evaluations}, @code{Derivations}, and
>address@hidden  The purpose of each of these tables is explained
>below.
>+
>address@hidden Specifications
>address@hidden specifications, database
>+
>+This table stores specifications describing the repository from whence
>+Cuirass fetches code and the environment in which it will be
>processed.
>+Entries in this table must have values for the following text fields:
>+
>address@hidden @code
>address@hidden repo_name
>+This field holds the name of the repository.  This field is also the
>+primary key of this table.
>+
>address@hidden url
>+The URL of the repository.
>+
>address@hidden load_path
>+This text field holds the name of the subdirectory in the checked out
>+repository that is passed to the @code{evaluate} tool as the Guile
>load
>+path.  This directory is interpreted relative to the repository in the
>+Cuirass cache directory.  This will usually be the current directory
>address@hidden"."}.
>+
>address@hidden file
>+The full path of the Scheme file containing PROC.
>+
>address@hidden proc
>+This text field holds the name of the procedure in the Scheme file
>FILE
>+that produces a list of jobs.
>+
>address@hidden arguments
>+A list of arguments to be passed to PROC.  This can be used to produce
>a
>+different set of jobs using the same PROC.
>address@hidden table
>+
>+The following columns are optional:
>+
>address@hidden @code
>address@hidden branch
>+This text field determines which branch of the repository Cuirass
>should
>+check out.
>+
>address@hidden tag
>+This text field is an alternative to using BRANCH or REVISION.  It
>tells
>+Cuirass to check out the repository at the specified tag.
>+
>address@hidden revision
>+This text field is an alternative to using BRANCH or TAG.  It tells
>+Cuirass to check out the repository at a particular revision.  In the
>+case of a git repository this would be a commit hash.
>+
>address@hidden no_compile_p
>+When this integer field holds the value @code{1} Cuirass will skip
>+compilation for the specified repository.
>address@hidden table
>+
>address@hidden Stamps
>address@hidden stamps, database
>+
>+When a specification is processed, the repository must be downloaded
>at
>+a certain revision as specified.  The @code{Stamps} table stores the
>+current revision for every specification when it is being processed.
>+
>+The table only has two text columns: @code{specification}, which
>+references a specification from the @code{Specifications} table via
>the
>+field @code{repo_name}, and @code{stamp}, which holds the revision
>+(e.g. a commit hash).
>+
>address@hidden Evaluations
>address@hidden evaluations, database
>+
>+An evaluation relates a specification with the revision of the
>+repository specified therein.  Derivations and builds (see below) each
>+belong to a specific evaluation.
>+
>+The @code{Evaluations} table has the following columns:
>+
>address@hidden @code
>address@hidden id
>+This is an automatically incrementing numeric identifier.
>+
>address@hidden specification
>+This field holds the @code{repo_name} of a specification from the
>address@hidden table.
>+
>address@hidden revision
>+This text field holds the revision string (e.g. a git commit) of the
>+repository specified in the related specification.
>address@hidden table
>+
>address@hidden Derivations
>address@hidden derivations, database
>+
>+This table associates a tuple of derivation path and evaluation
>+identifier with a job name.
>+
>address@hidden @code
>address@hidden derivation
>+This column holds the path to the Guix derivation that is supposed to
>be
>+evaluated for this job.
>+
>address@hidden evaluation
>+This field holds the @code{id} of an evaluation from the
>address@hidden table.
>+
>address@hidden job_name
>+This text field holds the name of the job.
>address@hidden table
>+
>address@hidden Builds
>address@hidden builds, database
>+
>+This table holds records of completed or failed package builds.  Note
>+that builds are not in a one to one relationship with derivations in
>+order to keep track of non-deterministic compilations.
>+
>address@hidden @code
>address@hidden derivation
>+This text field holds the path to the derivation file that resulted in
>+this build.
>+
>address@hidden evaluation
>+This integer field references the evaluation identifier from the
>address@hidden table, indicating to which evaluation this build
>+belongs.
>+
>address@hidden log
>+This text field holds the path to the build log file.
>+
>address@hidden output
>+This text field holds the path to the build output or @code{NULL} if
>the
>+build failed.
>address@hidden table
>+
>+
>address@hidden
>*********************************************************************
> @node Contributing
> @chapter Contributing
> 

Very well written; LGTM! And thanks for documenting cuirass!

Maxim
Hi Ricardo,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]