From 907c6072d1167d92e67b7531319cb5c81f43381c Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 25 Jan 2023 12:14:20 +0100 Subject: [PATCH] [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 --- runbot_merge/models/project_freeze/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runbot_merge/models/project_freeze/__init__.py b/runbot_merge/models/project_freeze/__init__.py index 4e513be6..c6bc4330 100644 --- a/runbot_merge/models/project_freeze/__init__.py +++ b/runbot_merge/models/project_freeze/__init__.py @@ -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)