def trigger_talos_jobs_for_build(buildername, revision, times, dry_run=False): """ Trigger all talos jobs for a given build and revision. """ LOG.info('Trigger all talos jobs for {} on {}'.format(buildername, revision)) failed_builders = '' buildernames = get_talos_jobs_for_build(buildername) for buildername in buildernames: try: trigger_job( revision=revision, buildername=buildername, times=times, dry_run=dry_run ) except BuildapiDown: LOG.exception('Buildapi is down. We will not try anymore.') return FAILURE except: LOG.exception('We failed to trigger {}; Let us try the rest.'.format(buildername)) failed_builders += '%s\n' % buildername if failed_builders: LOG.info("Here's the list of builders that did not get scheduled:\n" "{}".format(failed_builders)) return FAILURE return SUCCESS
def trigger_talos_jobs_for_build(buildername, revision, times, dry_run=False): """ Trigger all talos jobs for a given build and revision. """ LOG.info('Trigger all talos jobs for {} on {}'.format( buildername, revision)) failed_builders = '' buildernames = get_talos_jobs_for_build(buildername) for buildername in buildernames: try: trigger_job(revision=revision, buildername=buildername, times=times, dry_run=dry_run) except: LOG.exception( 'We failed to trigger {}; Let us try the rest.'.format( buildername)) failed_builders += '%s\n' % buildername if failed_builders: LOG.info("Here's the list of builders that did not get scheduled:\n" "{}".format(failed_builders)) return FAILURE return SUCCESS
def trigger_talos_jobs_for_build(buildername, revision, times, priority, dry_run=False): """ Trigger all talos jobs for a given build and revision. """ failures = False buildernames = get_talos_jobs_for_build(buildername) for buildername in buildernames: try: trigger_range(buildername=buildername, revisions=[revision], times=times, dry_run=dry_run) except: failures = True LOG.warning('We failed to trigger {}; Let us try the rest.'.format( buildername)) if failures: raise MozciError( "Some talos builders have failed to schedule; Check warning messages" )
def trigger_talos_jobs_for_build(buildername, revision, times, priority, dry_run=False): """ Trigger all talos jobs for a given build and revision. """ buildernames = get_talos_jobs_for_build(buildername) for buildername in buildernames: trigger_range(buildername=buildername, revisions=[revision], times=times, dry_run=dry_run)
def test_talos_single_build(self): """Test if the function finds the right suite_name.""" import mozci.platforms mozci.platforms.fetch_allthethings_data = Mock( return_value=ALLTHETHINGS) DOWNSTREAM = [ "Windows 7 32-bit mozilla-inbound pgo talos chromez-e10s", "Windows 7 32-bit mozilla-inbound pgo talos dromaeojs-e10s" ] mozci.platforms.get_downstream_jobs = Mock(return_value=DOWNSTREAM) build = "WINNT 5.2 mozilla-inbound pgo-build" assert get_talos_jobs_for_build(build) == DOWNSTREAM
def test_talos_single_build(self): """Test if the function finds the right suite_name.""" import mozci.platforms mozci.platforms.fetch_allthethings_data = Mock(return_value=ALLTHETHINGS) DOWNSTREAM = [ "Ubuntu HW 12.04 x64 mozilla-inbound pgo talos chromez-e10s", "Ubuntu HW 12.04 x64 mozilla-inbound pgo talos dromaeojs", "Ubuntu HW 12.04 x64 mozilla-inbound pgo talos dromaeojs-e10s" ] mozci.platforms.get_downstream_jobs = Mock(return_value=DOWNSTREAM) build = "Linux x86-64 mozilla-inbound pgo-build" assert get_talos_jobs_for_build(build) == DOWNSTREAM