Commit Graph

1549 Commits

Author SHA1 Message Date
Christophe Monniez
ab194610b0 [IMP] runbot: improve bundle backend page
With this commit trigger customization, branches and last batches are
put in tabs. That way, trigger customization are quickly accessible.
2023-06-30 10:57:01 +02:00
Christophe Monniez
6c41fbd8ae [FIX] runbot: fix build error form disposition
- Base info span over two columns
- Proper fixing info groups
2023-06-30 10:57:01 +02:00
Christophe Monniez
6ed23db655 [FIX] runbot: open frontend url's in a new tab by default 2023-06-30 10:57:01 +02:00
Christophe Monniez
3c8f821695 [IMP] runbot: unify build error wizards
There are two wizards for the runbot build errors:
- One to close an error with a reason
- One to update the team/user or PR

With this commit, the two wizards are merged into one wizard that helps
to update errors in bulk.

Also, a button is added in the list view that allow to save a mouse
click.

The `NEW` button is removed from the tree view as it should not be of
any use.
2023-06-30 10:57:01 +02:00
Christophe Monniez
1cc73a606d [IMP] runbot: allow only advanced users to wake up a child
As it happens that some users are waking up child builds, let's only
allow advanced users to do that.
2023-06-30 10:57:01 +02:00
Christophe Monniez
503afda3b6 [IMP] runbot: add a monthly filter on build errors 2023-06-30 10:57:01 +02:00
Christophe Monniez
041c4f242f [FIX] runbot: allow PR link only when it exists 2023-06-30 10:57:01 +02:00
Xavier-Do
506ff03e07 [IMP] runbot: pause, and profile.
Pausing a host can be usefull in some case, mainly when testing new code
The loop will have no effect avoiding to break some build wainting for
testing.

Profile will help to identify potential performance flows during the
loop.
2023-06-30 10:54:50 +02:00
Christophe Monniez
2b95e0dc01 [FIX] runbot: remove search_count hack
Since odoo/odoo@a01e8b5232 this hack should not be necessary anymore.
2023-06-30 10:37:28 +02:00
Xavier-Do
cd8cc1f77f [FIX] runbot: fix onchange 2023-06-27 14:42:00 +02:00
Xavier-Do
2a003f00de [FIX] runbot: fix dump_db 2023-06-27 14:28:08 +02:00
xdo
24d35988a4
[IMP] runbot: add auto restore for custom trigger (#784)
One of the most common custom trigger is to restore a build before
starting some test, either to create a multibuild or make the execution
and debug of some test faster.

It is somethimes tedious to use because we need to give an url of a
build to restore. This build must correspond to the right commits,
must still exixt, ... this means that the dump url must be adapted
everytime a branch is rebased.

The way the dump_url is defined is by going on the last batch, following
the link to the `base_reference_batch_id`, finding a slot corresponding
to the right repo set, (ex: Custom enterprise -> enterprise), and
copying the dump_url in this build.

The base_reference_batch_id is eay to automated but we have to find the
right trigger, this is now a parameter of the custom trigger wizard.
There are actually 2 strategy now to define how to download the dump:
- `url`, using `restore_ dump_url`
- `auto`,  using `restore_trigger_id` and `restore_database_suffix`

To ease the setup, a `restore_trigger_id` is added on a trigger, so that
when selecting a trigger, lets say `Custom enterprise`, the defined
`trigger.restore_trigger_id` is automatically chosen for the
`custom_trigger.restore_trigger_id` and the `restore_mode` is setted to
auto.

Two actions are also added to the header of a bundle, a shorcut to
setup a multi build (restore in children) or a restore and test build
(restore in parent).
2023-06-27 14:13:12 +02:00
Xavier-Do
465081e9f3 [FIX] runbot: fix jsonb in list view
In view list widget are not always instanciated and a formater is used
instead. This means that the t-esc will try to output a jsonb field
without nowing how to render it, making the page crash.

This is quickly fixed by forcing the widget on the field in tree view.
2023-06-26 13:36:20 +02:00
Xavier-Do
96808acb37 [IMP] runbot: diffable tracking in chatter
The python steps can be long and interresting to track but the change is
actually hard to see since a block of code is logged instead of the diff.

Also, the whitespaces are not preserverd since we are note in a <pre>
block making it hard to read.

This proposes an alternative to display python code tracking values as
a diff with options to copu the raw content of the old and new version.
(as well as showing unchanged lines or not)
2023-06-26 13:11:00 +02:00
Xavier-Do
727d71d103 [IMP] runbot: add an action to check token 2023-06-22 16:43:05 +02:00
Xavier-Do
f82478576d [FIX] runbot: fix bundle view 2023-06-22 16:35:19 +02:00
Christophe Monniez
37babcd526 [FIX] runbot: remove chatter widgets
Since odoo/odoo@3fea5b2136 the widgets specifications in the chatter are
not necessary anymore.
2023-06-22 16:30:03 +02:00
Christophe Monniez
7e92aaeae2 [FIX] runbot: chatter must be after sheet
The `oe_chatter` div must be defined after a sheet, otherwise two
chatters are visible on the form. One bellow and one on the right side.
2023-06-22 16:30:03 +02:00
Xavier-Do
ebb531f4a4 [FIX] runbot: adapt for 16.0 2023-06-22 14:27:32 +02:00
Xavier-Do
6107c0aefb [FIX] runbot: adapt widgets to owl
This is a first quick version to keep main functionalities, this will
need to be adapt and clean later.
2023-06-22 11:15:16 +02:00
Xavier-Do
70c468f821 [FIX] fix invalid t-att 2023-06-21 15:47:54 +02:00
Xavier-Do
614040720b [IMP] runbot: add useful indexes remaining from upgrade 2023-06-21 10:08:14 +02:00
Xavier-Do
8d724b157f [FIX] runbot: adapt frontend to 16.0
A first step to get more independant from web and website was done in
15.0 but some file were moved and it looks like the bootstrap version
changed breaking the frontend again. (4.3->5.1)

This commit simply copies the libs from odoo/15.0 to avoid losing time
fixing the frontend look and feel for the new bootstrap version for now.

A future refactoring could change the vendored version to addapt to 5.1
while modernizing the frontend style.
2023-06-20 14:15:26 +02:00
Xavier-Do
45104b635f [REL] adapt for 16.0 2023-06-20 12:34:32 +02:00
Xavier-Do
d3f998f88c [IMP] runbot: keep log create_date 2023-06-20 09:18:48 +02:00
Xavier-Do
a80dc25699 [FIX] runbot: only top parent is marked killable 2023-06-14 10:30:02 +02:00
Xavier-Do
9cf750119d [IMP] runbot: make search case insensitive 2023-06-02 17:11:54 +02:00
Xavier-Do
03667b703c [IMP] runbot: fallback on python step for upgrade step 2023-06-02 14:44:48 +02:00
Xavier-Do
ad4131789c [FIX] runbot: fix false positive message 2023-06-02 11:10:51 +02:00
Xavier-Do
7845a718b7 [IMP] runbot: add use_ssl to settings 2023-06-02 10:49:05 +02:00
Martin Trigaux
8153fdc4b2 [FIX] runbot: download over https
Firefox blocks downloads from http link if you are on an https page
Allow to deactivate via an ICP in case the runbot is configured over
HTTP (you shouldn't really)
2023-06-02 10:49:05 +02:00
Christophe Monniez
236554b588 [FIX] runbot: catch exceptions during db drop
When the runbot tries to drop a local database, if the that raises an
exception, it goes in a loop failure. It mays happen for example if
someone forgot to close a psql during an investigation :-)

With this commit, the exceptions are catched and at least the database
name is logged.
2023-06-01 16:16:06 +02:00
Xavier-Do
7523dc8000 [FIX] runbot: fix dockerfile choice order
Since all versions will have a defined dockerfile, the project one
will alway be ignored. The idea here is that for a project, we may
definea default dockerfile_id so that we don't have to set it on all
bundle to make it work.
2023-06-01 16:13:40 +02:00
Xavier-Do
db38794f9a [FIX] runbot: avoid sending sattus on running kill
The _kill method was called in multiple case, usually when something
wrong happen:
- exception initiating pending
- kill requested manually
- testing time exceeded
- exception running a job
- ...

But it will also be called when killing a running build.

It was usually not an issue since the status remains the same, but it is
not true if the same commit is used in two build, the new one is green,
the old one is red (enterprise commit remaining the same but community
commit changed as an example)

In this situation, the enterprise commit may receive the red ci from the
old build while the last one is green.

Since with the last version, the github status responsibility is left to
write method, this github status is not useful anymore, updating the
state and result is enough.

This commit also removes the commit since it is not always a god idea.
Most of the time the transaction will be comited quite fast after that
with the new scheduler.

Note that checking in github status if no status has a more recent build
may be a good idea. Only the most recent build using a commit could
sending a status? This would not alway be helpful Imagine a commit used
in 2 branches by mistake, the last build is not always the one we want
(usually fixed by rebuilding a subbuild of the good build)
2023-06-01 15:40:16 +02:00
Xavier-Do
64d3c59ed9 [FIX] runbot: limit max log size
In some case, a build can add a lot of info in a log, there
is already a limit to the number of entry but not to the size of an
entry. This will limit the database usage in case of mistake/abuse.
2023-06-01 15:33:47 +02:00
Xavier-Do
5a5e7693d4 [IMP] runbot: add an option on step to disable logdb 2023-06-01 15:13:01 +02:00
Christophe Monniez
f6eb23f896 [IMP] runbot: improve frontend search
When filtering bundles in the frontend, the user is not able to search
for its final trigram because of the `like`search.

With this commit, if the search contains a `%` symbol, the `=like`
operator is used permitting more accurate searches.
2023-06-01 15:03:13 +02:00
Christophe Monniez
2421a24f78 [IMP] runbot: add show builds the host form 2023-06-01 15:03:13 +02:00
Christophe Monniez
45fb4f8319 [IMP] runbot: add activities on runbot build errors 2023-06-01 15:03:13 +02:00
Christophe Monniez
86616ba88e [IMP] runbot: add a widget to go to runbot frontend
With this commit, a custom widget is added to go to the reunbot frontend
from a Char field. This allows to go from the bundle backend page to the
bundle frontend page wich is more useful in some situations.

e.g.: when creating a custom trigger with the wizard, this allows to
test the trigger with 2 clicks.
2023-06-01 15:03:13 +02:00
Christophe Monniez
e445ed27db [IMP] runbot: change fixing commit widget to url 2023-06-01 15:03:13 +02:00
Christophe Monniez
bdd98b07ec [IMP] runbot: rename active to active
Error is not fixed was too disturbing.
2023-06-01 15:03:13 +02:00
Christophe Monniez
6e145ff362 [IMP] runbot: improve build errors tabs
* show only the all builds tab
* hide linked errors tab when there is no linked errors
* hide error history tab when there is no history
* add some readonly
2023-06-01 15:03:13 +02:00
Christophe Monniez
ffe12182ab [IMP] runbot: open frontend_url in a new tab 2023-06-01 15:03:13 +02:00
Christophe Monniez
430a526b5c [FIX] runbot: limit triggers in additionnal_setup
When testing with a populated db, this assertion fails because of
additional repositories.
2023-06-01 15:03:13 +02:00
Christophe Monniez
82c6b22e77 [FIX] runbot: typo in test tag 2023-06-01 15:03:13 +02:00
Christophe Monniez
2e002c2dd7 [IMP] runbot: improve the build errors wizard
With this commit, the wizard now allows to set a fixing PR and/or a
commit text to multiple errors.
2023-06-01 15:03:13 +02:00
Christophe Monniez
388eeb377a [IMP] runbot: improve build errors views
* add a link to the fixing PR on github
* add a warning ribbon on test-tagged errors
* show different colors in tree view to spot fixed PR's
* add some search filters
2023-06-01 15:03:13 +02:00
Xavier-Do
231febab96 [FIX] runbot: fix stats.js 2023-05-08 13:26:07 +02:00
Xavier-Do
04760491a2 [FIX] runbot: hide wakeup action from public users
The initial idea to have a wakeup for public users stopped being viable
due to some abuse of the system, maybe unintentional crawling of
some build page but still, this feature will now be limited to internal
users only.
2023-05-02 13:32:43 +02:00