From 2411ae9a7625941faaa68de42da3d121e9b3747f Mon Sep 17 00:00:00 2001 From: James Graham Date: Thu, 20 May 2021 20:34:36 +0100 Subject: [PATCH] Don't check for landed landing unless we applied patches Previously if we hit a problem applying the first patch for landing we'd be left with just the base branch, and this code would incorrectly determine that all the changes were already landed. We can't land everything until the head commit is a landing commit, so check for that. --- sync/landing.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sync/landing.py b/sync/landing.py index 1afcb14b4..f0f1b7873 100644 --- a/sync/landing.py +++ b/sync/landing.py @@ -1128,15 +1128,16 @@ def update_landing(git_gecko, # type: Repo raise AbortError("Existing landing head commit %s doesn't match" "supplied wpt head %s" % (landing.wpt_commits.head.sha1, new_wpt_head)) - head = landing.gecko_commits.head.sha1 - if git_gecko.is_ancestor(head, env.config["gecko"]["refs"]["central"]): - logger.info("Landing reached central") - with landing.as_mut(lock): - landing.finish() - return None - elif git_gecko.is_ancestor(head, landing.gecko_integration_branch()): - logger.info("Landing is on inbound but not yet on central") - return None + head = landing.gecko_commits.head + if head.is_landing: + if git_gecko.is_ancestor(head.sha1, env.config["gecko"]["refs"]["central"]): + logger.info("Landing reached central") + with landing.as_mut(lock): + landing.finish() + return None + elif git_gecko.is_ancestor(head.sha1, landing.gecko_integration_branch()): + logger.info("Landing is on autoland but not yet on central") + return None landable = landable_commits(git_gecko, git_wpt,