Commit Graph

11 Commits

Author SHA1 Message Date
Christophe Monniez
f5dcb7b371 [FIX] runbot_cla: fix enforce utf-8 even when runbot locale is different
The CLA md file must be encoded in UTF-8 but before this commit, the
file was opened with the locale of the system running the runbot. That
way, a UnicodeDecodeError was raised when the CLA was UTF-8 and not the
runbot locale was different. Leading to wrong validations.

This commit enforce UTF-8 encoding when opening the CLA's.
2018-03-14 11:07:55 +01:00
Christophe 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
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
0535f99616 [FIX] runbot_cla: avoid unicode errors when reading CLA files 2016-02-03 15:50:07 +01:00
Christophe Simonis
36c747d9b2 [IMP] runbot_cla: use https target url 2015-02-17 17:23:52 +01:00
Christophe Simonis
96ee611021 [FIX] runbot_cla: correct odoo email regex 2015-02-17 17:22:28 +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
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
a0f8d18586 [FIX] runbot cla fixes 2015-02-09 03:56:54 +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