Go to file
Xavier Morel 10ef6b82f0 [IMP] runbot_merge: sanity check PATCH git/ref/heads
Turns out not only can that operation fail, that operation can succeed
but have its effect delayed. To try and guard against that,
immediately check that we get the correct ref' after having reset it.

This is the cause of the November 6 mess: when preparing a staging,
the mergebot does the following,

1. get the head of <branch>
2. hard-reset tmp.<branch> to that
3. start merging PRs, which requires getting the current state of
   tmp.<branch> back

On the 6ths, these steps looked like this

```text
2019-11-06 10:03:21,588 head(odoo/odoo, master) -> ab6d0c38512e4944458b0b6f80f38d6c26b6b597
2019-11-06 10:03:22,375 set_ref(update, odoo/odoo, tmp.master, ab6d0c38512e4944458b0b6f80f38d6c26b6b597 -> 200 (OK)
2019-11-06 10:03:28,674 head(odoo/odoo, tmp.master) -> de2a852e7cc1f390e50190cfc497bc253687fba8
2019-11-06 10:03:30,292 head(odoo/odoo, tmp.master) -> de2a852e7cc1f390e50190cfc497bc253687fba8
```
So the 'bot fetched the commit at the head of master (ab6d0c), reset
tmp.master to that... and then got a different commit when it fetched
the tmp head to stage a PR on it.

That different head being of course a previous rejected staging. When
the new staging succeeded, it brought the entire thing in and made a
mess.

This was compounded by an issue I still have to investigate: the
staging of the new PR took the wrong base commit *but the right base
tree*, as a result the first thing it did was *reverse the entire
previous commit* (without that we could probably have left it as-is
rather than need to force-push master -- twice).
2019-11-07 07:52:12 +01:00
forwardport [FIX] forwardport: the fix 2019-10-18 12:01:47 +02:00
runbot [IMP] runbot: add host in build errors debug mode 2019-11-06 14:57:55 +01:00
runbot_cla [FIX] runbot: fix coverage since shared sources 2019-07-16 12:06:09 +02:00
runbot_merge [IMP] runbot_merge: sanity check PATCH git/ref/heads 2019-11-07 07:52:12 +01:00
.gitignore [IMP] runbot: share sources between builds 2019-07-12 14:50:59 +02:00
conftest.py [ADD] forwardport: automatic branch deleter 2019-10-17 11:55:20 +02:00
README.md [REF] README: update the readme file for the brand new repo 2018-03-08 16:59:39 +01:00

Odoo Runbot Repository

This repository contains the source code of Odoo testing bot runbot.odoo.com and related addons.

Runbot

The runbot/ directory holds the main runbot Odoo addon.

Runbot CLA addon

The runbot_cla/ directory contains an Odoo addon that checks CLA.