(Re)introduce the `can_go_integration()` check on `fetch_config`s
This was removed in aa84e76327
(under its old
`can_go_inbound` name) since everything returned True, but I want to introduce
a FirefoxL10n config that is nightly only, so need to restore these checks.
This commit is contained in:
Родитель
4a33708c2e
Коммит
ac6db3cc20
|
@ -290,7 +290,7 @@ class BisectRunner(AbstractBuildRunner):
|
|||
dialog = QMessageBox.critical
|
||||
else:
|
||||
fetch_config = self.worker.fetch_config
|
||||
if not getattr(bisection, "no_more_merge", False):
|
||||
if fetch_config.can_go_integration() and not getattr(bisection, "no_more_merge", False):
|
||||
if isinstance(bisection.handler, NightlyHandler):
|
||||
handler = bisection.handler
|
||||
fetch_config.set_repo(fetch_config.get_nightly_repo(handler.bad_date))
|
||||
|
|
|
@ -581,7 +581,7 @@ class Configuration(object):
|
|||
if options.bits == 32 and mozinfo.os == "mac":
|
||||
self.logger.info("only 64-bit builds available for mac, using " "64-bit builds")
|
||||
|
||||
if fetch_config.tk_needs_auth():
|
||||
if fetch_config.is_integration() and fetch_config.tk_needs_auth():
|
||||
creds = tc_authenticate(self.logger)
|
||||
fetch_config.set_tk_credentials(creds)
|
||||
|
||||
|
@ -632,6 +632,13 @@ class Configuration(object):
|
|||
)
|
||||
if fetch_config.should_use_archive():
|
||||
self.action = "bisect_nightlies"
|
||||
if (
|
||||
self.action in ("launch_integration", "bisect_integration")
|
||||
and not fetch_config.is_integration()
|
||||
):
|
||||
raise MozRegressionError(
|
||||
"Unable to bisect integration for `%s`" % fetch_config.app_name
|
||||
)
|
||||
options.preferences = preferences(options.prefs_files, options.prefs, self.logger)
|
||||
# convert GiB to bytes.
|
||||
options.persist_size_limit = int(abs(float(options.persist_size_limit)) * 1073741824)
|
||||
|
|
|
@ -135,6 +135,18 @@ class CommonConfig(object):
|
|||
+ r"\.txt$"
|
||||
)
|
||||
|
||||
def is_nightly(self):
|
||||
"""
|
||||
Returns True if the configuration can be used for nightly fetching.
|
||||
"""
|
||||
return isinstance(self, NightlyConfigMixin)
|
||||
|
||||
def is_integration(self):
|
||||
"""
|
||||
Returns True if the configuration can be used for integration fetching.
|
||||
"""
|
||||
return isinstance(self, IntegrationConfigMixin)
|
||||
|
||||
def available_bits(self):
|
||||
"""
|
||||
Returns the no. of bits of the OS for which the application should
|
||||
|
@ -283,6 +295,12 @@ class NightlyConfigMixin(metaclass=ABCMeta):
|
|||
)
|
||||
return r"^%04d-%02d-%02d-[\d-]+%s/$" % (date.year, date.month, date.day, repo)
|
||||
|
||||
def can_go_integration(self):
|
||||
"""
|
||||
Indicate if we can bisect integration from this nightly config.
|
||||
"""
|
||||
return self.is_integration()
|
||||
|
||||
|
||||
class FirefoxNightlyConfigMixin(NightlyConfigMixin):
|
||||
def _get_nightly_repo(self, date):
|
||||
|
|
|
@ -133,11 +133,12 @@ class Application(object):
|
|||
if result == Bisection.FINISHED:
|
||||
LOG.info("Got as far as we can go bisecting nightlies...")
|
||||
handler.print_range()
|
||||
LOG.info("Switching bisection method to taskcluster")
|
||||
self.fetch_config.set_repo(self.fetch_config.get_nightly_repo(handler.bad_date))
|
||||
return self._bisect_integration(
|
||||
handler.good_revision, handler.bad_revision, expand=DEFAULT_EXPAND
|
||||
)
|
||||
if self.fetch_config.can_go_integration():
|
||||
LOG.info("Switching bisection method to taskcluster")
|
||||
self.fetch_config.set_repo(self.fetch_config.get_nightly_repo(handler.bad_date))
|
||||
return self._bisect_integration(
|
||||
handler.good_revision, handler.bad_revision, expand=DEFAULT_EXPAND
|
||||
)
|
||||
elif result == Bisection.USER_EXIT:
|
||||
self._print_resume_info(handler)
|
||||
else:
|
||||
|
|
Загрузка…
Ссылка в новой задаче