Commit Graph

1614 Commits

Author SHA1 Message Date
Xavier-Do
6fca88afa8 [IMP] allow to add single version in foreign trigger dependencies 2024-06-04 13:31:06 +02:00
Christophe Monniez
eded56a4ef [FIX] runbot: adapt docker template for debian control
The Debian control file was changed in odoo/odoo@55849aca in order to
work with Ubuntu Noble. Because of that, it was needed to have a more
robust parsing of the Debian Control file format.
2024-06-04 08:53:18 +02:00
Xavier-Do
8722aba511 [FIX] runbot: report access error on view 2024-05-16 10:04:54 +02:00
Xavier-Do
2a49ac4f8c [FIX] runbot: no result for subcommand 2024-05-15 12:11:24 +02:00
Xavier-Do
d5114c0062 [IMP] runbot: improve make_result
The "Error or traceback found in logs" message is sometimes confusing
since we don't know what is the cause of the issue.

The first idea is to split the two concept, error and traceback to have
a better idea of the cause of the issue

The second one will also log the content of the line in the error
message. For traceback, tries to get the complete traceback, getting all
indentend lines and one last non idented one.

While working on it, cleaning slighty to partially get rid of
returning a dict, artefact from odoo < 13.0
2024-05-14 16:21:15 +02:00
Xavier-Do
507f4e37e3 [IMP] runbot: custom trigger view
Somme trigger may have an important depth and nightly result can be long
to check.

A custom view was already done for upgrade nightly, but this is hidden
and the same logic could be applied to the distro builds, ...

This commit adds a custom view on the trigger and related controller to
display a custom view for a trigger.
2024-05-14 15:26:24 +02:00
Xavier-Do
2a18cd7f3d [FIX] *: remove invalid escape sequences 2024-04-30 16:05:21 +02:00
Xavier-Do
e7d1cc9c57 [FIX] runbot: small fix following BS 5.3 2024-04-23 11:53:46 +02:00
Xavier-Do
816af5a058 [IMP] runbot: better log listing
The current logic to define if a build has logs or not is based on
is_docker_step. This related logic is not always valid, since it is
based on step type and step content, but there are many way to have a
result that could be a docker start, one of them being to call another
step. The main issue is that we don't always now if this other step is a
docker step or not before runtime. Moreover the logic becamore more and
more complex adding more conditions like commands, _run_, docker_params,
...

Moreover, the log list is completed before the build start, meaning that
if the build is killed before completion, some logs may be missing but
will be listed. This is also an issue when trying to access logs before
the correspondong step ran.

This commit changes the logic by adding the log file to the list (and
start log) when starting a docker, wich should give a more consistent
result.
2024-04-23 10:17:34 +02:00
Xavier-Do
a3c85d87d0 [IMP] runbot: improve log message layout 2024-04-23 10:08:54 +02:00
Xavier-Do
c577b72a66 [IMP] runbot: rework preference menu 2024-04-23 10:08:54 +02:00
Xavier-Do
2c5f129969 [IMP] runbot: add dark theme 2024-04-23 10:08:54 +02:00
Xavier-Do
6bafea7c36 [IMP] runbot: adapt to bootstrap 5.3
The bootstrap version was freezed during a previous migration to avoid
loosing to much time adapting the style again to fit the previous
look and feel.

Anyway, the  latest version of bootsrap offers more flexibility about
themes, and it could be a good oportunity to modernise a little the
runbot interface and answer to long lasting requests.

The main part of the adaptation is to tweak colors to match the
previous style, and adapt some class in xml views.

Some css rules are also tweaked to keep the same looks without the need
to rewrite xml views too much, this could be done in a future commit.
2024-04-23 10:08:54 +02:00
Xavier-Do
0eae784a1e [FIX] runbot: don't kill build if build may be used.
The current stratey to check if a build can be killed is to ensure that
no slot unskipped slots points to the same build. Since the check is
only done after a prepare, it should ensure that the new slot have the
build linked before checking if the previous batch can kill it's build.
Since the slot are now filled latter on (after the minimal check) it is
possible that a build is considered killable an killed before being
linked again.

To fix this, we just need to consier params instead of builds to define
if a build is killable or not. If the params of a builds are linked
elsewere, don't kill them.
2024-04-17 16:21:21 +02:00
Xavier-Do
e241f03321 [FIX] runbot: only start triggers based on alive branches 2024-04-17 14:28:53 +02:00
Xavier-Do
9eb7f0d577 [IMP] runbot: add trigger cross dependency 2024-04-16 11:09:50 +02:00
Xavier-Do
86b88d86c8 [FIX] runbot: adapt tests 2024-04-16 08:39:51 +02:00
Xavier-Do
7277d402fb [FIX] runbot: fix typo in view 2024-04-15 23:10:27 +02:00
Xavier-Do
7bc26219c2 [FIX] runbot: add missing tree hash
Previous commit introduced commit tree hash, but only when calling
get_commit_infos. This fixes the get_ref and find_new_commit to have
the same infos.
2024-04-15 16:44:44 +02:00
Xavier-Do
c70aa57acb [FIX] runbot: incorrect label 2024-04-15 14:57:06 +02:00
Xavier-Do
c067384b8b [IMP] runbot: add tree hash to views 2024-04-15 14:41:02 +02:00
Xavier-Do
e521149d93 [IMP] runbot: add container_cpus to step views 2024-04-15 14:32:54 +02:00
Xavier-Do
83acc43a05 [IMP] runbot: save reference batches on base batches 2024-04-15 11:42:28 +02:00
Xavier-Do
c9e14a86ca [IMP] runbot: propagate batch to reference builds decision 2024-04-15 11:42:28 +02:00
Xavier-Do
082ecaafe9 [IMP] runbot: add tree hash info to commit
Right now the commit is considered as a part of the build uniquifier.

If it makes sence for a check on the commit metadata, it is not the case
for execution tests where only the content matters.

This will allow to mark a trigger as non depending on commit but tree
hash, and avoid rebuild when only fixing a commit message.
2024-04-15 10:53:48 +02:00
Xavier-Do
f191e8cc48 [IMP] runbot: optionnal container_name in python steps 2024-04-15 10:44:32 +02:00
Xavier-Do
7e848b8073 [FIX] runbot: fix stats.js 2024-04-15 10:35:20 +02:00
Xavier-Do
9ef850220b [IMP] runbot: add a way to add custom pre/post
Mainly usefull for custom triggers
2024-04-15 10:08:56 +02:00
Christophe Monniez
412baa3fad [REF] runbot: centralize cpu_limit in _run_step
In order to keep it coherent, the cpu_limit computation can be done in
one place instead of defining it in all _run* methods.

In python steps, it can still be overridden when returning
docker_params.
2024-04-15 10:06:28 +02:00
Christophe Monniez
d0a96faf84 [IMP] runbot: add cpus parameter
When build eats all the CPU's resources, it may interfere with other
builds and cause collateral damages.

With this commit, a new settings parameter `Containers CPUs` is added in
order to limit the usage of available CPU's on runbot instances.

If left to 0, no limts are applied.

Otherwise, the cpu_quota docker parameter is computed as Containers
CPU's * (logical cpu's count / nb parallel builds) * cpu period which defaults to 100000.

e.g.:
- on a host with 16 logical CPU's
- with 8 parallel builds allowed
- with Containers CPUs set to 1.5
- with the default cpu_period
cpu_quota will be:
    (16/8) * 1.5 * 100000 = 300000

This system parameter can be overridden by the `container_cpus` field on
steps.
2024-04-15 10:06:28 +02:00
Xavier-Do
0fc1daeac9 [IMP] runbot: enable user to toggle no_build 2024-04-10 16:23:50 +02:00
Xavier-Do
70f4fe23a5 [IMP] runbot: alow autorebase for external pr 2024-04-02 11:57:47 +02:00
Xavier-Do
9c4983f5b7 [IMP] runbot: always display autorebase for external pr 2024-04-02 08:33:36 -01:00
Xavier-Do
70532df2d6 [FIX] runbot: fix build error unlink 2024-03-20 09:50:03 +01:00
Xavier-Do
fd7f49aff8 [FIX] runbot: fix staging creation 2024-03-20 09:47:51 +01:00
Xavier-Do
a00fa04e07 [FIX] runbot: remove first db before ordering 2024-02-23 17:09:08 +01:00
Xavier-Do
9fa53d6581 [FIX] runbot: fix stats page following 17.0 upgrade
Some issue where remaining regarding stats click events and scales.
2024-02-23 11:10:39 +01:00
Xavier-Do
2ba3238a34 [FIX] runbot: fix repo.modules is False case 2024-02-21 11:04:25 +01:00
Christophe Monniez
f26065c4dc [FIX] runbot: append a tuple in git gc command list 2024-02-21 07:57:18 +01:00
Xavier-Do
d661fd9fb4 [IMP] runbot: allow to hide project 2024-02-20 16:48:51 +01:00
Xavier-Do
c18bbecf37 [IMP] runbot: allow to customize repo filters from
When using a repo as a dependency for another trigger, the default
module filter for a repo is not always ideal

As an example, when using odoo as a dependency for another repo,
we may only want to install the module from the new repo.

This iss done right now by creating a custom config but this lead to
duplicates config and steps only to customize the module to install.

This commit proposes a new model to store the filters.

Note that this may be used later as module blacklist on repo too.
2024-02-20 16:48:51 +01:00
Christophe Monniez
f032428346 [FIX] runbot: use markup to post message on build errors 2024-02-20 10:22:35 -01:00
Xavier-Do
f7a1a6a11d [IMP] runbot: avoid long idle transaction
Git gc can last a few minutes, it's not a big deal since it's executed
once a day but the transaction is kept idele during this time wich is
not useful. This commit should help to avoid this.
2024-02-19 10:30:33 +01:00
Xavier-Do
60dbbcb72e [IMP] runbot: add total load time on builds 2024-02-19 10:12:28 +01:00
Xavier-Do
336e9525d5 [FIX] runbot: fix check token 2024-02-19 09:59:41 +01:00
Xavier-Do
9cf7a25cca [FIX] runbot: fix params view 2024-02-19 09:59:41 +01:00
Xavier-Do
ecfdb5693d [FIX] runbot: branch computation 2024-02-10 10:17:44 +01:00
Xavier-Do
2fa5a6aee7 [IMP] runbot: add has_pr filter 2024-02-09 16:32:25 +01:00
Xavier-Do
a0dd2fa560 [FIX] runbot: fix search limit 2024-02-09 16:32:25 +01:00
Xavier-Do
a7f6a9b157 [IMP] runbot: allow bundle access per name 2024-02-09 16:32:25 +01:00