def _bisect_inbounds(self, good_rev, bad_rev, ensure_good_and_bad=False): LOG.info("Getting %s builds between %s and %s" % (self.fetch_config.inbound_branch, good_rev, bad_rev)) handler = InboundHandler(find_fix=self.options.find_fix, ensure_good_and_bad=ensure_good_and_bad) result = self._do_bisect(handler, good_rev, bad_rev) if result == Bisection.FINISHED: LOG.info("Oh noes, no (more) inbound revisions :(") handler.print_range() if handler.good_revision == handler.bad_revision: LOG.warning("It seems that you used two changesets that are in" " in the same push. Check the pushlog url.") elif len(handler.build_range) == 2: # range reduced to 2 pushes: 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_inbounds(good_rev, bad_rev) elif result == Bisection.USER_EXIT: self._print_resume_info(handler) else: # NO_DATA. With inbounds, this can not happen if changesets # are incorrect - so builds are probably too old LOG.info('There are no build artifacts on inbound for these' ' changesets (they are probably too old).') return 1 return 0
def _bisect_inbounds(self, good_rev, bad_rev): self._logger.info("Getting %s builds between %s and %s" % (self.fetch_config.inbound_branch, good_rev, bad_rev)) handler = InboundHandler(find_fix=self.options.find_fix) result = self._do_bisect(handler, good_rev, bad_rev) if result == Bisection.FINISHED: self._logger.info("Oh noes, no (more) inbound revisions :(") handler.print_range() if handler.good_revision == handler.bad_revision: self._logger.warning( "It seems that you used two changesets that are in" " in the same push. Check the pushlog url." ) elif len(handler.build_range) == 2: # range reduced to 2 pushes: 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_inbounds(good_rev, bad_rev) elif result == Bisection.USER_EXIT: self._print_resume_info(handler) else: # NO_DATA. With inbounds, this can not happen if changesets # are incorrect - so builds are probably too old self._logger.info( 'There are no build artifacts on inbound for these' ' changesets (they are probably too old).') return 1 return 0
def _bisect_inbounds(self, good_rev, bad_rev, ensure_good_and_bad=False, expand=0): LOG.info("Getting %s builds between %s and %s" % (self.fetch_config.inbound_branch, good_rev, bad_rev)) handler = InboundHandler(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 inbound 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_inbounds(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 inbounds, this can not happen if changesets # are incorrect - so builds are probably too old LOG.info('There are no build artifacts on inbound for these' ' changesets (they are probably too old).') return 1 return 0
def _bisect_inbounds(self, good_rev, bad_rev, ensure_good_and_bad=False, expand=0): LOG.info("Getting %s builds between %s and %s" % (self.fetch_config.inbound_branch, good_rev, bad_rev)) handler = InboundHandler(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 inbound 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_inbounds(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 inbounds, this can not happen if changesets # are incorrect - so builds are probably too old LOG.info( 'There are no build artifacts on inbound for these' ' changesets (they are probably too old).') return 1 return 0
def bisect_inbound(self, good_rev, bad_rev): # Remember, InboundHandler is just a changeset based bisector. It will # still potentially bisect m-c first. handler = InboundHandler() result = self.bisector.bisect(handler, good_rev, bad_rev, expand=0) if result == Bisection.FINISHED: print "No more m-c revisions :(" handler.print_range() # Try switching over to the integration branch. if len(handler.build_range) == 2: result = handler.handle_merge() if result: branch, good_rev, bad_rev = result self.fetch_config.set_repo(branch) return self.bisect_inbound(good_rev, bad_rev) return (handler.good_revision, handler.bad_revision)
def _bisect_inbounds(self, good_rev, bad_rev, ensure_good_and_bad=False, expand=0): LOG.info("Getting %s builds between %s and %s" % (self.fetch_config.inbound_branch, good_rev, bad_rev)) handler = InboundHandler(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("Oh noes, no (more) inbound revisions :(") handler.print_range() if handler.good_revision == handler.bad_revision: LOG.warning( "It seems that you used two changesets that are in" " in the same push. Check the pushlog url." ) elif len(handler.build_range) == 2: # range reduced to 2 pushes: 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_inbounds(good_rev, bad_rev, expand=DEFAULT_EXPAND) else: 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 inbounds, this can not happen if changesets # are incorrect - so builds are probably too old LOG.info( 'There are no build artifacts on inbound for these' ' changesets (they are probably too old).') return 1 return 0
def _bisect_inbounds(self, good_rev, bad_rev, ensure_good_and_bad=False, expand=0): LOG.info("Getting %s builds between %s and %s" % (self.fetch_config.inbound_branch, good_rev, bad_rev)) handler = InboundHandler(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("Oh noes, no (more) inbound revisions :(") handler.print_range() if handler.good_revision == handler.bad_revision: LOG.warning("It seems that you used two changesets that are in" " in the same push. Check the pushlog url.") elif len(handler.build_range) == 2: # range reduced to 2 pushes: 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_inbounds(good_rev, bad_rev, expand=DEFAULT_EXPAND) else: 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 inbounds, this can not happen if changesets # are incorrect - so builds are probably too old LOG.info('There are no build artifacts on inbound for these' ' changesets (they are probably too old).') return 1 return 0