Next: , Previous: , Up: Cuirass   [Contents][Index]


9 Database schema

Cuirass uses a PostgreSQL database to store information about jobs and past build results, but also to coordinate the execution of jobs.

The database contains the following tables: Specifications, Checkouts, Evaluations, Builds, Outputs, Metrics, BuildProducts, Events and Workers. The purpose of each of these tables is explained below.

9.1 Specifications

This table stores specifications describing the repositories 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:

name

This field holds the name of the specification. This field is also the primary key of this table.

channels

The channels to be fetched by Cuirass as an SEXP string.

build_ouputs

The build outputs to be saved by Cuirass as an SEXP string.

notifications

The build notifications to be sent by Cuirass as an SEXP string.

period

The specification periodicity as an integer.

priority

The specification priority relatively to the other specifications, as an integer ranging from 0 to 9 where 0 is the higher priority and 9 the lowest.

systems

The systems for which build jobs must be evaluated, as a comma separated list.

9.2 Checkouts

When a specification is processed, the repositories must be downloaded at a certain revision as specified. The download is called a checkout. The Checkouts table stores the new checkouts for every specification when it is being processed.

The Checkouts table has the following columns:

specification

The specification associated with the checkout.

revision

The revision of the checkout. Within the same specification, two checkouts can’t be identical: they can’t have the same revision.

evaluation

The evaluation that was triggered by the addition of that new checkout.

channel

The channel associated with the checkout.

directory

The directory into which the checkout was extracted.

timestamp

The checkout insertion timestamp.

9.3 Evaluations

An evaluation relates a specification with the revision of the repository specified therein. Builds (see below) belong to a specific evaluation.

The Evaluations table has the following columns:

id

This is an automatically incrementing numeric identifier.

specification

This field holds the name of a specification from the Specifications table.

status

This integer field hold the evaluation status. Possible values are:

  • started (-1)
  • succeeded (0)
  • failed (1)
  • aborted (2)
timestamp

The timestamp at evaluation insertion.

checkout

The timestamp after channel checkout.

evaltime

The timestamp after evaluation completion.

9.4 Jobs

This table contains all the jobs associated with a given evaluation. If a new job produces build outputs that are not already stored inside the Outputs table then, it is added to the Builds table.

name

This text field holds the job name.

evaluation

This integer field references the evaluation identifier from the Evaluations table, indicating to which evaluation this job belongs.

build

This integer field references the build id from the Builds table, corresponding to this job.

status

This integer field holds the build status of the above build. The goal of this duplication is to avoid expensive joins between the Jobs and Builds table.

system

This text field holds the system name of the above build. This field is duplicated for the same reason as the above status field.

9.5 Builds

This table holds records of the derivations and their build status. Note that a job will be registered here only if its derivation doesn’t already exist.

derivation

This text field holds the absolute name of the derivation file that resulted in this build.

evaluation

This integer field references the evaluation identifier from the Evaluations table, indicating to which evaluation this build belongs.

job_name

This text field holds the name of the job.

system

This text field holds the system name of the derivation.

nix_name

This text field holds the name of the derivation —e.g., coreutils-8.24.

worker

This text field references the name of worker performing the build from the Workers table.

log

This text field holds the absolute file name of the build log file.

status

This integer field holds the build status of the derivation.

last_status

This integer field holds the build status of the previous job evaluation.

weather

This integer field holds the weather of the build. Possible values are:

  • unknown (-1)
  • new-success (0)
  • new-failure (1)
  • still-succeeding (2)
  • still-failing (3)
priority

The build priority relatively to the other builds with the same job_name, as an integer ranging from 0 to 99 where 0 is the higher priority and 99 the lowest.

max_silent

This integer field holds the number of seconds of silence after which a build process times out.

timeout

This integer field holds the number of seconds of activity after which a build process times out.

timestamp

This integer field holds a timestamp taken at build creation time.

starttime

This integer field holds a timestamp taken at build start time. Currently, it has the same value as the timestamp above.

stoptime

This integer field holds a timestamp taken at build stop time. Currently, it has the same value as the timestamp above.

9.6 BuildDependencies

This table contains the dependencies between the builds registered in the Builds table.

source

This integer field holds a reference to the build id from the Builds table.

target

This integer field holds a reference to the build id from the Builds table, indicating that the source build id depends from the target build id.

9.7 Outputs

This table keep tracks for every eventual build outputs. Each build stored in Builds table may have zero (if it has failed), one or multiple outputs.

derivation

This field holds the derivation of a build from the Builds table.

name

This text field holds the name of the output.

path

This text field holds the path of the output.

9.8 Metrics

This table contains several metrics that are recorded by the metrics fiber periodically.

field

This text field holds the application field of the metric.

type

This integer field holds the type of the metric.

path

This float field holds the value of the metric.

evaltime

The metric insertion timestamp.

9.9 BuildProducts

This table contains the saved build products, that are proposed to download through the web interface.

build

This integer field holds a reference to the build id from the Builds table, the build product belongs to.

type

This text field holds the build product type.

file_size

This integer field holds build product size in bytes.

checksum

This text field holds the build product checksum.

path

This text field holds the build product absolute store path.

9.10 Notifications

This table contains the notifications that are queued for sending.

id

This is an automatically incrementing numeric identifier.

type

This text field holds the SEXP representation of the notification.

build

This integer fields references the build id associated with the notification.

9.11 Workers

This table contains the registered workers when Cuirass is using the remote building mechanism.

name

This text field holds the worker name. This field is also the primary key of this table.

address

This text field holds the worker IP address.

machine

This text field holds the worker machine name.

systems

This text field holds the systems that are supported by the worker, as a comma separated list of systems.

last_seen

This integer field holds the timestamp of the last communication with the worker.

9.12 Dashboards

This table contains the user registered Dashboards.

id

This is an automatically incrementing numeric identifier.

specification

This field holds the name of a specification from the Specifications table.

jobs

This text field holds a list of comma separated job names.


Next: Contributing, Previous: Web Interface, Up: Cuirass   [Contents][Index]