Go to file
Christophe Monniez 360e31ade4 [IMP] runbot: add a build stat model
When a build is done, various numerical informations could be extracted
from log files.  e.g.: global query count or tests query count ...

The extraction regular expression could be hard-coded in a custom step
but there is no place holder where to store the retrieved information.
In order to compare results, we need to store it.

With this commit, a new model `runbot.build.stat` is used to store
key/values pair linked to a build/config_step.  That way, extracted
values can be stored.

Also, another `runbot.build.stat.regex` is used to store regular
expressions that can be used to grep log files and extract values.

The regular expression must contain a named group like this:
`(?P<value>.+)`
The text catched by this group MUST be castable into a float.

Optionally, another named group can be used in the regular expresion
like this:
`(?P<key>.+)`
This `key` group will then be used to augment the key name in the
database.

Example:
    Consider a log line like this one:
    `odoo.addons.website_blog.tests.test_ui tested in 10.35s`

    A regular expression like this, named `test_duration`:
    `odoo.addons.(?P<key>.+) tested in (?P<value>\d+\.\d+)s`

    Should store the following key:value:
    `{
        'key': 'test_duration.website_blog.tests.test_ui',
        'value': 10.35
    }`

A `generic` boolean field is present on the build.stat.regex object,
meaning that when no regex are linked to a make_stats config step, then,
all the generic regex will be applied.

A wizard is added to help the creation the regular expressions, allowing
to test if they work against a user provided example.

A _make_stats method is added to the ConfigStep model which is called
during the _schedule of a build, just before calling the next step.
The regex search is only apllied in steps that have the `make_stats`
boolean field set to true. Also, the build branch have to be flagged
`make_stats` too or the build can have a key `make_stats` in its
config_data field.

The `make_stats` field on the branch is a compute stored field.
That way, sticky branches are automaticaly set `make_stats' true.

Finally, an SQL view is used to facilitate the stats visualisation.
2020-03-20 11:11:03 +01:00
forwardport [IMP] forwardport: exponential backoff on reminders 2020-03-16 15:03:11 +01:00
runbot [IMP] runbot: add a build stat model 2020-03-20 11:11:03 +01:00
runbot_builder [IMP] runbot: build docker image once per loop turn 2020-01-22 13:50:01 +01:00
runbot_cla [IMP] runbot: simplify views and adapt to odoo13 2020-01-14 13:24:58 +01:00
runbot_merge [FIX] runbot_merge: typo in field parameter name 2020-03-17 08:17:37 +01:00
.gitignore [IMP] runbot: build docker image once per loop turn 2020-01-22 13:50:01 +01:00
conftest.py [IMP] runbot_merge: support for merging partners w/ github_login 2020-03-16 15:03:11 +01:00
README.md [REF] README: update the readme file for the brand new repo 2018-03-08 16:59:39 +01:00
requirements.txt [IMP] runbot: dynamic requirements 2019-12-02 16:36:56 +01:00

Odoo Runbot Repository

This repository contains the source code of Odoo testing bot runbot.odoo.com and related addons.

Runbot

The runbot/ directory holds the main runbot Odoo addon.

Runbot CLA addon

The runbot_cla/ directory contains an Odoo addon that checks CLA.