runbot/runbot_merge/models
Xavier Morel 2fea318830 [IMP] runbot_merge: hide concurrent update errors
As far as I can tell they are properly handled:

- In `handle_status` we let the http layer retry the query, which
  pretty much always succeeds.
- In `Commit.notify`, we rollback the application of the current
  commit, meaning it'll be processed by the next run of the cron,
  which also seems to succeed every time (that is going through the
  log I pretty much never notice the same commit being serialization
  failure'd twice in a row).

  Which we can trigger for faster action, this last item is not
  entirely necessary as statuses should generally come in fast and
  especially if we have concurrency errors, but it can't hurt.

This means the only genuine issue is... sql_db logging a "bad query"
every time there's a serialization failure.

In `handle_status`, just suppress the message outright, if there's an
error other than serialization the http / dispatch layer should catch
and log it.

In `Commit._notify` things are slightly more difficult as the execute
is implicit (`flush` -> `_write` -> `execute`) so we can't pass the
flag by parameter. One option would be to set and unset
`_default_log_exception`, but it would either be a bit dodgy or it
would require using a context manager and increasing the indentation
level (or using a custom context manager).

Instead just `mute_logger` the fucking thing. It's a bit brutish and
mostly used in tests, but not just, and feels like the least bad
option here...

Closes #805
2024-10-22 14:12:04 +02:00
..
backport [ADD] *: PR backport wizard 2024-10-22 11:41:58 +02:00
crons [IMP] runbot_merge: prune repo during maintenance 2024-08-05 09:03:39 +02:00
project_freeze [FIX] *: ensure I don't get bollocked up again by tags 2024-09-06 15:09:08 +02:00
staging_cancel [ADD] runbot_merge: stagings canceling wizard 2022-12-08 10:46:22 +01:00
__init__.py [ADD] *: PR backport wizard 2024-10-22 11:41:58 +02:00
batch.py [ADD] *: PR backport wizard 2024-10-22 11:41:58 +02:00
commands.py [FIX] *: UX around fw=no 2024-09-17 11:31:20 +02:00
events_sources.py [ADD] *: per-repository webhook secret 2024-06-06 11:07:57 +02:00
ir_actions.py [IMP] runbot_merge: add json & requests to server actions context 2023-02-20 10:13:05 +01:00
ir_ui_view.py [IMP] runbot_merge: suppress view validation warning 2024-09-27 12:53:51 +02:00
patcher.py [ADD] runbot_merge: support for unstaged patches 2024-10-03 12:06:00 +02:00
project.py [ADD] runbot_merge: support for unstaged patches 2024-10-03 12:06:00 +02:00
pull_requests.py [IMP] runbot_merge: hide concurrent update errors 2024-10-22 14:12:04 +02:00
res_partner.py [ADD] runbot_merge: ad-hoc ACL tracking to res.partner 2024-05-16 09:32:03 +02:00
stagings_create.py [CHG] runbot_merge: make merge method non-blocking 2024-10-07 08:07:59 +02:00
utils.py [ADD] runbot_merge: rendering of PR descriptions 2024-07-15 10:28:28 +02:00