Bug 1533589: Support generating update-verify-config for new configuration; r=aki

When adding a new platform, the first release will be at the watershed, and
there will be no update paths. Rather than failing in this case (requiring the
update-verify setup happen after the first release), generate an empty config
which will allow the later tasks to turn green.

Differential Revision: https://phabricator.services.mozilla.com/D25833

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Prince 2019-04-03 20:33:10 +00:00
Родитель f5d48b04f2
Коммит 323ed9e2e0
1 изменённых файлов: 15 добавлений и 1 удалений

Просмотреть файл

@ -10,7 +10,7 @@ from urlparse import urljoin
sys.path.insert(1, os.path.dirname(os.path.dirname(sys.path[0]))) sys.path.insert(1, os.path.dirname(os.path.dirname(sys.path[0])))
from mozharness.base.log import DEBUG, INFO, FATAL from mozharness.base.log import DEBUG, INFO, FATAL, WARNING
from mozharness.base.script import BaseScript from mozharness.base.script import BaseScript
@ -335,10 +335,24 @@ class UpdateVerifyConfigCreator(BaseScript):
self.update_paths[version]["marChannelIds"] = mar_channel_ids self.update_paths[version]["marChannelIds"] = mar_channel_ids
def gather_info(self): def gather_info(self):
from mozilla_version.gecko import GeckoVersion
self._get_update_paths() self._get_update_paths()
if self.update_paths: if self.update_paths:
self.log("Found update paths:", level=DEBUG) self.log("Found update paths:", level=DEBUG)
self.log(pprint.pformat(self.update_paths), level=DEBUG) self.log(pprint.pformat(self.update_paths), level=DEBUG)
elif (
GeckoVersion.parse(self.config["to_version"])
<= GeckoVersion.parse(self.config["last_watershed"])
):
self.log(
"Didn't find any update paths, but to_version {} is before the last_"
"watershed {}, generating empty config".format(
self.config['to_version'],
self.config['last_watershed'],
),
level=WARNING,
)
else: else:
self.log("Didn't find any update paths, cannot continue", level=FATAL) self.log("Didn't find any update paths, cannot continue", level=FATAL)