mirror of
https://github.com/odoo/runbot.git
synced 2025-03-19 17:35:45 +07:00
![]() The mergebot has a feature to ping users when an approved PR or forward-port suffers from a CI failure, as those PRs might be somewhat unattended (so the author needs to be warned explicitly). Because the runbot can send the same failure information multiple times, the mergebot also has a *deduplication* feature, however this deduplication feature was too weak to handle the case where the PR has 2+ failures e.g. ci and linting as it only stores the last-seen failure, and there would be two different failures here. Worse, because the validation step looks at all required statuses, in that case it would send a failure ping message for each failed status *on each inbound status*: first it'd notify about the ci failure and store that, then it'd see the linting failure, check against the previous (ci), consider it a new failure, notify, and store that. Rinse and repeat every time runbot sends a ci *or* lint failure, leading to a lot of dumb and useless spam. Fix by storing the entire current failure state (a map of context: status) instead of just the last-seen status data. Note: includes a backwards-compatibility shim where we just convert a stored status into a full `{context: status}` map. This uses the "current context" because we don't have the original, but if it was a different context it's not going to match anyway (the target_url should be different) and if it was the same context then there's a chance we skip sending a redundant notification. Fixes #435 |
||
---|---|---|
.. | ||
__init__.py | ||
pull_requests.py | ||
res_partner.py |