[FIX] runbot_merge: cancel master staging on freeze

If there are bump PRs anyway: the bump commits will cause the
forward-port of the staging to fail, so might as well clearly notify
everybody of the issue if there is a pending staging, and not waste
too much time waiting for a staging which can not succeed.

We could also cancel stagings when there's no bump PR, but it's not
clear that there's any reason to do so: if we didn't touch any master
branch, there's no reason for the staging to fail, or to otherwise
cancel it.

And obviously we can't have staged anything on the new branch so
there's nothing to cancel.

Part-Of: #718
This commit is contained in:
Xavier Morel 2023-01-25 12:14:20 +01:00
parent 8d7d6302d3
commit 907c6072d1

View File

@ -329,6 +329,8 @@ class FreezeWizard(models.Model):
})
} for pr in all_prs])
if self.bump_pr_ids:
master.active_staging_id.cancel("freeze by %s", self.env.user.login)
# delete wizard
self.sudo().unlink()
# managed to create all the things, show reminder text (or close)