Commit Graph

1343 Commits

Author SHA1 Message Date
Xavier-Do
8314dd080a wip 2022-11-29 10:47:05 +01:00
Xavier-Do
3664eabd90 [FIX] runbot: manage empty dbname 2022-11-28 14:38:05 +01:00
Christophe Monniez
2cad0542f4 [IMP] runbot: queue build logs in a local database
Before the commit the build ir_logging was sent from the build instance
to the main runbot ir.logging table. As the number of runbot hosts
increases, it introduce a lot of concurrency.
e.g.: 80 hosts with 8 builds means 640 instances trying to insert
records in the ir.logging table.

With this commit, a special database is used on the builder host in
order to receive ir.logging's from the build instances.

Regulary, the table is emptied by the builder and the logs are inserted
in the runbot leader ir.logging table.
2022-11-28 06:46:49 +01:00
Xavier-Do
66e37b9323 [FIX] runbot: renable blacklist 2022-11-25 10:41:52 +01:00
Xavier-Do
891d2d71e8 [IMP] runbot: add draft detection form titl 2022-11-24 16:24:42 +01:00
Christophe Monniez
3a9832d747 [IMP] runbot: add a close error wizard
When marking multiple build error as fixed, it's sometimes necessary to
explain why it was decided to close the error. When working with a few
errors, this can be done manually ... But most of the time we want to
close a lot of false negatives in batch.

With this commit, a simple wizard is made available that will post a
reason in the chatter of the build_errors.
2022-11-24 15:18:14 +01:00
Xavier-Do
1e8e059734 [FIX] fix codeowner 2022-11-24 15:17:53 +01:00
Xavier-Do
ff41311cb5 [FIX] runbot: add coverage access 2022-11-22 13:19:38 +01:00
Xavier-Do
c5e42b5529 [IMP] runbot: add missing fields 2022-11-22 13:19:38 +01:00
Xavier-Do
2b53455a9c [IMP] runbot: make ownership multi_edit 2022-11-22 10:34:24 +01:00
Xavier-Do
cd1360d716 [IMP] runbot: add search view 2022-11-22 10:12:48 +01:00
Xavier-Do
0ca706c56c [IMP] runbot: add team manager group 2022-11-22 09:34:29 +01:00
Xavier-Do
22abf95bca [FIX] runbot: ownership improvements
Tweaking the view to make it easier to use
2022-11-22 09:34:29 +01:00
Xavier-Do
f2d71a0b79 [FIX] runbot: fix pull info 2022-11-21 16:48:54 +01:00
Xavier-Do
2e77a55ddb [IMP] runbot: add codeowner management 2022-11-21 16:32:25 +01:00
Xavier-Do
410a01d13b [REF] runbot: move teams stuff 2022-11-21 16:32:25 +01:00
Xavier Morel
57162547e0 [FIX] runbot_merge: Odoo 15.0 + Py3.10 compat
Turns out I was running "15.0" except just on the runbot, enterprise
and community were still the 14.0 repos, so some of the changes were
missing.

While at it, bundle fixes for 3.10, as that's what Jammy needs, and
the mergebot/15.0 will be running on that.
2022-11-17 10:30:04 +01:00
Xavier-Do
2ca7a3de6e [FIX] runbot: trigger with no config fallback 2022-11-09 12:29:00 +01:00
Xavier-Do
f72c4a8baa [FIX] runbot: fix cleanup 2022-11-08 15:19:33 +01:00
Xavier-Do
e0856b2245 [IMP] runbot: improve build_error management
The build error view was unstructured and contains to much information.

This commit organize fields in groups and also validate some
modification on records in order to avoid build error manager to
disable test-tags by mistake.

An error cannot be deactivated if it appeared less than 24 hours ago to
avoid disabling a non forxardported pr that will fail the next nightly
generating another build error.

Test tags can only be added or removed by administrators.

Also adds a menu for easier User managerment

Also fixed the dname search and display.
2022-11-08 14:43:43 +01:00
Christophe Monniez
ac010405dc [FIX] runbot: use gethostname instead of getfqdn
At boot time, it appears that when the runbot tries to get its hostname
it may get a wrong fqdn.
2022-11-07 10:12:15 +01:00
Christophe Monniez
964a88cb36 [FIX] runbot: take number of builds from config data
Oversight from previous improvement in b79c4a5a52.
2022-11-07 10:12:15 +01:00
Christophe Monniez
04459cdda7 [FIX] runbot: proper line feed in default odoorc 2022-11-07 10:12:15 +01:00
Xavier Morel
1449937e00 [ADD] mergebot: support for coverage during tests
Runs the test instances of Odoo using `coverage` in parallel mode.

- useful for finding out under-tested parts of the code
- because it only instruments mergeport/forwardport, and the tests do
  so much IO, the wallclock performance impacts are minimal (~2%
  increase with branch coverage analysis, for an increase in CPU
  of ~20%, for the entire testsuite)
- for reporting, the scattered coverage reports need to be aggregated
  using `coverage combine`, followed by rendering with `coverage
  html`, these work out of the box, no parameterization is necessary
- coverage does not run on the test suite, only the modules under test
2022-10-27 11:25:25 +02:00
Xavier Morel
13f239826e [FIX] forwardport: avoid logging git error if there's no stream data
If no stream data was captured (no stderr and no stdout), would just
log

    git call error:

as error, with no further information.

Don't do that if we have neither stderr nor stdout data, since we're
re-raising the exception anyway, it's just confusing.
2022-10-26 14:47:00 +02:00
Xavier Morel
22c3406659 [FIX] forwardport: error reporting when git command fails
- if stderr was empty or had been redirected to stdout, no useful
  information would be show, making debugging more complicated
- the fallback is the error itself, but since it's reraised odds are
  pretty high the caller will eventually log the error itself, so
  it's redundant

=> fallback to stdout if stderr is empty, and only log if either is
non-empty
2022-10-26 14:47:00 +02:00
Xavier Morel
6281c86d5e [FIX] conftest: local webhook support
Not sure how I missed this but apparently pytest fixtures can't return
or yield, it's one or the other.

Which makes a lot of sense but means the tunnel fixture was broken
when using local webhooks (= no tunnel) as it returned the local url
rather than yield it.
2022-10-26 14:47:00 +02:00
Xavier ALT
fffc27d2fa [FIX] runbot: fix creation of new runbot.version from the backend
Traceback (most recent call last):
  File "/home/odoo/src/odoo/15.0/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/15.0/odoo/http.py", line 687, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/src/odoo/15.0/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/src/odoo/15.0/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/15.0/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/15.0/odoo/http.py", line 916, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/15.0/odoo/http.py", line 535, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/odoo/15.0/addons/web/controllers/main.py", line 1347, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/src/odoo/15.0/addons/web/controllers/main.py", line 1339, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/src/odoo/15.0/odoo/api.py", line 464, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/src/odoo/15.0/odoo/api.py", line 451, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/odoo/src/odoo/15.0/odoo/models.py", line 6489, in onchange
    snapshot1 = Snapshot(record, nametree)
  File "/home/odoo/src/odoo/15.0/odoo/models.py", line 6271, in __init__
    self.fetch(name)
  File "/home/odoo/src/odoo/15.0/odoo/models.py", line 6281, in fetch
    self[name] = record[name]
  File "/home/odoo/src/odoo/15.0/odoo/models.py", line 5888, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1054, in __get__
    self.recompute(record)
  File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1243, in recompute
    self.compute_value(recs)
  File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1265, in compute_value
    records._compute_field_value(self)
  File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4255, in _compute_field_value
    getattr(self, field.compute)()
  File "/home/odoo/runbot/extra/runbot/models/version.py", line 36, in _compute_version_number
    version.number = '.'.join([elem.zfill(2) for elem in re.sub(r'[^0-9\.]', '', version.name).split('.')])
  File "/usr/lib/python3.8/re.py", line 210, in sub
    return _compile(pattern, flags).sub(repl, string, count)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/15.0/odoo/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/15.0/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
TypeError: expected string or bytes-like object
2022-10-21 11:59:55 +02:00
Xavier ALT
1095b25270 [FIX] runbot: fix help msg, 'additionnal_env' is split on semi-column 2022-10-21 11:59:55 +02:00
Christophe Monniez
309aeaa32e [IMP] runbot: speedup build garbage collecting
When the builds directory is filled with a lot of build directories
(around 100000) the garbage collection process may take up to 2 minutes.
The root cause is that each build directory is scanned to clean it up
even if it was already cleaned.

With this commit, a stamp file is used to mark directories that were
already garbage collected.
2022-10-21 11:32:46 +02:00
Christophe Monniez
7642bffda3 [FIX] runbot: download phantomjs from nightly server
In order to avoid bitbucket rate limiting, we prefer to download this
old pal from our server.
2022-10-21 11:17:05 +02:00
Xavier-Do
903ee7d983 [FIX] runbot: manage falsy value for frontend_url 2022-10-21 10:39:20 +02:00
Xavier-Do
e27a1b8f71 [IMP] runbot: cleaup settings view 2022-10-21 10:32:40 +02:00
Xavier-Do
0287dcaab7 [IMP] runbot: update install documentation 2022-10-21 10:32:40 +02:00
Xavier-Do
303638e507 [FIX] runbot: don't hardcode user odoo 2022-10-21 10:32:40 +02:00
Xavier-Do
e4af8d7b6b [FIX] runbot: remove fqdn calls 2022-10-21 10:32:40 +02:00
Xavier-Do
785e2dc3bc [IMP] runbot: don't use local odoorc 2022-10-21 10:32:40 +02:00
Xavier-Do
bfc75cd7fe [IMP] runbot: don't active cron by default 2022-10-21 10:32:40 +02:00
Xavier-Do
50a7120949 [FIX] runbot: don't crash when there is no accessible project 2022-10-21 10:32:40 +02:00
Xavier-Do
16e71d064a [FIX] runbot: remove useless/invalid check 2022-10-21 10:32:40 +02:00
Xavier-Do
b79c4a5a52 [IMP] runbot: various build_config improvements 2022-10-21 10:32:40 +02:00
Xavier-Do
7bb2f06501 [IMP] runbot: make build_error button visible for users 2022-10-21 10:32:40 +02:00
Xavier-Do
b606a2199b [IMP] runbot: improve build error display in logs 2022-10-21 10:32:40 +02:00
Xavier-Do
831f5f7197 [IMP] runbot: make link to backend have the runbot menu 2022-10-21 10:32:40 +02:00
Xavier-Do
eaf8964701 [IMP] runbot: change trigger start logic
and add sequence on project
2022-10-21 10:32:40 +02:00
Xavier-Do
02eb8014a3 [IMP] runbot: make build_error triggers searchable 2022-10-21 10:32:40 +02:00
Xavier-Do
a294348cd0 [IMP] runbot: improve views 2022-10-21 10:32:40 +02:00
xmo-odoo
d72b17862e
[MERGE] from 15.0
Forward-port support for no tunnel.
2022-08-24 11:20:45 +02:00
xmo-odoo
d5095dac63
[MERGE] from 14.0
Forward-port support for no tunnel.
2022-08-24 11:19:41 +02:00
xmo-odoo
da14496e13
[IMP] conftest: support local webhooking
With dummy central now kinda sorta working, it makes sense to avoid going
through a tunnel for webhooks, especially as ngrok has lowered the number of
tunnels to 2 per agent for free accounts (or possibly fixed the bug which made
it not be enforced?)
2022-08-24 11:17:01 +02:00