Commit Graph

1049 Commits

Author SHA1 Message Date
Xavier Morel
b30bb09319 [FIX] runbot_merge: when closing a staged PR, cancel the staging 2018-09-03 13:16:36 +02:00
xmo-odoo
7233179d6a [FIX] runbot_merge: only cancel active staging on p=0
Not when any priority is set on any PR…
2018-09-03 13:16:36 +02:00
Xavier Morel
9286b346e8 [FIX] runbot_merge: IDE warnings 2018-09-03 13:16:36 +02:00
Xavier Morel
34497a91b4 [FIX] runbot_merge: don't try to stage urgent PRs in error 2018-09-03 13:16:36 +02:00
Xavier Morel
47428a4580 [IMP] runbot_merge: only label PR if not created merged/closed
Would generate a ton of GH API churn when synchronising.
2018-09-03 13:16:36 +02:00
Xavier Morel
39a0d723af [ADD] runbot_merge: tag PR to signify state changes 2018-09-03 13:16:36 +02:00
Xavier Morel
7033952913 [ADD] runbot_merge: reviews support
Reviews are interpreted like comments and can contain any number of
commands, with the difference that APPROVED and REQUEST_CHANGES are
interpreted as (respectively) r+ and r- prefixes.
2018-09-03 13:16:36 +02:00
Xavier Morel
49c8fdbed2 [IMP] runbot_merge: prioritize p0 more
* p0 cancel existing stagings in order to be staged as soon as
  possible
* p0 PRs should be picked over split batches
* p0 bypass PR-level CI and review requirements
* p0 can be set on any of a batch's PR, matched PRs will be staged
  alongside even if their priority is the default
2018-09-03 13:16:36 +02:00
Xavier Morel
e6f5b84a19 [IMP] runbot_merge: add PR ID to commit message when merging 2018-09-03 13:16:36 +02:00
Xavier Morel
ea9203c359 [IMP] allow delegate reviewers to retry and r- 2018-09-03 13:16:36 +02:00
Xavier Morel
781b679648 [FIX] runbot_merge: de-f-string-ify 2018-09-03 13:16:36 +02:00
Xavier Morel
933559da04 [IMP] runbot_merge: repos shoud be unique
Having the same repository in two different projects makes no sense,
the two projects will conflict with one another.
2018-09-03 13:16:36 +02:00
Xavier Morel
e52d08ecdf [ADD] runbot_merge: a merge bot
No actual dependency on runbot, should be usable completely
independently.
2018-09-03 13:16:36 +02:00
Christophe Monniez
cfba7da06d
[IMP] runbot: skip an additional port for chrome
In a near future, Odoo will use Chrome Headless instead of phantomjs.
Chrome needs a port to listen to and it was decided that it will be
http_port + 2.
With this commit, we ensure that this port is not used by another build.

Closes #30
2018-08-14 13:57:31 +02:00
Olivier Dony
b98b8dedd9 [IMP] runbot: make nginx server_name more specific
Avoids overly generic vhost declaration, and makes config easier to
understand.

We only want to allow such hosts:
    <build_dest>.runbotX.odoo.com
    <build_dest>-<db_name_extension>.runbotX.odoo.com

Where <db_name_extension> is usually "all" or "base".
2018-07-30 12:11:39 +02:00
Christophe Simonis
e815571d14 [ADD] runbot: new /runbot/glances route
Allow to have a glances on sticky builds status.

Closes: #28
2018-06-25 09:26:35 +02:00
Christophe Monniez
52cdd9fd27
[FIX] runbot: add build type
The unicode icon added in the build subject is not clear for the users.
In that state, it's not easy to add a title on the icon or the subject.

With this commit, a build type field is added to differentiate the
builds and add the appropriate icon and title.

Closes: #24
2018-06-18 10:42:23 +02:00
Christophe Monniez
8471c8c35b
[FIX] runbot: improve coverage processing
When a build with coverage is killed during the tests, the coverage
result is set to 100%.

With this commit, coverage result is verbosely skipped if the coverage
file does not exists.

Also, the coverage module is no longer user to retrieve the coverage
value as it was already calculated. It's faster to grep the html file
than to recompute the value.

As the coverage builds takes a longer time than normal builds, the
timeout is increased for those kind of builds (as it was already done for the
CPU limit).

Finally, the omitted patterns were wrong and are now fixed with this
commit.

Closes #25
2018-06-15 13:30:04 +02:00
Christophe Monniez
822433a3bb
[IMP] runbot: add link to the latest coverage
On the frontend, the coverage is a static indication.
With this commit, this indication is now a link to the coverage details
page.

Closes: #26
2018-06-12 09:04:09 +02:00
Christophe Monniez
a3da5cad04
[IMP] runbot: increase cpu_limit
When the Odoo instances are spawned for tests, they have a time limit
set on their CPU usage. This limit is hard-coded in the _spawn method
calls.

As the number of tests are increasing, their duration increases too.
As this limit is inherited by subprocesses, if a phantomjs test
last too long, the test is killed alone.

Finally, when the coverage is enabled, the tests duration is
approximately increased of 1.5 times.

With this commit, the cpu_limit of the two main tests jobs are
increased. When the coverage is used, the cpu_limit is increased.

Closes: #23
2018-06-11 17:58:29 +02:00
Christophe Simonis
806ae08460 [IMP] runbot: color "pending" tag accordingly to some limits
Closes: #22
2018-06-07 11:28:27 +02:00
Christophe Monniez
b1f155c1a2
[IMP] runbot: kill older builds when a new one is created
When a new commit is found and a new build is created, if a user
pushes more commits in the same branch a few minutes later, it causes
more builds in testing phase, resulting in a CPU waste.

With this commit, previous builds in testing phase in non sticky
branches are killed when a new build is created.

Closes: #20
2018-06-06 16:31:33 +02:00
Christophe Monniez
c6fe87e18b
[IMP] runbot: update nginx template
When someone tries to log in an old runbot build that is not running
anymore, he lands on the runbot instance that was running the build.
Also, all the running builds are allowed on all runbot instances,
leading to the same behavior.

With this commit, only the builds that are running on the runbot
instance can be reached, others are defaulted to a 404.

closes #21
2018-06-01 16:37:43 +02:00
Christophe Simonis
7fcbf6e653 [IMP] runbot: visually mark rebuilds 2018-06-01 16:31:57 +02:00
Christophe Monniez
5feec55e87 [FIX] runbot: limit the number of builds in other builds button
Actually, the "Other builds" button can increase the page size and
increase the page loading time.
With this commit, the number of other builds visible in the button is limited to 100.
2018-05-29 10:56:21 +02:00
Christophe Monniez
223ba61828 [IMP] runbot: add coverage result on builds
When the coverage is activated on a branch, the coverage result is not
stored.

With this commit, the coverage result will be stored on a build.
The last result will be shown on the frontend for sticky branches.

Also, an extra_parameter field is added on the build model.
2018-05-28 09:40:01 +02:00
Christophe Monniez
6dd997dcdd [FIX] runbot: reset frontend table layout
With the 'fixed' table layout, the first column of the frontend takes
too much place.
2018-05-28 09:40:01 +02:00
Christophe Monniez
eaf393fa1f [IMP] runbot: add icons for reverse dependency builds
When a reverse dependency is in testing, pending or deathrow state, there is no
icon in the depending build box.
This commit adds icons for testing, pending and deathrow states.
Also, icons are now displayed in the repository name order.

closes: #19
2018-05-28 09:40:01 +02:00
Christophe Monniez
46c4c54337 [IMP] runbot: force a rebuild when commit in reverse dependency
When a build fails in a repo that depends on another repo, it's difficult
to figure out from which commit it comes in the depending repo.

If this commit is applied, when a new commit is found in a repo's sticky
branch, the latest build from the same branch name, in the depending
repo will be forced to rebuild.
2018-05-28 09:40:01 +02:00
Christophe Monniez
5d23d0957a [FIX] runbot: remove deprecated method
The refresh method is deprecated and invalidate_cache should be used
instead. Also, since the new API, the cache is automatically
invalidated, hence this removal.
2018-05-28 09:40:01 +02:00
kujiu
0d2075db3e [IMP] Improve a11y and usability with titles and aria-labels on buttons
Closes: #14
2018-05-28 09:40:01 +02:00
Christophe Monniez
9555370fa6
[FIX] runbot: update github status on duplicates too
Actually, when a build is a duplicate of another build, its github status is not updated.
e.g. a pull request may not have a github status but its corresponding
branch have a gtihub status.
With this commit, all builds will have their github status updated based
on the corresponding build status.

Thanks for your help @xmo-odoo 

closes: #3
2018-04-27 13:39:33 +02:00
Christophe Monniez
d7f727a0d0 [FIX] runbot: add proper db argument when build is a duplicate
When a build was a duplicate, the link to the running build instance was
leading to the duplicate instance with the db filter of the current
build. Because of that, the user was then redirected to the database selector.

With this commit, the link button gives the proper database argument.

Thanks @RomainLibert for reporting this issue.
2018-04-25 14:46:00 +02:00
Christophe Monniez
efbce41e2e
[IMP] runbot: choose the python version for coverage
When code coverage was processed the 'coverage' utility was called the
same way regardless of the Odoo version. That was the cause of two
problems:
1) In some OS packages, the 'coverage' executable was renamed to
'python-coverage' and 'python3-coverage'
2) Since version 11.0, Odoo needs python3

With this commit, the coverage module is called from python '-m'
argument and the python version is chosen from the Odoo executable
shebang.

closes: #12
2018-04-20 16:16:24 +02:00
Christophe Monniez
12542808a9 [IMP] runbot: log latest commit hash and message when server is built
When a server is built based on dependency_ids, only the branch refs was
logged. In this situation, it's difficult to reproduce a build locally
in the exact same conditions.

With this commit, the latest commit hash and message of this
branch is also logged.
2018-04-20 10:37:52 +02:00
Christophe Monniez
0cb07e73db
[FIX] runbot: return closest branch when PR head name are equals (#11)
When searching for the closest branch name in a target repo, if the PR
head names are equals, a branch method is called on a dictionary, causing
a traceback.

With this commit, the method is called on a branch object instance.

closes #11
2018-04-19 16:16:24 +02:00
Moises Lopez - https://www.vauxoo.com/
fa6a0944f4 [REF] runbot: hook - Find the right repo from payload
This change allow use a global webhook from github based on the organization without use a configuration for each repository.

closes: #5
2018-04-19 09:59:27 +02:00
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