Commit Graph

187 Commits

Author SHA1 Message Date
William Braeckman
44a1956ff5 [IMP] runbot: add host filter on load_info
Makes it possible to filter on host on the load_info view.
Monitoring was also adapted to have links to filtered load_info page.
2025-02-26 10:53:12 +01:00
Xavier-Do
34a92ac0cb [FIX] runbot: adapt upgrade test 2025-02-26 10:14:10 +01:00
Xavier-Do
f18e6c7591 [IMP] runbot: allow to use base commit on new batch 2025-02-21 10:52:56 +01:00
Xavier-Do
48cd3a7f40 [IMP] runbot: fetch fields on build instead of params
The corresponding fields are stored on the build,
no need to read the params.
2025-02-20 08:05:41 +01:00
Xavier-Do
d0eaa85574 [IMP] runbot: faster main page
Looks like bu.database_ids[1:].sorted('name') was breaking the prefech
set leading to one query per build. Fiwing it by sorting without slicing
the ignoring the first record.

~230 ms improvement over 1.7 second
2025-02-20 08:05:41 +01:00
Xavier-Do
415bd311cf [IMP] cleaner reference builds display 2025-02-20 08:05:41 +01:00
William Braeckman
6bd7a30130 [IMP] runbot: fix display error in bundle toolbar
- Add dropdown-toggle to the github tool button so that it doesn't
  appear as if a button should be following it.
- Add default btn classes to category icons, the button would otherwise
  be displayed as just an icon.
- Add a gap between the two toolbars.
- Add d-empty-none in case we have no category to display to remove the
  useless gap.
2025-01-15 14:21:39 +01:00
William Braeckman
e49c583b5b [FIX] runbot: replace target new with _blank
`target="new"` had the very confusing behavior of updating the same tab
within the same browser context (tab).
The commit replaces all `target="new"` occurences with `target="_blank"`
within the runbot templates.

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target
2025-01-03 11:23:58 +01:00
William Braeckman
a7d09ddb5e [FIX] runbot: fix frontend urls to backend
Urls are broken after 18.0 upgrade
2024-12-11 14:27:38 +01:00
William Braeckman
03c0a5143e [FIX] runbot: replace old BS4 class with BS5
text-left -> text-start
remove data-toggle css rules
font-italic -> fst-italic
2024-12-11 14:27:38 +01:00
William Braeckman
28ce031886 [REF] runbot: replace t-esc with t-out
t-esc has been deprecated and uses redirects to t-out anyways, removing
since in dev mode it logs a warning in the terminal.

See odoo/odoo#81024
2024-12-11 14:27:38 +01:00
xdo
01e7676cb6 [FIX] runbot: revert some upgrade_code errors
Co-authored-by: William Braeckman (wbr) <wbr@odoo.com>
2024-12-11 14:27:38 +01:00
Xavier-Do
d30856107c [IMP] runbot: apply upgrade code 2024-12-11 14:27:38 +01:00
Xavier-Do
03a20398a1 [IMP] runbot: add forwarded for headers 2024-12-04 10:18:43 +01:00
William Braeckman
075e6a99b0 [FIX] runbot: remove dead code
The template part was not reached only in certain cases and regardless
the empty collapse toggle has not been visible for a while..
As handling subbuild error logs adds unnecessary load when rendering the
page anyways (most people will not display the subbuild errors
regardless if the collapse is showing or not), we decided to remove it
completely.
2024-11-29 09:31:17 +01:00
William Braeckman
85e6b7a312 [REF] runbot: stop using link type ir.logging
Stop using the special $$icon$$ syntax when logging the download url for
the database dump.
2024-11-28 16:25:11 +01:00
William Braeckman
7b2ca7b919 [IMP] runbot: show state in favicon
Until now the favicon was handled by the `/favicon.ico` route made
available by `website`.

This commit adds the different favicons and logic to be able to display
the state of the current page through it.
2024-11-28 14:22:25 +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
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
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
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
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
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
Xavier-Do
d2872f8e16 [IMP] runbot: rework dockerfile generation 2024-08-08 15:11:34 +02:00
Xavier-Do
e5ad7c6242 [IMP] runbot: store docker build output in a dedicated model
When a docker fails to build, the output is logged in the chatter
leading to a lot of noise and a not so readable output. Moreover, the
output tries to format markdown and don't render line break correctly.

This commit proposes to introduce a model to store this output, as well
as some other info like the image identifier, build time, ...

This will help to compare images versions between hosts and should be
useful later to have multiple version of the same image with variant
once the docker registry is introduced.
2024-08-08 15:11:34 +02:00
Xavier-Do
5c537f822a [IMP] runbot: add a friendly colorblindness theme
The runbot colors can lack contrast in some case, especially for
colorblinded people.

This commit introduces a theme that should help a little.
Note that this was done without much analysis and should be tweaked in
the future.
2024-07-26 10:53:49 +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
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
e7d1cc9c57 [FIX] runbot: small fix following BS 5.3 2024-04-23 11:53:46 +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
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
0fc1daeac9 [IMP] runbot: enable user to toggle no_build 2024-04-10 16:23:50 +02:00
Xavier-Do
9c4983f5b7 [IMP] runbot: always display autorebase for external pr 2024-04-02 08:33:36 -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
60dbbcb72e [IMP] runbot: add total load time on builds 2024-02-19 10:12:28 +01:00
Xavier-Do
2fa5a6aee7 [IMP] runbot: add has_pr filter 2024-02-09 16:32:25 +01:00
Christophe Monniez
d2bb42264e [IMP] runbot: give more information about known errors 2024-01-24 13:02:22 -01:00
Christophe Monniez
05d072d6eb [IMP] runbot: add a frontend button to view batch in backend 2024-01-24 13:02:22 -01:00
Christophe Monniez
c322458c5b [IMP] runbot: add a frontend btn to parse a single log 2024-01-24 13:02:22 -01:00
Christophe Monniez
6030988560 [IMP] runbot: allow to filter team errors by trigger 2024-01-24 08:54:39 -01:00
Xavier-Do
3f260ba08f [FIX] runbot: wakeup child without parent db
A check was add to avoid to wakeup a child if there is a parent database
Most of the time, it was a mistake.

In some case it can be legit, if the parent only creates subbuid without
installing any database.
This commit fixes that by allowing to wake up child if the parent has no
database.
2023-12-15 10:41:21 +01:00