Commit Graph

835 Commits

Author SHA1 Message Date
Xavier-Do
8a7e0b20aa [FIX] runbot: fix config access rights 2019-05-18 15:13:21 +02:00
Xavier-Do
98913f6d39 [FIX] runbot: fix cla step 2019-05-18 14:20:05 +02:00
Xavier-Do
fce51d6dbe [FIX] runbot: correctly store get_ref_time 2019-05-18 11:16:08 +02:00
Christophe Monniez
16e1eaa30b [IMP] runbot: decrease for-each-ref calls
When searchings for new refs to create builds, the for-each-ref git
commit is run and each ref is searched in the database which is a
somewhat heavy operation.

With this commit, the timestamp of the last database update with the
refs is stored in a field on the repo. This timestamp is checked each
time a for-each-ref is needed, running the operation only when
necessary.
2019-05-18 10:42:31 +02:00
Christophe Monniez
3aabfd4bd3 [IMP] runbot: increase version and add migration scripts
Migration scripts from runbot 3.1 to runbot 4.0.
2019-05-18 10:42:31 +02:00
Xavier-Do
8ef6bcfde7 [IMP] runbot: replace jobs by build configs
This commit aims to replace static jobs by fully configurable build config.

Each build has a config (custom or inherited from repo or branch).
Each config has a list of steps.
For now, a step can test/run odoo or create a new child build. A python job is
also available.

The mimic the previous behaviour of runbot, a default config is available with
three steps, an install of base, an install+test of all modules, and a last step
for run.

Multibuilds are replace by a config containing cretaion steps.
The created builds are not displayed in main views, but are available
on parent build log page. The result of a parent takes the result of
all children into account.

This new mechanics will help to create some custom behaviours for specifics
use cases, and latter help to parallelise work.
2019-05-18 10:42:31 +02:00
Christophe Monniez
bb35b1cc9d [FIX] runbot: remove typo that prevent kill when timeout 2019-05-14 11:54:59 +02:00
Christophe Monniez
cff0133e1a [FIX] runbot: convert runbot_timeout to int
The cpu limit used in job_20 uses the runbot_timeout config_parameter
since b539112a7e. When measuring coverage, this parameter is multiplied
and leads to an error because the type of ir.config_parameter.get_param
method is str.

With this commit, the this value is converted into integer before usage
in job_20.
2019-05-12 19:29:07 +02:00
Christophe Monniez
12acfda83a [FIX] runbot: add dbuser parameter to the odoo cmd
When running Odoo in the Docker container, the username used to connect
to the database is the username defined in the docker container
(actually odoo).

A problem may arise if the user of the runbot process is not the same.
An authentication error is then raised by postgres because of the
username mismatch.

With this commit, the '-r' parameter of Odoo is added to the command
with the username used by the runbot process.

While at it, unused imports are removed.
2019-05-10 11:42:18 +02:00
Christophe Monniez
b539112a7e [FIX] runbot: make the cpu limit the same as the runbot timeout
When a build exceeds the cpu limit, it is simply killed by the kernel.
As a safeguard the "Initiating shutdown." sentence should be searched
in the log file, and the build marked as "ko" if not found.

Unfortunateley, there is no period (.) at the end of the sentence in the
Odoo logs (see: https://github.com/odoo/odoo/blob/12.0/odoo/service/server.py#L444)
Thus, this condition is never fulfilled.
On top of that, this was masked by the first part of the condition,
checking that the 'test/common.py' has no "post_install" string.
The "test" directory does not exists in Odoo ( but "tests" exists) , so
the condition was always falsy.

Finally, a build can be marked as "ok" when he is killed and no errors
are found until the kill.

With this commit:
    * The legacy grep for post_install is removed as it now exists in
      all Odoo supported versions.
    * The period typo is fixed.
    * A log is inserted when the final sentence is not found.
    * The cpu_limit is set as the same as the runbot_timeout parameter
      for better consitency.
    * The time exceeded log message is now logged in the build instead
      of the runbot log.

Co-authored-by: @Xavier-Do
2019-05-10 10:56:55 +02:00
Christophe Simonis
f3ae3cac5a [IMP] runbot: sort sticky branches chronologically
On a par with `/glances` page.
2019-05-10 10:08:31 +02:00
Christophe Monniez
75e56d944a [IMP] runbot: use a separate method for git fetch command
At the end of the _update_git method, the "git fetch" command is run.
That makes it diffcult to override to change its behavior (for example
to avoid fetching pull requests).

With this commit, the command is separated in a new small method that
can be easily overriden.
2019-05-03 16:52:54 +02:00
Christophe Monniez
5dd889de3c [IMP] runbot: split branch creation and pending builds creation
When searching for new builds by parsing git refs, the new branches are
created as well as the pending builds in the same _find_new_commits
method.

With this commit, this behavior is splitted into two methods, that way,
it's now possible to create missing branches without creating new
builds. The closest_branch detection is enhanced because all the new
branches are created before the builds (separated loops).

The find_new_commits method uses an optimized way to search for
existsing builds. Before this commit, a build search was performed for
each git reference, potentially a huge number.

With this commit, a raw sql query is performed to create a set of tuples
(branch_id, sha) which is enough to decide if a build already exists.

A test was added to verify that new refs leads to pending builds.

Also, a performance test was added but is skipped by default because it
needs an existing repo with 20000 branches in the database so it will
not work with an empty database. This test showed a gain of performance
from 8sec to 2sec when creating builds from new commits.

co-authored by @Xavier-Do
2019-05-03 10:34:49 +02:00
Christophe Monniez
e5420f7a3a [FIX] runbot: add missing repo parameter 2019-04-25 21:51:01 +02:00
XavierDo
e323aa888d [IMP] runbot: add dependencies to build
Before this commit, dependencies (i.e. community commit to use when testing enterprise)
were computed at checkout, when the build was going from pending to testing state and
were not stored.

Since the duplicate detection was done at create, the get_closest_branch_name was called
in a loop for each posible duplicate candidate, then a last time at checkout. The main idea of this
pr is to store the build dependecies on build at create, making the duplicate detection
faster (especially when the build name is matching many indirect builds).

The side effect of this change is that the build dependencies won't be affected if a new
commit is pushed between the build creation and the checkout. The build is fully
determined at creation. get_closest_branch is only called once per build

The duplicate detection will also be more precise since we are matching on the commits groups
that were used to run the build, and not only the branch name.

Some work has also been done to rework the closest branch detection in order to manage new corner
cases. Hopefully, everything should work as before (or in a better way).

In a soon future, it will also be possible to use this information to make an "exact rebuild"
or to find corresponding community build.

Pr: #117
2019-04-25 17:58:51 +02:00
XavierDo
5b22d57566 [IMP] runbot: move build closest_branch_name to branch
Closest_branch is more branch scope related, puting it in branch instead of build
will ease testing and refactoring.

PR: #117
2019-04-25 17:58:51 +02:00
Christophe Monniez
8aeabb01e3 [IMP] runbot: give priority to normal builds
When some special builds are scheduled during the night, free slots on
runbot instances are used. Depending on the number of scheduled builds,
all the slots can be used. That prevents people to use the runbot for
normal builds during this time.
To mitigate the problem, the scheduled builds were postponed to the
middle of the night ... the CET night. It means that it could be morning
in India.

With this commit, a build priority is given to normal builds. On the
other hand, scheduled builds are pushed at the end of the queue.

So even if there are plenty of builds during the Belgian night, if
someone pushes a commit in between, it will be built in priority before
the scheduled pending builds.
2019-04-23 13:24:32 +02:00
Christophe Monniez
84ea0e7ef2 [FIX] runbot: use a repo short name to avoid bugs in qweb template
When using a local git repo, the git name does not have colon, making
the frontend crash.

With this commit, a non-stored computed field 'short_name' is added to
compute a shortest version of the name.
2019-04-19 15:52:28 +02:00
Christophe Monniez
82f881d9e6 [IMP] runbot: detach odoo command from docker_run
When the docker_run function is called, the odoo command is decorated
with a pip command to install required packages.
This pollute the docker_run function if a runbot job_ method wants to
use docker for something else that starting an odoo instance (like
pg_dump) for example.

With this commit, command modification is made in an optional helper
function named build_odoo_cmd.

the docker_run function now needs the command to run as a string instead
of a list of odoo cmd and its parameters.
2019-04-16 16:41:50 +02:00
Christophe Monniez
6a8d34bb68 [IMP] runbot: add a small test for the _ask_kill method
The previous commit 574105b fixed the fact that killing a duplicate was
not possible.

This commit adds a small test to avoid regression.
2019-03-29 09:50:39 +01:00
Christophe Monniez
574105b66c [FIX] runbot: allow to kill a duplicate
Asking for the kill of a build which is the duplicate of another fails
because the state of this build is "duplicate", so the _ask_kill method
has no effect on it.

With this commit, the effect of _ask_kill is applied on the duplicate in
the above mentioned case.
2019-03-28 13:46:20 +01:00
Christophe Monniez
eb68de40f3 [FIX] runbot: speedup and limit search in frontend
When searching the builds for the frontend the resulting query can last
a very long time (up to 7sec).

With this commit, the search result is strictly limited to 100 builds,
the limit query parameter is removed and the search string length is limited to
60 chars.

The guess_result method is now optimized to guess results for testing
builds only. The others have the same value as the final result.
A few tests were added for this method.
Thanks @KangOl for the optimization code.
2019-03-19 16:55:36 +01:00
Christophe Monniez
f50b13172d [FIX] runbot: ivalidate cache to get valid hook_time
When github reaches the hook controller, the repo hook_time field is
updated. That way, a git fetch is done only when the hook_time is newer
that the last fetch. If the hook_time is updated during the long running
cron that runs the _cron_fetch_and_schedule method, the hook_time is cached
and only the old hook time is seen until the cron's end. The cursor
commit is not enough. As a result, the new builds are scheduled in the
next cron run.

With this commit, the cache is invalidated after the commit, that way,
the hook_time field contains the correct value.
2019-03-15 08:08:22 +01:00
Christophe Monniez
64694a6b0b [FIX] runbot: find duplicate when no PR in community
When a PR is created in odoo/enterprise but without a corresponding
PR in odoo/community BUT a corresponding branch in odoo-dev/community,
the closest_branch detection fails. Moreover, the duplicate detection
fails too.

As a consequence, the PR build will probably fail because it will be
built with the default target branch that could not be suited for it.
If the branch built succeeds, it leads to inconsistent results.

With this commit, a new case is added on the _get_closests_branch_name
to handle this case.
The serever_match field also reflects the difference as this case will
be marked as 'no PR'.
When a PR also exists in odoo/community, the server_match field will be
'exact PR'. This change should not imply migration.

This commit also adds a bunch of tests to test the closests branch name
detection and the duplicates.

Co-authored by @Xavier-Do
2019-03-14 08:59:13 +01:00
Christophe Monniez
da6551c28c [FIX] runbot: properly convert update frequency into integer 2019-03-11 22:01:17 +01:00
Christophe Simonis
10b456deda [FIX] runbot: update git before logging last commit 2019-03-07 10:40:54 +01:00
Christophe Monniez
51938247d8 [FIX] runbot: send failure status to github when result is warn
When a runbot build ends without error but with one or more warning,
status are not sent to github. As a result, the PR stays in pending
state.

With this commit, the github status is set to failure when a build ends
in a "warn" result.
2019-03-01 17:33:03 +01:00
Christophe Monniez
286b1a3d30 [FIX] runbot: update dependency repo before checkout
At checkout time when a build has no server (e.g. enterprise),
the dependency repo that contains the server needs to be extracted too.
It happens that this dependency repo is not up to date.

With this commit, the dependency repo is updated before its extracttion.
2019-02-26 17:34:34 +01:00
Christophe Monniez
6e57b0954d [FIX] runbot: limit duplicate builds search to one
When searching for duplicate builds, a git ls-remote is used to verify
that the branch still exists. This command is time consuming (up to 2
seconds).

If the number of build is significant, it can last a very long time.

When a user push one ore more new branches without new commits, the
number of duplicate builds found may be very large (more than 92).
This loop blocks the cron wroker in charge of creating new builds.

This quick fix will limit the number of duplicate to 1 but if the
closest name is not the same, it will not be considered as a duplicate.
2019-02-26 15:44:58 +01:00
Christophe Monniez
41ce858c93 [FIX] runbot: fix oversight of logging reason in _skip
When giving a reason of a build skip, the reason paramater was missing
in the logging string.

Test is also added to verify the build skip.
2019-02-26 10:19:54 +01:00
Christophe Monniez
1617a2e339 [FIX] runbot: force repo update on runbot builders
When a runbot execute the cron_fetch_and_build method, the repo is
updated only if the webhook time is newer than the last fetch
time.

As the cron is now split into long running crons, the hook_time field is
cached. The runbot instance that sees a new build pending use this
cached value to estimate if the repo update is needed.

With this commit, the repo update is done right before exporting the
repo and only if the commit hash is not found.

As a bonus, the environment is reset in the long running cron of the
runbot builders to update the cached values.
2019-02-25 17:35:22 +01:00
Christophe Monniez
fe018aeefa [REF] runbot: split cron to speed up builds
The Runbot Cron is executed on each runbot instance. When the number of
instances scales, the time needed for an instance to obtain the cron
increases.

With this commit, the original runbot_cron is removed. Instead, a cron
have to be created to run the _cron_fetch_and_schedule method.
This method will fetch the repo and create pending builds. This cron is
intended to run only on one runbot instance. This method needs a host
parameter to specify which runbot instance will be in charge of this
task.

On the other hand, a dedicated cron have to be manually created for each
runbot instance that will have the build task.
Those cron's only have to call the _cron_fetch_and_build method with the
runbot hostname as a parameter. This method will then self
assign pending builds if there are slots available.
All available build slots are reserved in a single LOCKED SQL query.

Both methods are intended to last a large amount of time, just a few
minutes below the cron timeout to maximize the cron productivity.
The timeout is randomized to avoid deadlocks if the runbot instances are
started at the same time.

So the --limit-time-real parameter have to be set to a minimum of 180
sec (600 or 1200 are probably better targets).
2019-02-25 11:25:41 +01:00
Christophe Monniez
ffd27739a4 [FIX] runbot: limit number of log lines shown on build page
When displaying build logs, all the messages from ir_logging about this
particular build are fetched from the database.

From time to times, it happens that the number of logged messages is
really huge. Those messages lines could also contain multiple lines,
multiplying the number of row to generate in the html page.
When this happens, the process that generates the template last a long
time and ends with a MemoryError. If the end user, bored, hits the
refresh button multiple times, all the workers will be busy building
this template. In the end, all users get a Bad Gateway from nginx.

With this commit, the number of messages that will be taken into account
will be limited to 10000.
2019-02-21 15:57:14 +01:00
Christophe Monniez
602298330a [IMP] runbot: send status earlier when the build fails
When a user checks the runbot frontend, the guess_result field is used
to change the color of the build state. But github is not notified of
this guessed result.

As a consequence, the runbot_merge is not aware the build is failed and
will continue to wait.

With this commit, as soon as the guess_result detects a failure, the
status is sent to github, that way, runbot_merge will stop waiting
sooner.
2019-02-21 13:11:46 +01:00
Christophe Monniez
2c7feffd5e [IMP] runbot: avoid running test when installing base
When running the _job_10 method, a database is created with base module
alone. Tests are enabled during this job. Those tests are run again with
the _job_20 method. Moreover, even if the tests fail during _job_10,
they are not taken into account for the final result. The _job_10 method
duration is approximately 4 min.

With this commit, the tests are not enabled during _job_10.
2019-02-21 13:11:46 +01:00
Christophe Monniez
809f5639c2 [FIX] runbot: remove common ancestor case
Useless merge-base command is causing timeouts on runbots.
2019-02-20 10:09:36 +01:00
Christophe Monniez
4791c3a82e [IMP] runbot: add pyCrypto to Dockerfile
A new module in Odoo needs pyCrypto but this module alone is too limited
to justify an addition in the requirement file.

PR: https://github.com/odoo/odoo/pull/28816
2019-02-12 15:54:29 +01:00
Christophe Simonis
338166e474 [FIX] runbot: correct pg version detection
`local_cr` is directly a psycopg cursor, not an odoo one.
2019-01-31 16:29:21 +01:00
Christophe Simonis
5697f1ab9c [FIX] runbot: terminate all active queries before dropping database
The docker using this database may still be alive.
2019-01-31 15:37:04 +01:00
Christophe Monniez
3632463f80 [IMP] runbot: adapt test for github status
Adapt test for eb7f5de . The mentioned commit fixes an issue that occurs
when updating github status. A test already exists but was assuming that
the build is in 'done' state when reaching the job_29.

With this commit, the build used in test is set to 'testing' state like
in the real cases.

Also, a new test is added to test the job_00_init which also send
github status but with a minimal build.

Finally, the runtime that should appear in status description was
forgotten in the previous commit. Now the runtime is always sent with
the github status.
2019-01-24 21:31:23 +01:00
Christophe Monniez
ba542a204c [IMP] runbot: add fonts for arabic and asian languages
Reports printed with left to right languages or asian fonts are wrong.
With this commit, the necessary fonts are added to the Docker image.
2019-01-24 17:28:23 +01:00
Christophe Monniez
eb7f5de218 [FIX] runbot: update github status with correct state
Since d7c7e54 the github status is send in job_29. At this moment, the
state of the build is still 'testing'. For that reason, the github
status is set to 'pending'.

With this commit, once a result is available, the github status is
updated with the right value even if the build state is 'testing'.
2019-01-24 11:16:51 +01:00
Christophe Monniez
d7c7e547d4 [FIX] runbot: write build results in a separate job
When a build reach the job30_run method, results from a previous testing
methods are computed.
With the previous commit 8c73e6a901 this
job can now be skipped. In that case, the results are not set.

With this commit, the results are computed in a separate method.
2019-01-23 16:10:59 +01:00
Christophe Monniez
2e05c56354 [FIX] runbot: prevent build creation on job_type none
Since 8c73e6a it's possible to skip jobs from a build by using the
job_type field on the branch. If a branch job_type is set to 'none', the
builds are created but they stay in 'pending' state.

With this commit, the build is not even created if the 'job_type' is
'none'.
2019-01-23 14:38:29 +01:00
Xavier Morel
8c73e6a901 [IMP] runbot: add a job_type on branch and build
Since the runbot_merge module, some branches does not need to be built.
For example the tmp.* branches.
Some other branches does need to be tested but it could be useless to
keep them running. For example the staging branches.
Finally, some builds are generated by server actions during the night.
Those builds does not need to be kept running despite the branch configuration.

For example, the master branch can be configured to create builds with
testing and running but nightly multiple builds can be generated with
testing only.

For that purpose, this commit adds a job_type selection field on the
branch. That way, a branch can be configured by selecting the type of
jobs wanted.
A same kind of job_type was also added on the build that uses the
branch's value if nothing is specified at build creation.

A decorator is used on the job_ methods to specify their job types.
For example, a job method decorated by 'testing' will run if the
branch/build job_type is 'testing' or 'all'.
2019-01-22 14:18:58 +01:00
Christophe Monniez
8ef9eafc60 [IMP] runbot: get the logdb uri from a config parameter
When a build is created, the --log-db command line argument is built
using the same db and credentials that the one used by the runbot.

With this commit, this argument is built based on a postgress connect
URI given as ir.config_parameter in the settings.

A dedicated role must be created beforehand on the runbot postgresql
server, accordingly to the given URI.

Also, care should be taken to give minimal privileges to this user only
granting "update" on the table ir_logging_id_seq and
"insert,select,udpate" on the table ir_logging.
2019-01-18 09:43:56 +01:00
Christophe Monniez
b40bd6da5f [FIX] runbot: mock docker to get gateway during tests 2019-01-13 11:27:47 +01:00
Christophe Monniez
face7d6d78 [FIX] runbot: use regular branches to test last resort
To test the last resort branch matching when nothing in common can be
found, two PR were used leading to PR's target branch as the default
one.

Also, the test was never run beacause of a bad indentation.

With this commit, the indentation is fixed and the test uses regular
branches.
2019-01-13 11:27:47 +01:00
Christophe Monniez
4ac6a0db98 [IMP] runbot: add basic tests
Deploying non tested code is prone to errors and leads to frustration.
With this commit, basic tests are done to avoid such a situation.
2019-01-11 11:54:43 +01:00
Christophe Monniez
84e6be84ad [IMP] runbot: clean imports from odoo.http
In frontend.py, the whole odoo.http module is imported but request is
imported separately. This make it difficult to mock the different things
comming from http in tests.

With this commit, only the needed parts are imported from odoo.http.
2019-01-11 11:54:43 +01:00
Christophe Monniez
989513801a [FIX] runbot: find docker gateway for build smtp host
When a build is running, the stmp is the localhost.
Since Docker builds, the localhost is the container which does not catch
port 25 smtp. Mails are lost in the limbo.

With this commit, the default gateway of the Docker network is used as
smtp host for the builds. It's the responsability of the runbot host to
catch smtp traffic from the container.

This bridge interface exists by default on a system where Docker is
running. However, Docker is affected by this issue:
https://github.com/moby/moby/issues/26799

The first time the Docker daemon is installed, the Gateway is not
defined on the bridge interface. When the Docker daemon is restarted,
the gateway is correctly defined. Pay attention that restarting the
Docker daemon will kill all the running/testing builds.
2019-01-11 10:23:27 +01:00
Christophe Monniez
3c7d9de8d0 [FIX] runbot: mount host odoorc file in the container
When starting a container, the .odoorc|.openerp_serverrc file is not
used by the build.

With this commit, if a .odoorc or .openerp_serverrc file is found in the
home directory of the runbot user, this file is mounted read-only in the
container, allowing some customization.
2019-01-03 10:02:09 +01:00
Christophe Monniez
4c0cd91914 [REF] runbot: use Docker containers for builds
When building Odoo, the instance is started on the same host as the
runbot. It means that all the required python packages have to be
installed on each runbot hosts with the same versions. Also there is no
real separation between builds. Finally, from a security point of view,
arbitrary code could be executed on the runbot host.

With this commit, the runbot uses Docker containers to build Odoo.
During the tests, Odoo http ports are not exposed to the outside,
meaning that nobody could interact with that instance.

The Docker image used for containers is valid for Odoo branches 10.0,
11.0, 12.0 and master.

When building, right before starting the Odoo tests, the tested branch's
requirements.txt is now taken into account to adapt the container.

On a runbot host, the "docker ps -a" command can be used to have the
list of the current builds. The containers are named using the build
dest field and the current running job. For example:
  123456-12-0-123456_job_30_run

Prerequisites:

Docker have to be installed on the runbot hosts and the user that runs
the runbot should be able to use Docker. Typically, the runbot user have
to be added to the docker unix group.

On the first build, the Docker image will be built from scratch. It
can last several minutes locking the runbot cron during this time.
It means that on a multi-runbot configuration, this process will be
repeated for each runbot and during this time there will be no builds.

To avoid such a situation, the Docker image can be built from the
command line. The container.py file can be started like this:

  python3 container.py build /tmp/build_dir

The /tmp/build_dir directory will be created to store the Dockerfile.

When the process is done, the "docker images" command should show an
image tagged runbot_tests in the odoo repository. At that time, the
runbot instance can be started, it will use this image for the builds.

Api change:

The 'job_*' methods signature has changed, the lock_path is not needed anymore.

Docker image informations:

Currently, the Docker image is built based on Ubuntu bionic to
benefit of the python 3.6 version.

Chrome and phantomjs are both installed.

The latest wkhtmltopdf (0.12.5) is installed as recommended on our wiki:
https://github.com/odoo/odoo/wiki/Wkhtmltopdf
2019-01-02 11:32:04 +01:00
Christophe Monniez
a0dd87e45b [FIX] runbot, runbot_cla: notify each repo of cla status
When a PR is a duplicate of a branch, only the branch CLA status are
update. The same issue for build status was fixed in commit 4f1a55da9.

With this commit, there is new method than can be used in runbot_cla.
This method updates commit given status in each repo.
2018-12-07 09:43:16 +01:00
Christophe Monniez
4f1a55da9b [FIX] runbot: reduce the amount of github status
When commit is built serveral times, each time the status is updated, a
request is sent to github for each build.
As a side effect, if the first build is a failure and the last one a
success, github is wrongly updated to failure.
This bug is particulary annoying on PR in conjunction with the
runbot_merge, preventing a the PR to be merged even after several
rebuild.

With this commit, only the latest build per repository is used to update
the github status. The amount of github status updates is also reduced.
2018-12-06 10:53:45 +01:00
Christophe Monniez
248d23c2d0 [FIX] runbot: remove typo 2018-11-29 16:53:10 +01:00
Christophe Monniez
922be0a594 [FIX] runbot: split _get_branch_url again to avoid mass recompute 2018-11-29 16:48:34 +01:00
Christophe Monniez
c14b864b06 [FIX] runbot: fix branch infos singleton 2018-11-29 16:31:38 +01:00
Christophe Monniez
1330d52098 [REF] runbot: store the target branch name
In the case of PR, the name contains 'refs/pull/3175', the branch_name
contains '3175' and because of the previous fix e095170f8c, the
pull_head_name sontains something like 'blah:12.0-something'.

In that case, the _get_closest_branch_name reaches the fallback.

With this commit, the target_branch_name is stored in a new field and is
used as the fallback.
2018-11-29 16:18:33 +01:00
Christophe Monniez
e095170f8c [FIX] runbot: build PR with corresponding community PR
When searching for a matching PR in a target repo, the match was made on
the 'base ref' which is the base branch that the PR targets.
This means that the second case of the _get_closest_branch method was
never reached.

Example:
    An enterprise PR is created that targets Odoo branch 12.0 but with a
    matching community PR with a branch with the same name.
    The corresponding PR is never found by the runbot because the first
    rule match: '12.0' is the base ref of the PR.

This could have been fixed by using the branch pull_head_name field to
build the domain but that leads to a problem with the second rule:

If a PR branch is named 'patch-1', the domain will match each PR with
the same pull_head_name.

With this commit, the pull_head_name field will store the pull head
label. It's not a problem with older PR as a newly created PR in
enterprise will not accidentally match with older ones.

Another issue appeared with github branch naming like 'patch-'.
If someone creates a PR with a branch auto-named 'patch-1',
targeting the community repo and later creates an unrelated PR,
targetting another repo depending of the community, they will be
matched.

To avoid that, the pull head names that ends with 'patch-n' are not
stored. Those pull requests will be built against the target branch
head.

The actual behavior, before this commit, is a blocking point for the
runbot_merge which is based on PR's only. It means that when a community
PR is wrongly matched with with an enterprise PR runbot_merge will not
merge the PR's.
2018-11-28 15:28:38 +01:00
Martin Trigaux
828d3ebb2e [IMP] runbot: replace clock by moon icon
For scheduled build
While schedule can be at any time, it typically runs during the night, hence the moon
2018-11-09 15:53:55 +01:00
Christophe Monniez
439e336a2f
[FIX] runbot: store pull_head_name on branch
This one flew under the radar because it only affects a PR when its
branch name changes.

Closes #47
2018-10-19 08:50:20 +02:00
Christophe Monniez
c5e645df9e [IMP] runbot: add rebuild button on build page
When examining a particular build with the build view, one can be
frustrated being forced to navigate the frontend page to ask for a
rebuild.

With this commit, the rebuild menu entry is also visible on the build
page when the build is the last one of the branch.

Also the build host is now visible on the build page for the same
usability reason.
2018-10-10 17:19:59 +02:00
Christophe Monniez
070dbee204
[IMP] runbot: add priority field on branch
This commit permits to prioritize a branch when scheduling builds.
It's main purpose is for the runbot_merge module. It avoids to have
staging branches as sticky and pollutes the main repo view.
Also, that branch can benefit of the autokill feature when a newer build
is found, freeing ressources for other builds.

Closes #43
2018-10-09 16:42:34 +02:00
Christophe Monniez
b427cc675d
[IMP] runbot: add a frontend template for builds by branch
The frontend view shows only the four last builds by branch, which is a
little bit small to explore builds and search for failed builds.

With this commit, a new frontend template displays a paged list of
builds for a specified branch.

Closes #39
2018-09-21 08:45:30 +02:00
Andreas Perhab
3915f3d7ae [IMP] runbot: perform fetch with one git command
Closes: #33
2018-09-06 11:56:58 +02:00
JKE-be
0542b68b92 [IMP] runbot: allow to search multi terms with |
With this feature you can easily search your branch and branch from your team; or your features...

Eg: jke|-website or -jke|-rde|-qsm|...

Closes: #32
2018-09-06 10:03:57 +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
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 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 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
Christophe Simonis
f7b2a40f43 [FIX] runbot: favor sticky branches during matching 2016-02-23 11:48:18 +01:00
Olivier Dony
d9c9642675 [FIX] runbot: workaround for nginx bug leaving orphan worker, blocking port 2016-02-12 15:24:32 +01:00
Christophe Simonis
72bfc504cc [IMP] runbot: hide stopped hosts from dashboard page 2016-02-09 14:48:38 +01:00
Christophe Simonis
f77c52119e [IMP] runbot: log matching closest branches 2016-02-09 14:38:38 +01:00
Christophe Simonis
7e9ddee6ea [IMP] runbot: cleanup builds after 7 days.
By cleaning job only after 7 days, we ensure we keep logs of killed
jobs (or jobs that doesn't even start) for easier debuging.
2016-02-09 14:11:49 +01:00
Jeremy Kersten
5ef0b2ee6d [FIX] runbot: avoid traceback when build_ids was empty (eg: filter by search) or not declared.
equivalent to max(build_ids, default=0) in python 3
2016-01-27 17:29:09 +01:00
Jeremy Kersten
fccd90f755 [IMP] runbot: keep search when we switch of repo from shorcut at top right 2016-01-26 16:59:45 +01:00
Olivier Dony
93dd0f5ee0 [FIX] runbot: do not use remote cursor for dropping local dbs
To find out the list of manually created dbs,
rev. 4d94f45 used the cursor that is connected to the
master `runbot` database, which may reside on a different
cluster/host.

- Add a helper to run commands on the local PG cluster
instead ("postgres" database).
- Modify other commands for local cluster (create/drop db)
to use the same cursor. Rename those methods to _local_*
to better indicate their local effect.
2016-01-18 18:47:17 +01:00
Olivier Dony
be34ac72c9 [FIX] runbot: reduce serialization failures (TransactionRollbackError)
Both the cron and the tests themselves need to write to the builds,
which triggers the update of the `repo_id` field, as it is a stored
related.
2016-01-18 18:09:05 +01:00
Olivier Dony
431a3f6d5b [IMP] runbot: do not display hosts with no recent builds (considered stopped) 2016-01-18 18:09:05 +01:00
Joren Van Onder
fa68c54477 [IMP] runbot: blacklist a couple of POS related modules
- pos_blackbox_be: because it makes the POS unuseable without a blackbox
- pos_cache: because it's too confusing for runbot users, everytime they
             update a product they have to also update the cache, but
             most people don't realise that.
2015-12-10 09:26:59 +01:00
Moises Lopez
7a842e5e45 [FIX] runbot: Fix csrf error in rebuild method
Runbot is intended to be run on a 8.0 instance but if runs on a 9.0, CSRF needs
to be disabled. Will not break on 8.0 code.

Closes #84
2015-10-22 12:20:37 +02:00
moylop260
3b5669bd01 [FIX] runbot: Fix no such file FETCH_HEAD
Closes #80
2015-10-09 14:47:43 +02:00
Olivier Dony
d1cff975be [IMP] runbot: exclude l10n_ modules unless explicit
As of Odoo 9 the first l10n module installed will automatically
install its chart of account on the main company, so installing
the first one (l10n_ae) is surprising/strange.

Branches that want to build l10n_* modules should list
them explicitly in the "modules to install" field (modules).

In addition, having demo data to set the country of the
main company will automatically installe the relevant
l10n module if it exists. This is the default in Odoo 9
with l10n_us.
2015-10-09 14:41:46 +02:00
Olivier Dony
19f6c36156 [IMP] runbot: detect and warn for builds where server branch cannot be properly determined
More useful recently for enterprise builds where an
appropriate server branch is always required
2015-09-23 16:06:35 +02:00
Olivier Dony
42ae78f647 [FIX] runbot: typo, branch is a dict from search_read() 2015-09-11 12:24:21 +02:00
Odoo Online
d40460d9f1 [IMP] runbot: ir.cron frequency from 0.016 Hz to 0.1 Hz
Monkey patch ir.cron to increase frequency to 0.1 Hz.

In a setup with 6 workers every worker should have the lock every minute.
2015-09-09 01:16:37 +02:00
Odoo Online
44771039ce [FIX] runbot: repo hook 2015-09-09 00:35:45 +02:00
Antony Lesuisse
b9c2a1f9e1 [IMP] runbot add github hook support 2015-09-08 17:04:30 +02:00
Olivier Dony
544bbe5a10 [FIX] runbot: typo s/local/repo 2015-08-24 10:40:13 +02:00
Christophe Simonis
abce301ed1 [IMP] runbot: search of closest branch
When searching the closest branch, search through all duplicated
repositories.
2015-08-21 14:48:21 +02:00
Christophe Simonis
bab6221882 [IMP] runbot: drop all db with build prefix on cleanup 2015-08-19 19:36:49 +02:00
Christophe Simonis
b15a66dd16 [FIX] runbot: keep logs for killed builds 2015-08-19 19:16:36 +02:00
Christophe Simonis
b8d06e7fa0 [IMP] runbot: add links to sticky-dashboard 2015-08-05 16:57:50 +02:00
Christophe Simonis
238d6c6fab [IMP] runbot: move job_timeout field to branch 2015-08-05 16:26:50 +02:00
Christophe Simonis
8b5e0263bd [IMP] runbot: better sticky-dashboard view 2015-08-04 18:23:50 +02:00
Christophe Simonis
aeada94df9 [ADD] runbot: sticky-dashboard page 2015-08-04 15:23:09 +02:00
Christophe Simonis
9ebc8d6447 [IMP] runbot: timeout per repo 2015-08-03 18:07:19 +02:00
Christophe Simonis
231e456e3b [FIX] runbot: ensure every arguments is a string when spawning processes 2015-07-31 16:48:40 +02:00
Christophe Simonis
edf5712fb3 [FIX] runbot: better handling of github API errors 2015-07-31 16:47:12 +02:00
Christophe Simonis
491151d251 [FIX] runbot: install explictly set modules, even if they are blacklisted 2015-07-24 19:18:08 +02:00
Christophe Simonis
2e01744b0d [IMP] runbot: better search of closest branch.
Can now search for matching PR
2015-07-15 16:57:56 +02:00
Olivier Dony
2e2c7f0c21 [IMP] runbot: ignore missing modules in list of modules to install
This allows configuring an explicit list of modules to install
on a repository without having orange builds (with warnings)
whenever a branch does not have one of these modules for some
reason.
2015-07-14 14:50:37 +02:00
Christophe Simonis
6486cf49be [FIX] runbot: better search of closest_branch for saas branches 2015-07-13 17:20:01 +02:00
Olivier Dony
df1d0f81b3 [FIX] runbot: proper join of modules from {build,branch,repo} 2015-07-13 10:20:20 +02:00
Christophe Simonis
97ad5e7746 [FIX] runbot: '' is not a valid module name 2015-07-13 10:15:27 +02:00
Olivier Dony
0bea276f48 [IMP] runbot: support finer-grained selection of modules to test 2015-07-10 20:01:32 +02:00
Olivier Dony
d12b1914d0 [FIX] runbot: /runbot/badge route should work also for private repositories
This lets us use them in README files
on GitHub, which uses an image proxy
that does not have access to private
repositories.

This is an acceptable disclosure of
information about private repos.
2015-07-10 20:00:21 +02:00
Christophe Simonis
ed3d82be51 [FIX] runbot: do not install hw_* and theme_* modules 2015-06-18 18:24:35 +02:00
ged-odoo
c3e2a6f72d [FIX] runbot: overwrite duplicate addons
The web addon is supposed to be duplicate, and needs to be installed
(in the enterprise version) over the community edition.

A better fix would be to keep the folder and use the --addons-path key
to start the server with the correct addon, but this is an urgent
change.

closes #69
2015-06-17 13:02:43 +02:00
Nicolas Seinlet
d7edc2b0d5 [IMP] runbot: deprecate unused fields
testing and running in repository are not used anymore since they are now
two ir.config_parameter:
- runbot.workers
- runbot.running_max
2015-05-21 10:50:58 +02:00
Martin Trigaux
b98568709f [FIX] runbot: find build to be skipped
search should be made on runbot.build and not runbot.repo object
2015-05-05 13:06:02 +02:00
Christophe Simonis
ff404a4334 [FIX] runbot: ensure logs dir exists 2015-04-30 18:19:54 +02:00
Martin Trigaux
4fb0b2c735 [IMP] runbot: better scheduler
pushing new commits on your branch should not make you loose rank in schuler
build order is based on sequence which is the id of the build, take lowest
2015-04-28 15:21:21 +02:00
Sandy
78d5cad296 [FIX] runbot: don't link to logs if build was skipped
When a build is skipped, `build.host` is `False`.
The proposed link is then just `http://rubot/static/build/...` which is invalid.
As there is no logs anyway, hide the buttons.
2015-04-28 13:43:21 +02:00
Sandy Carter
15870dcc7e [FIX] runbot: remove trailing '.git' in repo base
The base field is used to compose URL (e.g. "https://%s/pulls" % repo.base).
The URL given by github can contains trailing '.git' so this should be removed.
2015-04-28 13:28:22 +02:00
Samuel Lefever
3da19f47b7 [IMP] runbot: fqdn method to get fqdn 2015-04-28 10:48:36 +02:00
Olivier Dony
7137c49ec5 [FIX] runbot: skip github API calls if repo has no token, instead of crashing/logging an exception
Avoids spurious errors for the github status updates
2015-04-23 10:35:14 +02:00
Jeremy Kersten
e0103ed3f0 [IMP] runbot: change menu and remove black user_navbar
Useless for employee who don't edit runbot
2015-04-13 18:04:55 +02:00
Jeremy Kersten
745d146b4b [FIX] runbot: don't install website_instantclick by default
This module should be simply deleted in a futur version.
The implementation are not more supported with Odoo.
Architecture need to be reviewed to allow the support of this library
2015-04-08 17:29:55 +02:00
Nicolas Seinlet
bbd0b63afa Set groups on buttons to avoid users with backend access to killall builds 2015-04-08 16:57:15 +02:00
Christophe Simonis
9532378ed2 [IMP] runbot: allow upload of bigger files. 2015-04-01 18:03:33 +02:00
Christophe Simonis
ce47981b41 [IMP] runbot: put groups in their own category. 2015-03-31 13:51:17 +02:00
Christophe Simonis
12d84fe1d7 [FIX] runbot: access ir.logging as SUPERUSER 2015-03-31 13:45:36 +02:00
Christophe Simonis
97abe6b764 [FIX] runbot: read ir.logging as SUPERUSER 2015-03-31 13:43:50 +02:00
Christophe Simonis
cf86d6e2b8 [IMP] runbot: Allow restrict access to repo. 2015-03-31 12:58:58 +02:00
Christophe Simonis
83804739dd [IMP] runbot: 2015-03-27 14:54:45 +01:00
Christophe Simonis
34271748a8 [IMP] runbot: better front page 2015-03-03 11:13:35 +01:00
Christophe Simonis
e193aa3897 [IMP] runbot: better front page 2015-03-02 17:26:54 +01:00
Christophe Simonis
a31109ffe7 [FIX] runbot{,_cla}: really check CLA
c6ce286 moved cla check as first job (`05_check_cla`), but as the
checkout of the working directory was done in `10_test_base`, the check
was actually a no-op.

Do the build environment init in `job_00_init`.

Jobs that does not returning a pid to wait for are automatically
rescheduled.
2015-02-17 15:29:05 +01:00
Christophe Simonis
4e55f4f2f2 [FIX] runbot: use an uri as log-db only if runbot database is on another server 2015-02-11 14:21:51 +01:00
Olivier Dony
2486921a60 [FIX] runbot, runbot_cla: clearly notify pending builds
Avoids confusing users with an all-green CLA mark for a build
that is only starting.

+ Do CLA check as first step, no need to wait
2015-02-11 13:22:28 +01:00
Odoo Online
d65b59f47b [FIX] runbot typo 2015-02-09 19:35:53 +01:00
Olivier Dony
578c379779 [FIX] runbot: create ir.cron record in noupdate mode
Should let us restart an instance with -u runbot
even when another runbot worker is executing the
cron job (locking it in the database).
2015-02-09 10:09:31 +01:00
Odoo Online
a0f8d18586 [FIX] runbot cla fixes 2015-02-09 03:56:54 +01:00
Jeremy Kersten
06fa4526ed [FIX] runbot: typo (related to 4a698da) 2015-02-08 22:22:07 +01:00
Odoo Online
d4db0c89aa [FIX] runbot typo 2015-02-07 18:22:49 +01:00
Antony Lesuisse
de54d4a78c [ADD] runbot_cla
remove useless status in runbot
add author and committer email
clean up repo form view
add runbot cla module
2015-02-07 16:33:23 +01:00
Olivier Dony
8b7c17ca68 [FIX] runbot: only start server with --no-xmlrpcs if supported by that series 2015-01-29 11:22:14 +01:00
David Monjoie
d97f2d9f11 [FIX] runbot: keep modules to install list when forcing rebuild 2015-01-22 17:21:29 +01:00
Jeremy Kersten
dfdd6368af [IMP] runbot: check that duplicated is running + fix /b/
/b/ :
    Use smallest repo_id by default if repo is not specified
    Allow to force the repo in quick_url /b/<branch_name> -> /<repo>/<branch_name>

Duplicated:
    If state is duplicated, the main build in not always running
2015-01-22 16:59:56 +01:00
David Monjoie
478f9fcd24 [IMP] runbot: display build module list in form view 2015-01-21 14:41:23 +01:00
Olivier Dony
247b1581f4 [IMP] runbot: update "flat" badge template to match latest shields.io
(text outline, rounded corners)
2015-01-20 17:17:41 +01:00
David Monjoie
51ab9cb5de [FIX] runbot: fallback on splitting name when no common ancestor 2015-01-20 16:20:35 +01:00
Odoo Online
d3fe1d9c3e [IMP] runbot smaller status bar 2015-01-18 19:21:32 +01:00
David Monjoie
69fa2472e3 [FIX] runbot: fixed strange red build bug for repositories having dependencies
There was an uncaught exception raised by one of the git command in certain cases when searching for the right branch in the dependencies repositories. Because of this error, the dependencies process never finished, and in some case there was no server to run because the server was located on a dependency repo. With no server to run, the build would fail instantly at the start of the testing phase.
2015-01-17 12:59:19 +01:00
Jeremy Kersten
751ea280bc [FIX] runbot: use js from @KangOl 680b884 to post the rebuild. 2015-01-12 17:12:08 +01:00
Jeremy Kersten
7c1da783db [FIX] runbot: improve usability
Add button Quick connect on main page
Add button "Force rebuild" when /runbot/b don't find a running build
2015-01-12 16:20:08 +01:00
Antony Lesuisse
66d53e77e4 runbot cleanup natural death too
dont leave leftover of build that were not killed by the scheduler
2015-01-09 03:34:14 +01:00
Antony Lesuisse
1438152446 runbot git housekeeping 2015-01-09 03:34:14 +01:00
Antony Lesuisse
609cf0fbdf runbot log odoo stderr into logfile
revert commit dea869273a9a03f6f58993c3fa558a916cb8e4a5

phantomjs stderr is now discarded since odoo commit

5a642a802e

no need to discard odoo stderr from logfile.

Close #49
2015-01-09 03:34:14 +01:00
Christophe Simonis
eaf9d44485 [FIX] runbot: force datadir of builds 2015-01-05 11:34:41 +01:00
Jeremy Kersten
c5ae1d0375 [IMP] runbot: don't set debug mode if branch is 7.0 (don't supported by controller). Known issues: Pull request or branch with bad name for v7. 2014-12-15 14:31:46 +01:00
Jeremy Kersten
eb67bb79f4 [IMP] runbot - Search in the 10 last builds to find a running. Redirect by default in debug mode. 2014-12-15 00:23:21 +01:00
David Monjoie
ca64d736d0 [IMP] runbot: added modules to install parameter at the branch level 2014-12-03 12:36:42 +01:00
Jeremy Kersten
649a95f5ea [IMP] runbot: add route for opening last running build for any branch 2014-11-27 15:49:07 +01:00
Sandy Carter
ca9ae51477 [IMP] runbot: add admin group for setups where other users need to administrate runbot
Closes #43
2014-11-21 11:31:46 +01:00
Christophe Simonis
4e29689e7c [FIX] runbot: rebuild is now done via a real post. Allow the browser to respect the redirect. 2014-10-24 11:15:20 +02:00
Jeremy Kersten
1f0f1cd1ba [IMP] search : search also in the branch name and not only in dest, because when the branch name is too long, we cannot retrieve own commit because trigram has been replaced by build number 2014-10-13 17:30:15 +02:00
Olivier Dony
ef6405fb4e [FIX] runbot: typo in controller methods 2014-09-24 10:10:48 +02:00
Martin Trigaux
b84964d9f7 [IMP] runbot: rebuild using POST request
Force rebuild links were using GET method. We don't want crawlers to rebuild old builds....
2014-09-23 10:04:15 +02:00
Martin Trigaux
64a686aded [REM] toggle labels
Github labeling system may not be the best but this was not a good idea either, getting too much spam on pull requests
2014-09-23 09:49:03 +02:00
Christophe Simonis
f13e0aabe3 [FIX] runbot: correct sql-db uri generation 2014-09-08 11:31:37 +02:00
Christophe Simonis
e31fc72852 [FIX] runbot: grep the correct file 2014-09-08 11:10:33 +02:00
Christophe Simonis
cae1f9bf49 [IMP] runbot: remove uneeded class (design) 2014-09-05 17:06:12 +02:00
Antony Lesuisse
b03eb142a9 [IMP] runbot: allow grouping by host. graph view by default 2014-09-05 17:03:44 +02:00
Christophe Simonis
4a173cd34c [FIX] runbot: connect to sql-db via uri 2014-09-05 16:35:50 +02:00
Christophe Simonis
b1230795b4 [FIX] runbot: remove filestore when droping database 2014-09-05 16:31:39 +02:00
Christophe Simonis
f34975ecff [FIX] runbot: do not run odoo in with log-level=debug 2014-09-05 16:30:10 +02:00
Gery Debongnie
71c35940de [FIX] ignore build without hosts for displayed stats 2014-08-19 11:32:34 +02:00
Gery Debongnie
16521bb575 display specific host statistics in main page
also fix a bug with urls in logs
2014-08-19 11:24:29 +02:00
Gery Debongnie
b424851a1f [IMP] removes meaningless running and testing max
the runbot don't know how many machines are working and their specific
configurations.
2014-08-18 14:57:04 +02:00
Gery Debongnie
533b96bba5 [FIX] fix url for full/base logs 2014-08-18 14:20:29 +02:00
Gery Debongnie
1d6620c4c6 [FIX] fix url in build 2014-08-18 12:46:03 +02:00
Gery Debongnie
e80ac6b4dc [FIX] add host name instead of domain name in templates 2014-08-18 12:32:36 +02:00
Gery Debongnie
8c5221f9ba [FIX] add host field to tree and form view 2014-08-18 12:11:28 +02:00
Antony Lesuisse
ff3cd203c7 runbot createdb locally using commandline 2014-08-17 18:06:03 +02:00
Moises Lopez - https://www.vauxoo.com/
85039d0660 [FIX][runbot] Add context parameter
Cron function receive context parameter but no send it.
This is important for manage inherit function

(Rebase of #32)
2014-08-14 01:23:44 +02:00
Antony Lesuisse
e3204418cc runbot dont send dead builds longpolling to runbot 2014-08-13 22:48:27 +02:00
Antony Lesuisse
e7ca719dca runbot multihost 2014-08-13 22:47:41 +02:00
Antony Lesuisse
3ae2ab8435 runbot move constants 2014-08-13 22:47:06 +02:00
Christophe Simonis
75b6cef68c [IMP] runbot: template "build_name" can hide time 2014-08-11 17:08:28 +02:00
Christophe Simonis
ea2989bede [FIX] runbot: force create database with collate "C" 2014-08-01 12:11:50 +02:00
Christophe Simonis
b360ab6de4 [FIX] runbot: correct svg template
use `t-attf-xmlns` to avoid `xmlns` being handled by qweb xml parser itself
2014-07-31 17:05:54 +02:00
Olivier Dony
0705e42557 [IMP] runbot: add github octicons, thinner arrow for committer 2014-07-31 12:38:46 +02:00
Denis Ledoux
23c91278d7 [ADD] revision committer 2014-07-30 13:27:39 +02:00
odony
6265f24ce3 Merge pull request #20 from bwrsandman/patch-1
[MERGE] runbot: more robust detection of "Modules Loaded"
2014-07-25 17:23:29 +02:00
Sandy Carter
93f7a7d6c3 Add hint_repos set to help find the common branch in cases whith many dependent repos 2014-07-24 21:39:07 -04:00
Moises Lopez
be765dd6ef [REF][runbot] Add validation of module duplicate 2014-07-24 20:21:42 -04:00
Moises Lopez
071720433c [REF][runbot] Fix find modules to test and add support to use one previously configured in the repository 2014-07-24 20:13:53 -04:00
Sandy Carter
5e25a8aeb2 Use git API to find base branch name for PRs when looking for common branch names in extra deps 2014-07-24 20:13:53 -04:00
Sandy Carter
91beb61727 Add function to better find proper fallback branch 2014-07-24 20:13:46 -04:00
Sandy Carter
9dbc76d9ab Change fallback_id to many2many
A Community addon can depend on more than just an odoo server, but other
addon repos

Bump version
Add migration script

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
2014-07-24 18:10:15 -04:00
Sandy Carter
0fb5ef92c4 Allow some builds to determine which modules to test
OCA addon repos will only want to test modules at root

Glob before retrieving dependencies and store in build object

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
2014-07-24 18:09:07 -04:00
Gery Debongnie
41796383c7 [IMP] save committer date at creation
also, add a create_date filter in the build search view.  It allows
interesting statistics to be displayed in the graph view.
2014-07-24 10:17:17 +02:00
Olivier Dony
9300bd8cd8 [FIX] runbot: compatibility with 7.0 API 2014-07-23 13:09:08 +02:00
Gery Debongnie
dfa6fbad61 [FIX] notifies github when duplicate isn't pending
when a duplicate build is created, it now check if it isn't pending.
If not, it properly notifies github.
2014-07-23 12:26:41 +02:00
Gery Debongnie
aa0c64c2b1 [IMP] optimize the number of queries in controller
now, it only does one query to get the ids of each builds,
instead of a query for each branch
2014-07-23 12:26:40 +02:00
Gery Debongnie
6d7077ba12 [FIX] improves the search in runbot repo
now, it searches by fields 'dest' and 'subject'.  Also, slightly
improves the logic behind the controller.  Oh, and also prevent a
crash when searching
2014-07-23 12:26:40 +02:00
odony
6128ed42ea Merge pull request #23 from bwrsandman/patch-3
[FIX] runbot: nginx field name conflict fixed by renaming `nginx()` to `reload_nginx()`
2014-07-22 23:19:13 +02:00
Sandy
793ba31eca Fix nginx field-function ambiguity 2014-07-22 11:50:52 -04:00
Sandy Carter
73cebcf696 [FIX] runbot: use runbot.repo.domain() instead of hardcoded URL
(the whole thing could possibly be replaced by web.base.url)
2014-07-22 17:37:32 +02:00
Olivier Dony
cc1fbaf9cc [IMP] runbot: add a few missing indexes 2014-07-22 16:52:11 +02:00
odony
5509e7963b Merge pull request #22 from bwrsandman/patch-2
[IMP] runbot: support repo names with `.git` suffix when performing github API calls
2014-07-22 16:41:28 +02:00
Gery Debongnie
40f68b81be [ADD] add a graph view for runbot builds 2014-07-22 11:01:34 +02:00
Gery Debongnie
019cee7f54 [IMP] various improvements 2014-07-22 10:26:34 +02:00
Gery Debongnie
12bb6d05a1 [IMP] add domain key to the runbot settings screen 2014-07-18 16:43:31 +02:00
Gery Debongnie
a63fa03dd2 [FIX] notifies github for duplicate builds 2014-07-18 16:01:44 +02:00
Gery Debongnie
7c5e2c8c68 [IMP] improve behavior of skipped/forced builds 2014-07-18 13:33:56 +02:00
Gery Debongnie
0c8ddf2a0d [IMP] display duplicate builds 2014-07-18 13:19:33 +02:00
Gery Debongnie
40a1d8010b [IMP] optimizations to runbot controller 2014-07-18 11:01:56 +02:00
Gery Debongnie
06fe91b443 [IMP] code refactoring 2014-07-17 13:07:48 +02:00
Gery Debongnie
242e28abf9 [IMP] rename 'v' in 'context' 2014-07-17 10:00:39 +02:00
Gery Debongnie
b28a710234 [IMP] ignore skipped when detecting duplicate 2014-07-17 09:56:48 +02:00
Gery Debongnie
0ffbc9c30d [IMP] allow detection of duplicate builds 2014-07-16 16:50:03 +02:00
Gery Debongnie
5579fae1c8 [IMP] add starting port as configuration option 2014-07-16 10:11:29 +02:00
Sandy
673c979930 Support repo names with .git suffix
Fixes #17
2014-07-15 11:11:59 -04:00
odony
b4e680f095 [FIX] runbot: compatibility with v7 2014-07-15 16:52:27 +02:00
Gery Debongnie
2a48508bdf [IMP] better code for list_jobs
inspired by https://github.com/odoo/odoo-extra/pull/19
2014-07-15 16:31:15 +02:00
Gery Debongnie
8e01b6b2c6 [IMP] put the default timeout in runbot options
instead of hardcoding it
2014-07-15 16:28:20 +02:00
Gery Debongnie
7261f5f479 [IMP] throw exception when no toke is available 2014-07-15 14:38:36 +02:00
Gery Debongnie
433d8bc67c [IMP] improvements to runbot repo page 2014-07-15 13:33:25 +02:00
Gery Debongnie
1762df1747 [IMP] share the workers between repos 2014-07-15 11:33:38 +02:00
Gery Debongnie
2089b04c1f [IMP] display the nmbr of pending/running/testing
display the total number (for the runbot) and the numbers by repo
2014-07-15 10:55:35 +02:00
Gery Debongnie
46ce71ee4a [IMP] xml improvement 2014-07-15 10:19:04 +02:00
Gery Debongnie
48bd01e6f2 [IMP] add a res_config to the runbot
it can save/get two keys: default_workers and default_running_max
2014-07-15 10:13:32 +02:00
Sandy
c0eadd5dac Be more forgiving in detecting Modules Loaded
There is no problem yet, but this line is prone to future errors.

This line catches all cases without having to pool the filesystem.
2014-07-14 18:01:12 -04:00
Gery Debongnie
a823519cdf [FIX] preparation for v8 (fix various issues) 2014-07-14 14:22:23 +02:00
Gery Debongnie
6aa2e146e6 [MERGE] merge from origin/master 2014-07-14 10:10:43 +02:00
xmo-odoo
4cbd527565 [FIX] non-renamed branches path handling
Is there *really* a need for them to keep working?
2014-07-08 13:48:40 +02:00
Xavier Morel
9110f3875a [FIX] actual support for openerp -> odoo 2014-07-08 13:41:08 +02:00
xmo-odoo
6f5489cc93 Compatibility with openerp -> odoo rename 2014-07-08 12:18:45 +02:00
Gery Debongnie
8def4a52f8 [IMP] change the kill timeout back to 30 min 2014-07-06 16:31:20 +02:00
Gery Debongnie
a5a50a5694 [FIX] correct a typo in variable name 2014-07-04 21:16:15 +02:00
Gery Debongnie
2db9b911b1 [MERGE] merge from master 2014-07-04 16:45:03 +02:00
Gery Debongnie
a80d44b451 [FIX] makes sure the build order is FIFO
instead of LIFO (for csn...)
2014-07-04 16:33:32 +02:00
Gery Debongnie
2a5f6c3a51 [IMP] stylistic improvements
easier to understand and to fix...
2014-07-04 16:22:29 +02:00
Antony Lesuisse
6d4324b251 [FIX] keep running highest priority builds, not lowest oneswq 2014-07-04 15:29:39 +02:00
Antony Lesuisse
3c71c38839 runbot build log template typo 2014-07-04 15:11:33 +02:00
Antony Lesuisse
16f392e916 runbot fix gevent test 2014-07-04 15:11:32 +02:00
Antony Lesuisse
aa55d36911 [FIX] dont run cron, improve log display
Dont run cron while testing this was causing apiculture to be slow.
2014-07-04 15:11:32 +02:00
Gery Debongnie
4e1b44e3aa [IMP] improve runbot scheduler algorithm
Now it is very simple: it always builds sticky branch if any, otherwise
last pending job.
2014-07-04 14:47:58 +02:00
Gery Debongnie
969f28f126 [FIX] correctly skip builds when they get too old 2014-07-04 14:12:12 +02:00
Gery Debongnie
93e875ed20 [FIX] make the 'rebuild' functionality work
if it is a skipped build, it will be put back in pending state, with
a high sequence number.

if it is a complete build, it will be duplicated
2014-07-04 13:51:14 +02:00
Gery Debongnie
b8b782b831 [IMP] skip builds when they will never be built
this marks builds as 'skipped' if a newer build in the same branch
arrives, or if they are too old to be built anyway
2014-07-04 12:05:10 +02:00
Gery Debongnie
6109efb122 [IMP] various code cleanups 2014-06-27 16:09:10 +02:00
Gery Debongnie
a70e64e976 [IMP] various code cleanups in runbot.py 2014-06-26 14:56:37 +02:00
Gery Debongnie
30a36aa0f6 [IMP] various code improvements in runbot 2014-06-26 11:58:03 +02:00
antonylesuisse
6cb6bdd4ab Merge pull request #6 from bwrsandman/same_python
Spawn openerp using same python executable
2014-06-25 10:45:35 +02:00
Sandy Carter
7d5afaad91 Fix server error when viewing runbot page with no repos
Only display filters when there are repos
Only display search when there are repos
2014-06-24 10:50:43 -04:00
Christophe Simonis
684210c1c3 [FIX] runbot: differential kill and terminate 2014-06-24 15:58:11 +02:00
Christophe Simonis
38d1ed7d11 [FIX] runbot: give more life to builds 2014-06-24 12:45:01 +02:00
Christophe Simonis
90d251615e [IMP] runbot: update github status at build birth and death 2014-06-24 12:43:22 +02:00
Christophe Simonis
c5486cb430 [FIX] runbot: correct build killing 2014-06-24 12:26:39 +02:00
Antony Lesuisse
275f55d227 [IMP] runbot: nginx log_format: log request times 2014-06-20 16:26:15 +02:00
Christophe Simonis
c35eb7f23a [IMP] runbot: better design for killed builds 2014-06-19 14:42:38 +02:00
Christophe Simonis
43470bb8df [IMP] runbot: mark killed builds as "killed" 2014-06-19 14:12:04 +02:00
Christophe Simonis
a82488bce5 [FIX] runbot: working late is never a good idea... 2014-06-18 23:35:14 +02:00
Christophe Simonis
18a0482cf7 [FIX] runbot: set type when logging jobs 2014-06-18 23:28:34 +02:00
Christophe Simonis
d067c4c629 [IMP] runbot: jobs logs when they starts 2014-06-18 23:23:51 +02:00
Martin Trigaux
c1322e9135 [IMP] do not install gengo on runbot because it is not configured and will raise warning 2014-06-18 17:14:59 +02:00
Martin Trigaux
0d30ffec5c change parameter name to what it actually does 2014-06-17 16:21:02 +02:00
Martin Trigaux
70ccc49bc7 [FIX] default build result is empty to match in domains result != 'somethind' 2014-06-17 16:19:11 +02:00
Christophe Simonis
66505df1f6 Matching with better regex 2014-06-17 14:49:18 +02:00
Martin Trigaux
03bb317aa9 Update also view labels to toggle labels 2014-06-17 14:23:36 +02:00
Martin Trigaux
50565224b5 Do not compute badge for skipped and display warning badge 2014-06-17 14:22:46 +02:00
Martin Trigaux
ad834107c3 Avoid getting broken pipe errors in logs 2014-06-17 14:15:36 +02:00
Martin Trigaux
4413315e86 [FIX] or condition was wrong, put text in orange 2014-06-17 12:49:35 +02:00
Martin Trigaux
81a66c4a78 [ADD] warning levels in tests 2014-06-17 12:38:38 +02:00
Martin Trigaux
e49cde3032 update labels to new definition 2014-06-17 12:33:01 +02:00
Olivier Dony
44ae495f7a [IMP] runbot: show build time in human-readable format 2014-06-16 12:09:27 +02:00
Sandy Carter
bebfd0dd4b Spawn openerp using same python executable
Solves issues of spawning wrong version of python or popping out of virtualenv
2014-06-13 14:13:11 -04:00
odony
f0ca75f582 Merge pull request #3 from bwrsandman/patch-1
Specify additional python dependency
2014-06-13 17:12:05 +02:00
Olivier Dony
9c5819a7ea [IMP] runbot: allow manually marking a build as skipped, should probably be done automatically or something 2014-06-13 09:50:32 +02:00
Sandy
e55b112e66 Specify additional python dependency
Include matplotlib introduced in 32aecb13
2014-06-12 14:47:33 -04:00
Christophe Simonis
f37354b054 [FIX] runbot: badges: Tkinter require a X server. use matplotlib to compute text width 2014-06-12 12:28:27 +02:00
Christophe Simonis
52b10975e9 [IMP] runbot: badge is now directly rendered via a qweb template instead of depending on shields.io service 2014-06-12 11:08:31 +02:00
Christophe Simonis
e3fe1ef28d [FIX] runbot: correct badge route 2014-06-11 00:05:41 +02:00
Christophe Simonis
c731d4abf1 [ADD] runbot: add badge route 2014-06-10 15:59:14 +02:00
Antony Lesuisse
be9a8851d0 fix rollback when killing 2014-06-03 22:40:41 +02:00
Antony Lesuisse
73aef7f083 killpg to kill all workers, rebuild only on last build 2014-05-29 04:46:36 +02:00
Antony Lesuisse
0d8df5ea0b label id is an int, not a string 2014-05-28 16:28:32 +02:00
Antony Lesuisse
d46035c7f7 better display of build 2014-05-28 15:47:36 +02:00
Martin Trigaux
08f2a10d84 [ADD] toggle labels on the runbot 2014-05-28 15:43:35 +02:00
Antony Lesuisse
d0e313cdfd Order the build events oldest first and add author and commit information when rebuilding 2014-05-28 14:27:30 +02:00
Antony Lesuisse
d075d1e8a0 runbot add author and subject support 2014-05-28 01:02:02 +02:00
Antony Lesuisse
33304c77ec runbot change build url to use id 2014-05-27 02:17:39 +02:00
Antony Lesuisse
c2ca8aeed9 runbot fixes
- rebuild create a new build
- test pull head instead of merge
- move commit status to a function, to add support for pending
2014-05-27 01:59:22 +02:00
Antony Lesuisse
5423ea2394 bzr import runbot and document_fs 2014-05-26 01:56:21 +02:00