in mozregression/main.py [0:0]
def _bisect_integration(self, good_rev, bad_rev, ensure_good_and_bad=False, expand=0):
LOG.info(
"Getting %s builds between %s and %s"
% (self.fetch_config.integration_branch, good_rev, bad_rev)
)
handler = IntegrationHandler(
find_fix=self.options.find_fix, ensure_good_and_bad=ensure_good_and_bad
)
result = self._do_bisect(handler, good_rev, bad_rev, expand=expand)
if result == Bisection.FINISHED:
LOG.info("No more integration revisions, bisection finished.")
handler.print_range()
if handler.good_revision == handler.bad_revision:
LOG.warning(
"It seems that you used two changesets that are in"
" the same push. Check the pushlog url."
)
elif len(handler.build_range) == 2:
# range reduced to 2 pushes (at least ones with builds):
# one good, one bad.
result = handler.handle_merge()
if result:
branch, good_rev, bad_rev = result
self.fetch_config.set_repo(branch)
return self._bisect_integration(good_rev, bad_rev, expand=DEFAULT_EXPAND)
else:
# This code is broken, it prints out the message even when
# there are multiple bug numbers or commits in the range.
# Somebody should fix it before re-enabling it.
return 0
# print a bug if:
# (1) there really is only one bad push (and we're not
# just missing the builds for some intermediate builds)
# (2) there is only one bug number in that push
jp = JsonPushes(handler.build_range[1].repo_name)
num_pushes = len(
jp.pushes_within_changes(
handler.build_range[0].changeset,
handler.build_range[1].changeset,
)
)
if num_pushes == 2:
bugids = find_bugids_in_push(
handler.build_range[1].repo_name,
handler.build_range[1].changeset,
)
if len(bugids) == 1:
word = "fix" if handler.find_fix else "regression"
LOG.info(
"Looks like the following bug has the "
" changes which introduced the"
" {}:\n{}".format(word, bug_url(bugids[0]))
)
elif result == Bisection.USER_EXIT:
self._print_resume_info(handler)
else:
# NO_DATA. With integration branches, this can not happen if changesets
# are incorrect - so builds are probably too old
LOG.info(
"There are no build artifacts for these changesets (they are probably too old)."
)
return 1
return 0