Commit Graph

1582 Commits

Author SHA1 Message Date
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
Xavier-Do
fe87569044 [FIX] runbot: allow rebuild when killed
The feature was there but broken, lets fix it.
2023-12-05 10:06:18 +01:00
Xavier-Do
bf2528dbd0 [FIX] runbot: avoid non local redirect
The goal of this feature is to redirect to the build
2023-12-05 10:06:18 +01:00
Christophe Monniez
383352d88e [FIX] runbot: fix _get_commit_infos 2023-10-04 14:35:23 +02:00
Christophe Monniez
c2ef253ec9 [IMP] runbot: retrieve commit infos when needed
In some circumstances, a commit is created from scratch with only a hash
for sole information. This is not very convenient and can lead to issues
that may be difficult to investigate.

With this commit, when creating this kind of commit object, we try to
get commit informations from git repo.
2023-10-04 09:00:35 +02:00
Christophe Monniez
b5b90557fd [IMP] runbot: add a backend commit links tree view
It's sometimes usefull to find a commit in the commit links.
2023-10-04 09:00:35 +02:00
Christophe Monniez
929bc33569 [IMP] runbot: allow to call the commit route with a hash
With this commit, it's not possible to go directly to the commit
frontend page with a commit hash with its id or directly with the hash
value.
2023-10-04 09:00:35 +02:00
Christophe Monniez
fef9ae9801 [FIX] runbot: ensure that commit date is always set
When exporting a commit, the commit date is used in the `tar` command to
set the date of the exported folder. On the other hand it happens that a
commit is not found in the database and should be quickly created on the
fly. e.g.: with the `_get` method. In this case, if the commit needs to
be exported later, the method fails and may break a runbot build.

It happened with a custom python step.
2023-10-04 09:00:35 +02:00
Xavier-Do
ce47661bbc [IMP] runbot: allow to define a per host nb run 2023-10-03 10:38:55 +02:00
Xavier-Do
06e088f82e [IMP] runbot: check dir exists upgrade path 2023-09-28 22:55:55 +02:00
Xavier-Do
269e59538e [FIX] runbot: fix wake_up 2023-09-25 11:15:29 +02:00
Xavier-Do
435ac449f5 [FIX] runbot: various fixes and ref
- clean thread username
- allow to write on params for debug (was mainly usefull to forbid it
at the beginning)
- imrpove some guidelines about method and actions naming/ ordering
- move some code for a cleaner organisation.
- remove some useless request.env.user (not useful anymore)
2023-09-25 10:52:16 +02:00
Xavier-Do
8d619d11f8 [FIX] runbot: use upgrade path
Manage multiple upgrade_paths + small fix
2023-09-20 11:40:07 +02:00
Xavier-Do
f627ebaf0e [IMP] runbot: allow pr creation on closed pr
Even if we prefer to avoid this use case, some devs like to use the same
branch for multiple pr. This change allows to reopen a pr once one is
closed.
2023-09-15 13:23:06 +02:00
Christophe Monniez
b018e5a1a4 [IMP] runbot: resize the child extra parameters
When configuring a custom trigger on a bundle by using the wizard, the
child extra params field is often too small to display all the
parameters.
e.g., specify two long test-tags as it's often the case for
multi-builds.

With this commit, the field span over 4 columns.
2023-09-15 11:03:17 +02:00
Christophe Monniez
3c7f59a817 [REF] runbot: update settings view
The runbot settings view is a bit messy and the 16.0 upgrade added mess
on the existing one.

This commit is an attempt to make it a bit clearer and cleaner.
2023-09-15 11:03:17 +02:00
Xavier-Do
9923b18429 [IMP] runbot: use upgrade path
This commit will replace the symlink used for upgrade by the
upgrade-path.

The symlink was used before because old version does not support upgrade
path, but the decision was taken to now limit the testing to version
suporting upgrade paths in order to be able to support utils in another
repository latter.
2023-09-15 10:59:22 +02:00
Christophe Monniez
f50c099d93 [IMP] runbot: avoid modal in build error view
When trying to open a linked error or an error from the history, the
object is opened in a useless modal. With this commit, the object is
opened in a regular form view.
2023-09-06 10:58:21 +02:00
Christophe Monniez
c00579cdf2 [FIX] runbot: fix invalid condition in build template 2023-09-06 10:58:21 +02:00
Xavier-Do
e0795ffaea [IMP] runbot: customizable build access
This reverts commit and fixes some issues.
2023-08-07 15:07:30 +02:00
Xavier-Do
e2408a6869 [IMP] runbot: don't add child log if there are to much children 2023-08-07 15:07:30 +02:00
Xavier-Do
94828f300b [IMP] runbot: scan killed and warn build too 2023-08-07 15:07:30 +02:00
Xavier-Do
b99a1fefc0 [IMP] runbot: allow to define a base_batch manually 2023-08-07 15:07:30 +02:00
Xavier-Do
287be96775 [IMP] runbot: improve user view 2023-08-07 15:07:30 +02:00
Xavier-Do
3a0f045a4b [FIX] runbot: fix _local_pg_dropdb cleanup 2023-07-13 15:30:17 +02:00
Xavier-Do
4a99ee3ce3 [RVE] runbot: revert customizable build_access
This reverts commit 9e7441e098.

This doesn't work as expected because of db filter.
Will eb changed latter, reverting for now

Token field is kept, could still be used later.
2023-07-05 14:54:53 +02:00
Xavier-Do
ea490bffab [REF] runbot: cleanup old dead code 2023-07-04 10:46:41 +02:00
Xavier-Do
0c609ac533 [IMP] runbot: improve cleanup perfs
The current version will read ~100000 build

This one will avoid that by checking the date of the gcstamp instead
2023-07-04 10:46:41 +02:00
Christophe Monniez
7958375fb5 [IMP] runbot: log container short id
When investigating kernel logs e.g.: for finding oom killed containers,
the kernel does not log the name of the incriminated container but only
the id. With this commit the runbot will also log the container short id
which is enough to correlate the logs.
2023-07-04 10:32:54 +02:00
Christophe Monniez
207b890018 [FIX] runbot: frontendurl should use the right id 2023-07-03 16:30:06 +02:00
Xavier-Do
92157ad71a [IMP] runbot: make access to build customizable 2023-07-03 15:52:53 +02:00
Xavier-Do
91470e0cfa [IMP] runbot: add dedicated route for running 2023-07-03 15:52:53 +02:00
Xavier-Do
d09b9961cd [IMP] runbot: log user beside ip 2023-07-03 15:52:53 +02:00
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