Commit Graph

1555 Commits

Author SHA1 Message Date
Christophe Monniez
c9d966a95c [IMP] runbot: search build errors in build error logs
When managing build errors, it's sometimes useful to search for other
occurrences of the error in all the build logs. Although it's possible
to do it manually, the operation is tedious.

With this commit, a button is added on the error page to automatically
perform the search for the same error in all the build error logs
(sql view).
2024-01-31 10:40:32 +01:00
Christophe Monniez
31d3d9d0b4 [IMP] runbot: add a menu to open ir logs with filters 2024-01-31 10:37:08 +01:00
Christophe Monniez
e9fc57816b [FIX] runbot: properly move builds to the merged error
When build errors are merged together, the builds of the merged errors
should be moved to the only error that will be kept.
It 's not the case because the merge method is assigning a compute field
and moreover it was hidden in the tests because the compute was not
triggered.

With this commit, the build_error_link is updated to point to the new
error. The test is modified to properly check the case and also to add a
case when the link already exists.

The access rights are updated to allow admin to unlink the
build_error_link records. Otherwise the action could fail when the link
already exists.
2024-01-30 08:50:12 -01:00
Christophe Monniez
3ff4787788 [FIX] runbot: allow build parsing with same error
When a build that contains the same error that appears two times is
parsed, it crashes because of the unique constraint on build error link.

With this commit, only one link with the same error is created.
Two tests are added for the two cases:
- a new error appearing two times in a same build
- an existing error appearing two times in a same build
2024-01-25 14:31:04 -01:00
Xavier-Do
0b20a834c7 [FIX] runbot: fix typos 2024-01-25 08:44:48 +01:00
Christophe Monniez
b949ea1817 [FIX] runbot: adapt build error search for link model
Since c6f9d1f0c a new model was added to link build errors and builds.
The _search_version and _search_trigger_ids were not adapted to work
with this new model.
2024-01-25 06:41:01 -01:00
Xavier-Do
5406d29f8f [FIX] runbot: fix prepare 2024-01-25 08:40:42 +01:00
Christophe Monniez
c6f9d1f0c5 [IMP] runbot: use real log date on build errors
In the build error view, a list of build is displayed with a confusing
create date. The create date in the list is the creation date of the
build, leading to a confusion with the creation of the build log
creation.

With this commit, the real log creation is used in this view.

To achieve that, the many2many relation is extended with a
log_date which is filled when a build log entry is parsed.
2024-01-24 13:02:22 -01:00
Christophe Monniez
d2bb42264e [IMP] runbot: give more information about known errors 2024-01-24 13:02:22 -01:00
Christophe Monniez
7c0c03753d [IMP] runbot: add warning ribbon when an error is a link
It happens that a user edits or annotates a build error form without
noticing that the error is linked to another one. In that case, the
modification or the note is probably useless. So a warning ribbon should
grab his attention.

While at it, we change the warning ribbon when an error has a test-tag
to not be confused with the link ribbon and also because removing a
test-tag can lead to a real danger (for the mergebot stagings).
2024-01-24 13:02:22 -01:00
Christophe Monniez
ef045c8540 [IMP] runbot: move builds on host page into a tab 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
68892398cd [FIX] runbot: fix error_log parse_log method 2024-01-24 13:02:22 -01:00
Christophe Monniez
c837e7330c [IMP] runbot: remove useless prefix on build errors 2024-01-24 08:54:39 -01:00
Christophe Monniez
6030988560 [IMP] runbot: allow to filter team errors by trigger 2024-01-24 08:54:39 -01:00
Christophe Monniez
bef9dc0e49 [FIX] runbot: properly compute error versions and triggers 2024-01-24 08:54:39 -01:00
Christophe Monniez
f47beb31ba [FIX] runbot: fix the favorites filter bug 2024-01-24 08:54:39 -01:00
Christophe Monniez
2999f92cdb [IMP] runbot: allow to search errors in a single version
When filtering the build error tree view based on the versions equality,
the results may not be what you expect.

e.g.: searching for `versions is equal to 16.0` gives the errors that
appeared in `16.0` (hopefully) but also those which appeared in other
versions too.

With this commit, this search will give the errors that appeared in the
specified version only. When the user wants to list errors that appeared
in `16.0` and other versions too, he has to use the `contains 16.0`
criteria.
2024-01-24 08:54:39 -01:00
Christophe Monniez
08c614a86e [IMP] runbot: add optional fingerprint in error list view 2024-01-24 07:43:33 -01:00
Christophe Monniez
bddac0a645 [IMP] runbot: allow to choose the replacement string
When defining cleaning regex, the replacement character is always the
percent sign as it's hard coded in various methods.

With this commit, a replacement string can be defined by cleaning regex
and fallback to the percent sign by default.
2024-01-24 07:43:33 -01:00
Christophe Monniez
7ce79b434e [IMP] runbot: improve build error cleaning action
With this commit, when build errors are re-cleaned, they are also merged
if the fingerprints when fingerprints are matching.

Also, this fixes the ir_logging compute that associate a build error
so that the active build error is preferred over an inactive one.
2024-01-24 07:43:33 -01:00
Xavier-Do
c513edc6ad [IMP] runbot: allow to use dev foreigh branches
Using dev branch from foreign project to fill missing commits looks like
a bad idea, mainly because the lifecycle of the branches is not the same

In some case, it can be useful to allow that to test a branch with a
future change in the base project that will be needed to make the branch
work. As an example introducing a small api change in odoo to make an
override easier, or introducing a module that may be needed to use
the feature.

This commit changes that by allowing to configure on the project or
bundle if we allow to use foreign bundle as reference *before* checking
the base bundle.
2024-01-24 09:30:10 +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
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