Bug 1428912 - Only keep track of job names for seen configs in build_lints. r?dustin
When looking for perfherder data collection duplicates, we currently
keep full job objects references, which are then used in case an error
occurs, to display the job names of the duplicates.
But those job objects are yielded and may be modified by other
transforms, and presently, by the time a duplicate is found, the
corresponding job object has been modified such that it has no 'name'
key anymore, leading to a KeyError exception when trying to display
the duplicate error message.
So instead of keeping the job objects, which can change, and which we
don't have a real use for, just keep the job name.
--- a/taskcluster/taskgraph/transforms/build_lints.py
+++ b/taskcluster/taskgraph/transforms/build_lints.py
@@ -46,13 +46,13 @@ def check_mozharness_perfherder_options(
assert primary_config.startswith('builds/')
key = (platform, primary_config, nightly, options)
if key in seen_configs:
raise Exception('Non-unique Perfherder data collection for jobs '
'%s and %s: set PERFHERDER_EXTRA_OPTIONS in worker '
'environment variables or use different mozconfigs'
- % (job['name'], seen_configs[key]['name']))
+ % (job['name'], seen_configs[key]))
- seen_configs[key] = job
+ seen_configs[key] = job['name']
yield job