You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
odoo/odoo#165931 had a rough life: everything seemed fine and it chilled for a week or two then it got staged. At this point, it unwittingly started failing stagings. Which happens. It's ok.
However things then took a turn for the worse: a well meaning individual looking for the guilty rebuilt it, which caused a failure but that failure was a false negative (a non-deterministic test): https://runbot.odoo.com/runbot/build/68162127 so everything looked OK.
That is due to the combination of two... assumptions? Issues? Oversight?
statuses are assumed to go forwards, without the PR getting updated a status normally doesn't go from success to failure, as a result there is no unstaging on that path:
pr_obj.unstage("updated by %s", event['sender']['login'])
as it turns out this is not an optimisation (though it looks like one) but more of an artefact of the original structure where an update didn't fully reset PRs:
when the behaviour was later changed in ec5d60d this bit wasn't touched
The issue is that the failed rebuild transitioned the PR back into "approved" (reviewed but no or failed statuses), so by the time the PR was updated it was not ready anymore, and thus didn't get unstaged on that second step either.
the PR should be unstaged unconditionally on update, the optimisation is very limited as unstaging just checks if the PR is staged, somethign which isn't free (we need to search through the o2m between batches and stagings) but probably not the worst
CI failure should probably unstage, in this case the failure was illegitimate but there could be scenarios where it's very legit e.g.
trigger a time-based failure during a rebuild (so that's an actual failure, just inconsistent)
rebase-and-rebuild failing assuming that sends statuses on the original commit, doing this would have caught the issue (which looks to be an incompatibility between this PR and an other change merged since it'd last been built)
remove an override set in error
The text was updated successfully, but these errors were encountered:
And unconditionally unstage when the HEAD of a PR is synchronised.
While a rebuild on a PR which was previously staged can be a false
positive (e.g. because it hit a non-derministic test the second time
around) it can also be legitimate e.g. auto-rebase of an old PR to
check it out. In that case the PR should be unstaged.
Furthermore, as soon as the PR gets rebuilt it goes back into
`approved` (because the status goes to pending and currently there's
no great way to suppress that in the rebuild case without also fucking
it up for the sync case). This would cause a sync on the PR to be
missed (in that it would not unstage the PR), which is broken. Fix
that by not checking the state of the PR beforehand, it seems to be an
unnecessary remnant of older code, and not really an optimisation (or
at least one likely not worth bothering with, especially as we then
proceed to perform a full PR validation anyway).
Fixes#950
odoo/odoo#165931 had a rough life: everything seemed fine and it chilled for a week or two then it got staged. At this point, it unwittingly started failing stagings. Which happens. It's ok.
However things then took a turn for the worse: a well meaning individual looking for the guilty rebuilt it, which caused a failure but that failure was a false negative (a non-deterministic test): https://runbot.odoo.com/runbot/build/68162127 so everything looked OK.
However getting a failure notification the reviewer updated the pull request: odoo/odoo#165931 (comment) which did reveal the true failure also present on stagings: https://runbot.odoo.com/runbot/build/68174601
Except... the PR was still breaking stagings hours later and had to be r-'d: odoo/odoo#165931 (comment)
That is due to the combination of two... assumptions? Issues? Oversight?
runbot/runbot_merge/models/pull_requests.py
Lines 1165 to 1185 in 146564a
runbot/runbot_merge/controllers/__init__.py
Lines 288 to 289 in 3bc5b4e
runbot/runbot_merge/controllers/__init__.py
Lines 154 to 160 in 5c4018b
The issue is that the failed rebuild transitioned the PR back into "approved" (reviewed but no or failed statuses), so by the time the PR was updated it was not ready anymore, and thus didn't get unstaged on that second step either.
The text was updated successfully, but these errors were encountered: