Commit Graph

285 Commits

Author SHA1 Message Date
Christophe Simonis
c340e18506 [FIX] runbot: force lowercase build dest (used as dbname prefix) 2018-02-07 16:00:28 +01:00
Christophe Monniez
966e12ee71 [FIX] runbot: add dependency on base_setup
To install properly, Runbot needs to find base.menu_config which is
defined in base_setup res_config_view.
2017-11-20 11:14:54 +01:00
Christophe Simonis
0c3c8a0b75 [FIX] runbot: init method may not exists on parent class 2017-11-14 16:58:56 +01:00
Christophe Simonis
cdf4cd8287 [IMP] runbot: allow to rebuild deathrow builds 2017-09-28 15:06:47 +02:00
Christophe Simonis
c322a10ccc [IMP] runbot: guess future result of testing build 2017-09-21 18:24:44 +02:00
Christophe Simonis
03da1e9339 [IMP] runbot: automatically link logs to build
The linked build is extracted from dbname via a trigger on new row
creation.

This improve rendering of build page.

A migration script is added to link existing logging entries to
corresponding build and remove invalid ones.
Note that this migration script can take a long time.
2017-09-21 17:44:32 +02:00
Christophe Simonis
eb267ffa44 [FIX] runbot: correct redirect url 2017-09-18 13:41:08 +02:00
Christophe Simonis
e265607b3f [FIX] runbot: correct logging in method _ask_kill 2017-09-18 13:35:43 +02:00
Christophe Simonis
54f3cb9488 [FIX] runbot: force integer build ids in routes 2017-09-18 13:27:27 +02:00
Denis Vermylen
fb1e1dfd53 [IMP] runbot: add kill button (+ deathrow state)
Allow logged users to kill builds that are pending or testing.

The kill button solves the following problem:

When you have a community and enterprise branch with pull request.
The enterprise PR gets fetched before the branch by runbot, so it
builds with the community master branch instead of the corresponding
community branch. As the branch shares the same HEAD as the PR,
so no other build is done for the branch.

Previously you had to wait the build to finish building, then rebuild it
from the branch, taking twice the time necessary. Now you'll be able to
kill & rebuild it just after pushing the branch.

Also having a kill button is globally a nice to have feature.
2017-09-18 12:43:02 +02:00
Denis Vermylen
a3d30e9d3c [IMP] runbot: keep search query upon rebuild 2017-09-18 12:43:02 +02:00
Christophe Simonis
ba77916247 [IMP] runbot: index logging entries per build 2017-09-06 11:53:36 +02:00
Christophe Simonis
2ad4274157 [FIX] runbot: respect shebang 2017-09-05 16:43:14 +02:00
Дмитро Катюха
9ad2164d99 runbot: res_config, replace tabs with spaces 2017-08-09 17:32:40 +02:00
Дмитро Катюха
4c5f5105cd runbot: fixed mistake in nginx config templatew 2017-08-09 17:32:40 +02:00
Christophe Simonis
ca8bc51180 [IMP] runbot: more color in build page 2017-07-12 16:30:08 +02:00
Christophe Simonis
81ce2354f6 [FIX] runbot: more verbose logs 2017-07-12 12:26:20 +02:00
Christophe Simonis
26b3820b9e [IMP] runbot: nginx config: specify error log 2017-06-30 12:01:38 +02:00
Christophe Simonis
f22ca0d212 [FIX] runbot: escape server name in nginx config 2017-06-30 12:00:19 +02:00
Christophe Simonis
3339d20520 [FIX] runbot: limit rebuild to runbot users 2017-06-16 14:22:27 +02:00
Ludovic Laffineur lla
301f747634 [ADD] runbot: add coverage link in the build button 2017-06-15 14:44:49 +02:00
Christophe Simonis
447a19882e [FIX] runbot: log who initiate rebuilds 2017-06-15 14:37:32 +02:00
Denis Ledoux
1d69f1e368 [FIX] runbot: more accurate search for duplicates
In a repository with dependencies
e.g. `odoo-dev/enterprise` depending on `odoo-dev/odoo`
consider a build as a duplicate of another if
 - The HEAD is identical (as before)
 - AND the branches used for the depending repositories are the same

e.g.
 - pushing `master-staging-dle` to `odoo-dev/enterprise`,
 - with as HEAD the same HEAD than `master`,
 - but for which a branch `master-staging-dle` exists in `odoo-dev/odoo`
 - a duplicate would be a build having as HEAD the HEAD of master
   AND the `odoo-dev` branch `master-staging-dle`

Before, it would have used the latest build of the `master` branch,
as the HEAD was the same, despite the fact it didn't use the branch
`master-staging-dle` of `odoo-dev/odoo`
2017-05-18 17:07:35 +02:00
Olivier Dony
8dfee8af40 [FIX] runbot: stop forcing git gc --auto during updates
The `git gc --auto` command often fails and requires an explicit
execution of `git gc --prune=all`. When it happens, it crashes the
update, failing the cron execution.

Executing `git gc prune` every time would be very slow and dispruptive
during the cron's critical sections.

As the initial goal was to avoid triggering the automatic GC during the
next update/pull command, we prefer to adopt the global strategy of
disabling the auto GC globally with:

  git config --global gc.auto 0

And to configure a system cron job to periodically GC/prune all
repositories, to get the performance benefit.
Due to locking issues, that cronjob should be scheduled outside peak
build hours.

Example bash script for the system cron:

```
   #!/bin/bash
   set -e
   base_repo_dir='/path/to/runbot/static/repo'

   for repo in $base_repo_dir/*
   do
       if [[ -d $repo ]];then
           git --git-dir="$repo" gc --prune=all
       fi
   done
```
2017-05-16 11:00:01 +02:00
Christophe Simonis
a5b88ff0ab [FIX] runbot: failing to update a repo should not stop others 2017-05-05 11:38:08 +02:00
Olivier Dony
99c200afcb [FIX] runbot: recover from failed job method call
Catch exceptions occurring within job methods, to avoid
stalling the runbot by repeatedly trying to call it -
and crashing every time.

Mark the build as failed immediately and skip it.
2017-05-02 14:32:13 +02:00
Olivier Dony
1d46bf9ff5 [FIX] runbot: stop wasting a cycle for coverage check
Build jobs that return a -2 PID are considered immediately done and the
next job is started without waiting for a cron cycle.
2017-05-02 13:25:42 +02:00
Olivier Dony
63b997a4ed [FIX] runbot: make checkout safer wrt addons layout
Avoid errors/crash when the server/addons directory in the build branch
contains symlinks.

Exhibited by e.g. odoo/odoo#16720
2017-05-02 13:07:02 +02:00
Christophe Simonis
f889f2095c [IMP] runbot: let nginx serve static files 2017-04-27 16:43:48 +02:00
Olivier Dony
d66047230b [FIX] runbot*: make most methods private
Most of the non-CRUD methods of runbot models should be private, as
there is no need to access them via RPC.

WARNING: This change is backwards compatible with existing
installations and existing runbot databases, but will most
likely BREAK all third-party extensions, due to the renamed
methods.

Fortunately the runbot module is not ruled by Odoo's "stable policy" ;-)

Reported by @nilshamerlinck - thanks!
2017-04-27 14:54:39 +02:00
Olivier Dony
e1ecb49f89 [FIX] runbot: use proper manager visibility
The token is not meant to be used by anyone except runbot managers.

Reported by @nilshamerlinck - thanks!
2017-04-27 14:54:39 +02:00
Christophe Simonis
3b1145b4ab [IMP] runbot: ignore pad modules 2017-03-10 11:56:23 +01:00
Christophe Simonis
f242db17b3 [FIX] runbot: only kill builds on same host 2017-03-10 11:51:27 +01:00
Nicolas Seinlet
12691bdbcd Private method for quick connect URL, to allow an easy override 2017-02-21 15:18:20 +01:00
Christophe Simonis
33584cea10 [FIX] runbot: when running via coverage, skip sys.executable in command line 2017-02-09 17:03:39 +01:00
Christophe Simonis
9282b10034 [FIX] runbot: respect repo sequence in dashboard 2017-02-08 13:53:53 +01:00
Christophe Simonis
efd049da1d [FIX] runbot: index repo sequence 2017-02-08 13:30:18 +01:00
Christophe Simonis
0fa8bbe620 [ADD] runbot: add support for running coverage when testing. 2017-01-24 14:14:20 +01:00
Christophe Simonis
e29c25c7dc [IMP] runbot: add sequence field on repo model 2017-01-24 14:06:34 +01:00
Nicolas Seinlet
65e86b564e [IMP] Clean old, unused and not deleted runbot builds databases 2017-01-10 16:42:24 +01:00
Christophe Simonis
b04488f22f [IMP] runbot: handle new binary for 10.0 2016-09-29 14:33:15 +02:00
Olivier Dony
48e652436e [IMP] runbot: support v10-style manifest naming convention 2016-09-02 19:23:02 +02:00
Julien Legros
10c3e87579 [IMP] runbot: optimize new branch detection 2016-09-02 13:05:22 +02:00
Christophe Simonis
a835d1e800 [IMP] runbot: add link to original build for duplicate builds 2016-09-02 13:02:56 +02:00
Christophe Simonis
287c466637 [FIX] runbot: hide bad link to github for messages from runbot itself 2016-09-02 13:02:11 +02:00
Christophe Simonis
b46980ab91 [FIX] runbot: export git tree at current time
When doing a `git archive`, all the files in the tar archive are set to
the commit date. Ignore this date during extraction.

Having the files with dates in future will make some tests about assets
to fail. These tests force the asset regeneration by `touch`ing one
js/css file. If other bundle files are still older that the one we touch,
the asset is not regenerated and the test fail.
2016-09-01 12:36:36 +02:00
Alexandre Fayolle
920c3edcee [FIX] runbot: avoid 404 errors in fast_launch url for odoo >= 9
Closes https://github.com/odoo/odoo-extra/pull/104
2016-07-27 17:49:29 +02:00
Christophe Simonis
97001fbf72 [FIX] runbot: remove useless commit()
This commit() is the root cause of the famous false-positive error
`_check_module_names invalid module names, ignored: False`.

The first step (pull code) is a long one. if a push-hook request
happen during this step, the current transaction wont be able to be
commited (the list of module to test is written on the build). Due to
this early commit(), the build is left in an intermediate state with
the module list unpopulated (=False).
2016-07-26 18:28:24 +02:00
Christophe Simonis
40e502ecd5 [FIX] runbot: track and log prefix match of closest branch 2016-04-27 16:09:04 +02:00
Christophe Simonis
fd8e7f269b [FIX] runbot: check if branch exists when matching 2016-04-04 19:24:02 +02:00