Skip to content

Syncing from upstream odoo/runbot (15.0-stop-build-on-error-xdo)#580

Merged
bt-admin merged 8 commits intobrain-tec:15.0-stop-build-on-error-xdofrom
odoo:15.0-stop-build-on-error-xdo
Mar 1, 2023
Merged

Syncing from upstream odoo/runbot (15.0-stop-build-on-error-xdo)#580
bt-admin merged 8 commits intobrain-tec:15.0-stop-build-on-error-xdofrom
odoo:15.0-stop-build-on-error-xdo

Conversation

@bt-admin
Copy link
Copy Markdown

@bt-admin bt-admin commented Mar 1, 2023

bt_gitbot

Xavier-Do and others added 8 commits February 6, 2023 10:16
Seems to be a new github weirdness: when forking a repo, when hitting
it fast enough it's apparently possible to see the repository in an
incomplete state (without its content).

Obviously this causes tests to fail.

Complete the post-fork testing by listing the branches of the fork,
and considering the repo created once we see a non-empty list (the
source repo should always have at least one branch, which should be
copied over when forking).
1cea247 tried to improve staging
checks to avoid staging PRs in the wrong state, however it had two
issues:

PR state
--------

The process would reset the PR's state to open, but unless the head
was being resync'd it wouldn't re-apply the statuses on the state,
leading to a PR with all-valid statuses, but a missing CI.

Message
-------

The message check didn't compose the PR message the same way PR
creation / update did (it did not trim the title and description
individually, only after concatenation), resulting in a
not-actually-existing divergence getting signaled in the case where
the PR title ends or the description starts with whitespace.

Expand relevant test, add a utility function to compose a PR message
and use it everywhere for coherence.

Also update the logging and reporting to show a diff of all the
updated items (hidden behind a `details` element).
The loggers would only print the "tail" of the path, not including the
repo name, or the `/repos` prefix.

While this made logs shorter, it was not intentional and made
debugging some issues on endpoints harder than necessary as the calls
had to be adjusted mentally, which is completely unnecessary.
Since removeprefix was not available in ubuntu 20.04, a easier alternative
using rebase was used.

The initial assumption was that the prefix would look like `odoo/addons/`
and won't be in the filename.

When the repo is enterprise, the prefix is `enterprise/` meaning that
module name ending with `enterprise` will be truncated

`repo._get_module('enterprise/mail_enterprise/static/src/widgets/form_renderer/form_renderer.js')`

will output

`mail_static`
In some case, if a step fails (restore, upgrade, ...) we don't want
to continue since it makes no sence to run tests afterward.

This option will allow to avoid unwanted build error especially for
upgrade as well as useless load.
@bt-admin bt-admin merged commit 0403957 into brain-tec:15.0-stop-build-on-error-xdo Mar 1, 2023
bt-admin pushed a commit that referenced this pull request Jun 2, 2023
It's likely that the PR pages are seen more commonly than the
dashboard by most users, so add alerts there in case users wonder
what's happening.

Fixes #580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants