Bug 1259599 - release runner shouldn't retry automatically with different graph ID r=Callek
MozReview-Commit-ID: 9c75l9SaduH
--- a/buildfarm/release/release-runner.py
+++ b/buildfarm/release/release-runner.py
@@ -526,16 +526,17 @@ def main(options):
os.symlink(target, symlink)
# TODO: this won't work for Thunderbird...do we care?
branch = release["branch"].split("/")[-1]
branchConfig = readBranchConfig(path.join(configs_workdir, "mozilla"), branch=branch)
rc = 0
for release in rr.new_releases:
+ graph_id = slugId()
try:
rr.update_status(release, 'Generating task graph')
l10n_changesets = parsePlainL10nChangesets(rr.get_release_l10n(release["name"]))
kwargs = {
"public_key": docker_worker_key,
"version": release["version"],
"next_version": bump_version(release["version"]),
@@ -571,39 +572,39 @@ def main(options):
"push_to_releases_enabled": True,
"push_to_releases_automatic": branchConfig['push_to_releases_automatic'],
"beetmover_candidates_bucket": branchConfig["beetmover_buckets"][release["product"]],
}
if extra_balrog_submitter_params:
kwargs["extra_balrog_submitter_params"] = extra_balrog_submitter_params
validate_graph_kwargs(queue, gpg_key_path, **kwargs)
-
- graph_id = slugId()
graph = make_task_graph(**kwargs)
-
rr.update_status(release, "Submitting task graph")
-
log.info("Task graph generated!")
import pprint
log.debug(pprint.pformat(graph, indent=4, width=160))
print scheduler.createTaskGraph(graph_id, graph)
rr.mark_as_completed(release)
email_release_drivers(smtp_server=smtp_server, from_=notify_from,
to=notify_to, release=release,
graph_id=graph_id)
except:
# We explicitly do not raise an error here because there's no
# reason not to start other releases if creating the Task Graph
# fails for another one. We _do_ need to set this in order to exit
# with the right code, though.
rc = 2
- rr.update_status(release, 'Failed to start release promotion')
- log.exception("Failed to start release promotion for {}: ".format(release))
+ rr.mark_as_failed(
+ release,
+ 'Failed to start release promotion (graph ID: %s)' % graph_id)
+ log.exception(
+ "Failed to start release promotion for graph {} {}: ".format(
+ graph_id, release))
if rc != 0:
sys.exit(rc)
if __name__ == '__main__':
parser = OptionParser(__doc__)
parser.add_option('-l', '--lockfile', dest='lockfile',
default=path.join(os.getcwd(), ".release-runner.lock"))