Commit Graph

1879 Commits

Author SHA1 Message Date
Xavier-Do
77ba739836 [IMP] runbot: speedup parse_logs 2024-11-19 09:30:42 +01:00
Xavier-Do
34e18cf797 [FIX] runbt: runbot build error parse_log fixes 2024-11-19 09:30:42 +01:00
Christophe Monniez
c9e8e13606 [FIX] runbot: fix frontend team dashboards 2024-11-19 08:38:08 +01:00
William Braeckman
c2e9aaf387 [FIX] runbot: fix typo in server action 2024-11-14 12:05:10 +01:00
Christophe Monniez
9151c26232 [FIX] runbot: fix invalid field name 2024-11-14 09:33:44 +01:00
Christophe Monniez
2697a28e54 [IMP] runbot: allow override global docker registry on a host 2024-11-14 09:11:26 +01:00
Christophe Monniez
3197f75e45 [FIX] runbot: remove bulk update button from error content tree 2024-11-14 08:43:06 +01:00
Christophe Monniez
dc7eb66903 [IMP] runbot: add a display field to show error id in content tree 2024-11-14 08:43:06 +01:00
Christophe Monniez
b95256155c [IMP] runbot: add a default filter on build errors 2024-11-14 08:43:06 +01:00
Christophe Monniez
23be10f75b [IMP] runbot: add a search panel on build error list view 2024-11-14 08:43:06 +01:00
Christophe Monniez
90f114c730 [IMP] runbot: add a default filter on error content tree 2024-11-14 08:43:06 +01:00
Christophe Monniez
a6823f6d53 [FIX] runbot: adapt migration script
Fix a failure when a build error is not linked to any build. It happens
when a build error was merged into another.
2024-11-14 08:43:06 +01:00
Xavier-Do
56e242a660 [IMP] runbot: refactor build error models
The initial idea to link an error to another one was a quick solution
to group them if they where related, but this became challenging
to copute metada regarding errors.

- The displayed error message was not always consistent with the real
root cause/the error that lead here.
- The aggregates (lets says, linked buils ids) could be the one of the
error, or from all error messages. Same for the versions, first seen, ..
This is confusing to knwo what is the leist we are managing and what is
the expecte result to display

Main motivation:
on a standard error page (will be changed to "assignment"), we want to
have the list of error message that is related to this one. We want to
know for each message (a real build error) what is the version,
first seen, ...
This will give more flexibility on the display,

The assigned person/team/test-tags, ... are moved to this model
The appearance data remains on the build error but are aggregate on the
assignation.
2024-11-14 08:43:06 +01:00
Xavier-Do
d990b39258 [FIX] runbot: consider to_upgrade as to_upgrade_to 2024-11-12 14:01:05 +01:00
Christophe Monniez
7e01b711ad [IMP] runbot: add charset to content-type
This commit adds the utf-8 Content-Type to nginx response headers for
txt files. That way, the logs files can be properly viewed in browsers.
2024-11-12 12:14:40 +01:00
Christophe Monniez
5b70e91043 [IMP] runbot: add a searchpanel on bundle search 2024-11-12 12:14:12 +01:00
Xavier-Do
2b690de566 [IMP] runbot: allow to disable upgrade from a version 2024-11-12 08:33:14 +01:00
Christophe Monniez
ecd9681b65 [FIX] runbot: properly join log args
When a type error occurs when trying to format a message in a build log,
the suspicious are are joined with the message. But as the args may be a
tuple, an errors occurs when concatenating the message with the args
during the join.

With this commit, we ensure that the args are casted into a list.
2024-11-09 17:42:52 +01:00
William Braeckman
63dac316ab [FIX] runbot: remove console.log 2024-11-06 16:32:35 +01:00
William Braeckman
2fec54838e [IMP] runbot: add customer is me filter
As we try to assign ourselves as customer to build errors it is useful
to add a new filter to find errors on which we are the customer more
easily.
2024-10-22 09:25:53 +02:00
Christophe Monniez
dda0170a89 [FIX] runbot: avoid trying to push unexisting image
When an image is build for the first time and the build fails, an
ImageNotfound Exception is raised when trying to push the image.

Whith this commit, a warning is emmited instead of crashing in such a
case.
2024-10-10 09:16:56 +02:00
Christophe Monniez
a8b3d6e205 [FIX] runbot: avoid copying always_pull field
This commit will prevent people acting like cowboys to break the whole
system by duplicating a Dockerfile without disabling the always_pull
field.
2024-10-10 07:41:04 +02:00
Xavier-Do
ad87096436 [IMP] runbot: allow to skip requirements from trigger 2024-10-08 10:47:48 +02:00
Xavier-Do
f8f435d468 [FIX] runbot: remove record iteration in onchange
A recent task introduced a record loop using self inside.

It doesn't respect an api multi classic loop but it isn't an issue
since onchange are always called on a single record.

Removing the loop on all onchange to clean it up.
2024-09-25 10:37:09 +02:00
odoo
0b5d7d0566 [IMP] add customer on runbot build tasks
Idea is to help runbot/QA team to monitor other peoples tasks
easier. This way we will have a responsible person for each task
that someone else has assigned.
The goal of pr is two-fold:
1) We need to be able to better monitor the progress of tasks that
are not our own.
2) It introduces another metric with which we can measure individual
progress, and this can become main measuring metric for future non-technical
employees whose main goal will be making sure that none of the tasks become
rotten(not have any visible progress for months).
2024-09-19 08:20:14 +02:00
Christophe Monniez
3ae3f6dff3 [IMP] runbot: pull docker image only when needed
When a lot of Docker images are updated at the same time, all runbot
hosts will try to pull them at the same moment.

With this commit, only the images marked as `always_pull` will be pulled
and if one of them takes too much time to be pulled, we let the host
make another loop turn before continuing the images pull.

Finally, if a host uses the Docker registry, it will pull the remote
image when running a step, that way the image will be pulled
automatically if needed.
2024-09-13 11:57:07 +02:00
Xavier-Do
b60d54d4ea [FIX] runbot: fix image build failure 2024-09-12 13:08:00 +02:00
Xavier-Do
b96b32e8b9 [IMP] runbot: better docker logging
The docker operation are called often and cannot be logged each time.
If a docker operation is slow, we log it at the end but waiting for this
output we have no idea what the process is doing.

This pr proposed to go a lower level and get the stream from the docker
operation to be able to log earlier if we started a potentially slow
operation.
2024-09-11 13:16:13 +02:00
Xavier-Do
14bac37438 [IMP] runbot: small change of docker_build api
returns now a dict instead of a tuple for easier extension
2024-09-11 13:16:13 +02:00
Christophe Monniez
e4b04a42d1 [FIX] runbot: remove leftover tuple in markdown log 2024-09-09 08:07:42 +02:00
Christophe Monniez
33452d27e7 [IMP] runbot: add the possibility to disable a test per version
When disabling tests on runbot by using the test_tags on a build error,
the tests are disabled on every tested version. This can be annoying
when a test only fails from one version up to another.

With this commit, a min and max version can be specified on a
build_error when the test_tags field is used.
If the min and max are not used, the test will be disabled cross
versions.
2024-09-06 11:09:40 +02:00
Xavier-Do
dff50b49c4 [IMP] runbot: Improve stats listing display
Sort trigger and group them by category, better selection of categories
to display on stats page
2024-09-06 09:57:45 +02:00
Christophe Monniez
bc5e7fe69c [IMP] runbot: bump chrome version to 126.0.6478.182 2024-09-05 15:34:31 +02:00
Xavier-Do
21d6c84b26 [FIX] runbot: fix markdown adding escape
A common error on runbot is to generate link containing a __init__.py
file

[/some/path/to/__init__.py](/some/path/to/__init__.py)

This would be rendered as

<a href="/some/path/to/<ins>init<ins>.py">/some/path/to/<ins>init<ins>.py</a>

Breaking the link, and the display of the name

By default markdown will not render links avoiding this issue, but it
will remain for the content of the a, needing to manage some kind of
escaping.

The way to escape markdown is to add a \ before any special character
This must be done upront before formating, adding the method
markdown_escape

Our implementation of markdown is not meant to meet the exact
specification of markdown but better suit our needs. One of the
requirements is to be able to use it to format message easily but adding
dynamic countent comming from the outside. One of the error than can
occur is also

'Some code `%s`' % code can also cause problem if code contains `

This issue could be solved using indented code block, but this would
need to complexify the generated string, have a dedicated method to
escape the code blocs, ...

Since we have the controll on the input, we can easily sanitize all
ynamic content to avoid such issues. For code block we introduce a way
to escape backtick (\`). It is non standard but will be easier to use.

Combine with that, the build._log method now allows to add args with the
values to format the string (similar to logging) but will escape
params by default. (cr.execute spirit)

name = '__init__.py'
url = 'path/to/__init__.py'
code = '# comment `for` something'
build._log('f', 'Some message [%s](%s) \n `%s`', name, url, code)

name, url and code will be escaped
2024-09-05 15:33:41 +02:00
Xavier-Do
2fd7f47e49 [IMP] runbot: make stats when build timeout
The stats are only kept when the build finishes, this makes sence to
avoid collecting stats of a manually killed build (or because of newer
build found), but the stats mays be interresting when the build timeouts.

Adding a manual collection of stats in this case.
2024-09-05 14:24:41 +02:00
Xavier-Do
bc8c2a4853 [IMP] runbot: faster fetch
Use 2 jobs to fetch multiple origin at the same time.
2024-09-05 14:20:06 +02:00
Xavier-Do
7411bd5755 [FIX] runbot: allow - in database name
The underscore was previously used in database name, but this is not a
valid character for certificates (still need some investigation about
the limitations)

If it worked to access it it was causing issues for IOT andother.
_ is forbidden on saas actually.

The design_theme database was changed to design-theme, but this is not
accessible through the nginx condig. This should solve the issue.
2024-09-03 10:54:54 +02:00
Xavier-Do
9660cf6517 [IMP] runbot: bundle with all pr closed 2024-08-29 15:03:45 +02:00
Xavier-Do
faef017a25 [FIX] runbot: local cleanup 2024-08-29 08:44:57 +02:00
Christophe Monniez
d722160247 [IMP] drunbot: docker registry
The current runbot infrastructure has 100+ machine that will each build
all docker images.

This is unpractical for multiple reasons:
- impotant load on all machine when the build could be done once
- possible differences for the same image depending on the moment the
base was pulled on the host. An extreme example was the version of
python (3.11 or 3.12) when building the noble docker image before it was
stabilized.
- increase the chance to have a docker build failure in case of network
problem. (random)

A centralized registry will help with that, and allow future devlopment
to generate more docker images. All docker images will be exactly the
same, the pull time is faster than build time, only one build per docker
image, ...
2024-08-29 08:44:57 +02:00
Christophe Monniez
4a2c9d7491 [FIX] runbot: remove useless fields in test 2024-08-28 10:23:29 +02:00
Christophe Monniez
8ac21fb60b [IMP] runbot: allow to archive dockerfile 2024-08-28 10:23:08 +02:00
Christophe Monniez
5fb0e2f5ab [FIX] runbot: avoid builder crash when no docker to build
When there is no Dockerfile marked as `to_build`, the runbot builder
crashes in loop trying to find the max of an empty sequence.

With this commit, the builder does not even try to build Dockerfile in
that case.
2024-08-26 11:04:54 +02:00
Xavier Morel
ccca46c992 [FIX] runbot_merge: layout backend issues galore
- Odoo 17 seems to not be adjusting `nolabel` fields to be `colspan=2`
  by default, so every such occurrence has to be adjusted by hand or
  it gets squeezed in just the labels column.
- Because of the loss of readonly mode, some fields / setups which
  previously looked ugly during the rare edition (e.g. Pr titles) now
  look ugly all the time. Rework layout and force them to always be
  readonly (hopefully we won't need to edit those).
- This is compounded by unfortunate styling I can't find how to
  override e.g. char fields are 100% width even if readonly.
- `<header>` system requires some workarounds to have the right layout
  and spacing (notably `header` has a bunch of awful rules which we
  need to work around via an interstitial div to set up our own
  flexbox).
2024-08-16 15:12:04 +02:00
Xavier Morel
0d653620c2 [FIX] *: styling
- reduce font-size and bold-ness a hair as it causes issues in the
  backend
- remove font adjustment on root object
- add `text-bg-primary` in the oustanding FP view, apparently BS5 does
  not do anything like that by default when setting `bg-primary` for
  some reason so the current team or user appears in black on dark
  blue leading to sub-par readability
2024-08-16 14:20:39 +02:00
Xavier Morel
7eb25234f5 [FIX] runbot_merge: menus
Turns out having the same ids for the feedback template and feedback
object actions was kinda dumb, who'd have thought?

Split them apart so I can get both objects in my menu...
2024-08-16 14:19:13 +02:00
Xavier Morel
8ad186c204 [FIX] runbot_merge: styling on Odoo 17
Fix a few issues with migrated bootstrap classes (left -> start, right
-> end), revert a bunch of shitty colors from standard, fixup
backgrounds.

Tried to remove the background overrides what with having used
variables but it does completely wrong for info, and I can't be
arsed (also force primary alerts for the same reason, I don't
understand what either bootstrap or standard does and how to override
it properly but it's shit). It'll keep.
2024-08-13 14:39:09 +02:00
Xavier Morel
99ae369d69 [FIX] runbot_merge: update freeze wizard widget for 17.0
It was all borken and the web client couldn't even load.

The logic is basically the same, except the new client doesn't support
forcing onchanges maybe, so we need to `read()` the entire thing if
the form is not modified.
2024-08-13 12:50:13 +02:00
Xavier Morel
36786d51c8 [ADD] runbot_merge: 17.0 migration
`message_main_attachment_id` removed from `mail.thread` in
odoo/odoo@f8c7f2e5bb (16.2), however
precise inheritance tracking was only added in
odoo/odoo@b27eb20a41 (17.1), so
stock migration only handles stock models for this migration.
2024-08-13 08:00:21 +02:00
Xavier Morel
aa1df22657 [MERGE] bot from 16.0 to 17.0
Broken (can't run odoo at all):

- In Odoo 17.0, the `pre_init_hook` takes an env, not a cursor, update
  `_check_citext`.
- Odoo 17.0 rejects `@attrs` and doesn't say where they are or how to
  update them, fun, hunt down `attrs={'invisible': ...` and try to fix
  them.
- Odoo 17.0 warns on non-multi creates, update them, most were very
  reasonable, one very wasn't.

Test failures:

- Odoo 17.0 deprecates `name_get` and doesn't use it as a *source*
  anymore, replace overrides by overrides to `_compute_display_name`.
- Multiple tracking changes:
  - `_track_set_author` takes a `Partner` not an id.
  - `_message_compute_author` still requires overriding in order to
    handle record creation, which in standard doesn't support author
    overriding.
  - `mail.tracking.value.field_type` has been removed, the field type
    now needs to be retrieved from the `field_id`.
  - Some tracking ordering have changed and require adjusting a few
    tests.

Also added a few flushes before SQL queries which are not (obviously
at least) at the start of a cron or controller, no test failure
observed but better safe than sorry (probably).
2024-08-12 13:13:03 +02:00