Bug 1644025 - Try to rebuild manifest if we get a ManifestError when loading, r=Ms2ger

Differential Revision: https://phabricator.services.mozilla.com/D78651
This commit is contained in:
James Graham 2020-06-08 14:18:00 +00:00
Родитель 07c69ab5ee
Коммит d8ee17bdef
3 изменённых файлов: 3 добавлений и 4 удалений

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

@ -723,7 +723,7 @@ class TestResolver(MozbuildObject):
logger = logging.getLogger("manifestupdate")
logger.disabled = True
manifests = manifestupdate.run(self.topsrcdir, self.topobjdir, rebuild=True,
manifests = manifestupdate.run(self.topsrcdir, self.topobjdir, rebuild=False,
download=True, config_path=None, rewrite_config=True,
update=True, logger=logger)
if not manifests:

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

@ -67,8 +67,6 @@ def ensure_kwargs(kwargs):
def run(src_root, obj_root, logger=None, **kwargs):
kwargs = ensure_kwargs(kwargs)
kwargs["rebuild"] = True
if logger is None:
from wptrunner import wptlogging
logger = wptlogging.setup(kwargs, {"mach": sys.stdout})
@ -180,7 +178,6 @@ def generate_config(logger, repo_root, wpt_dir, dest_path, force_rewrite=False):
def load_and_update(logger, wpt_dir, test_paths, rebuild=False, config_dir=None, cache_root=None,
update=True):
rebuild = True
rv = {}
wptdir_hash = hashlib.sha256(os.path.abspath(wpt_dir).encode()).hexdigest()
for url_base, paths in six.iteritems(test_paths):

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

@ -376,6 +376,8 @@ def load_and_update(tests_root, # type: bytes
allow_cached=allow_cached)
except ManifestVersionMismatch:
logger.info("Manifest version changed, rebuilding")
except ManifestError:
logger.warning("Failed to load manifest, rebuilding")
if manifest is not None and manifest.url_base != url_base:
logger.info("Manifest url base did not match, rebuilding")