Commit Graph

2062 Commits

Author SHA1 Message Date
Martin Trigaux
4a558741e0 [FIX] runbot: remove unused argument
Leftover from the old api conversion
Making an error when trying to kill a build
2018-04-10 09:02:36 +02:00
Moisés López
9de7c2f8cf [FIX] runbot: Use correct name of new parameters 2018-03-28 10:29:39 +02:00
Moisés López
8b4b941e06 [FIX] runbot: dictionary don't have iteritems attibute 2018-03-28 10:29:39 +02:00
Moisés López
a886dba4ab [FIX] runbot: Fix decode error 2018-03-28 10:29:39 +02:00
Moisés López
1e7edad85a [FIX] runbot: Fix KeyError if there are sticky branches without builds
Before this commit, when a clean instance of the runbot is installed,
there was a KeyError on the frontend because there was not builds for
the sticky branches.
2018-03-28 09:42:52 +02:00
Moisés López
c9de61a320 [REF] runbot: Consider empty returned values
When installing a clean runbot instance a bad query is made because
there is not any build yet.

With this commmit, the query is not made when there are no builds
directories found on the filesystem.
2018-03-28 09:42:52 +02:00
Moisés López
dcdd16038b [REF] runbot: Remove used variable before assigned
When the lock file creation fails, the file descriptor is not assigned.
Before this commit, an ValueError was raised in such a situation.
2018-03-28 09:38:51 +02:00
Luis González
23ad9f4bc0 [FIX] runbot: Add missing HTML attributes aria-* (#1)
Some HTML attributes were missing, and are required to ensure good
compatibility with screen readers.

The following attributes are included:
- `aria-expanded`: this should be present in all dropdown menus
- `aria-label`: this should be present in all links and buttons which
  don't show text, but icons or images.
2018-03-26 14:36:43 +02:00
Julien Legros
3cacd8db52
[FIX] runbot: build garbage collection 2018-03-23 14:20:34 +01:00
Julien Legros
f8cbae79e1
[FIX] runbot: nginx reload
Actually check the return code and do not raise any exception doing so.
2018-03-21 13:06:32 +01:00
Christophe Simonis
dc3659c6f1 [FIX] runbot: use connected user when logging kill/rebuild
As these methods are call in sudo mode, we should use request's user to
have a meaningful log entry.
2018-03-20 10:20:53 +01:00
Julien Legros
278d4ed449
[FIX] runbot: guess_result conversion to record api 2018-03-16 10:16:44 +01:00
Julien Legros
297d502afd
[FIX] runbot: adapt navbar view to v11 2018-03-15 13:38:02 +01:00
Julien Legros
3d71619dcd
[FIX] runbot: make repo_id stored again
Oversight of the code migration.
2018-03-14 16:02:08 +01:00
Julien Legros
328a25a31f
[FIX] runbot: do not rely on copy behavior for rebuilds
Instead of marking most fields as `copy=False` to be able to use the
copy method for rebuilds, we create the build explicitly. We also
forbid to copy builds as it doesn't make much sense to begin with.

As for duplicates, it wasn't always possible to rebuild them. The
rebuild now injects a specific context key (force_rebuild). This allows
duplicates to undergo a rebuild. The side-effect of writing on previous
builds is also removed[1].

[1]: it's not obvious from the diff but the porting to the V8 API
should have yielded

duplicate.write({'duplicate_id': build_id.id})

instead of

build_id.write({'duplicate_id': build_id.id})
2018-03-14 15:05:17 +01:00
Christophe Monniez
f5dcb7b371 [FIX] runbot_cla: fix enforce utf-8 even when runbot locale is different
The CLA md file must be encoded in UTF-8 but before this commit, the
file was opened with the locale of the system running the runbot. That
way, a UnicodeDecodeError was raised when the CLA was UTF-8 and not the
runbot locale was different. Leading to wrong validations.

This commit enforce UTF-8 encoding when opening the CLA's.
2018-03-14 11:07:55 +01:00
Christophe Simonis
9ff0e171e0 [FIX] runbot: resurrect badges 2018-03-13 18:14:15 +01:00
Christophe Monniez
e9a292373f [FIX] runbot: compute build time and don't copy from previous build
Before this commit, the job_end was always None because of a time2str
function with no return. So the job_time was the same as the job age.
Also, the result and times were copied from the prvious build. Displayed
time and results were wrong.
2018-03-13 16:38:20 +01:00
Julien Legros
1543c8d0d8 [FIX] runbot: allow rebuild and kill 2018-03-13 15:01:58 +01:00
Christophe Monniez
0b1ff4dd49 [FIX] runbot: add the dasboard view for sticky branches
During the runbot migration to Odoo 11.0, the dashboard was lost in
Limbo.
2018-03-13 11:15:39 +01:00
Christophe Monniez
5b8184890e [FIX] runbot: sync the build sequence with the build id
The branch order was wrong because of a zeroed build sequence.
2018-03-12 18:14:17 +01:00
Christophe Monniez
08beb51f2e [fix] runbot: make fast_launch find the last build 2018-03-12 17:49:35 +01:00
Christophe Monniez
4b0eac3b21 [FIX] runbot: compute repository url 2018-03-12 17:43:24 +01:00
Christophe Monniez
889df07bf6 [FIX] runbot: remove bad indentation 2018-03-12 16:59:35 +01:00
Christophe Monniez
bd715451a9 [FIX] runbot: allow webhooks to work 2018-03-12 15:39:44 +01:00
Christophe Monniez
21c31b4c3c [REF] runbot, runbot_cla: upgrade to Odoo 11.0
The previous code of runbot and runbot_cla was made for Odoo API version
8.0. This commit makes it work with Odoo API 11.0 and Python 3.

Also, the present refactoring splits the code into multiple files to
make it easier to read (I hope).

The main change due to Python 3 is the job locking mechanism:
Since PEP-446 file descriptors are non-inheritable by default.
A new method (os.set_inheritable) was introduced to explicitely make
fd inheritable. Also, the close_fds parameter of the subprocess.Popen
method is now True by default.

Finally, PEP-3151 changed the exception raised by fcntl.flock from IOError to OSError
(and IOError became an alias of OSError).

As a consequence of all that, the runbot locking mechanism to check if a
job is finished was not working in python3.
2018-03-12 14:36:33 +01:00
Christophe Monniez
e33881c9b4 [REF] README: update the readme file for the brand new repo 2018-03-08 16:59:39 +01:00
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