summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-10-17 14:28:45 +0100
committerAngelos Evripiotis <jevripiotis@bloomberg.net>2019-10-22 14:14:14 +0100
commita7334a8f91cac226595a5d393ccd6f113500d53e (patch)
treeac4705eb260ac178696ff447fefeab8090337434
parent2573c90cc6fc73c528e4a6daac34973fb0085a1e (diff)
downloadbuildstream-a7334a8f91cac226595a5d393ccd6f113500d53e.tar.gz
job pickling: pickle first_pass_config factories
Note that for multiple-pass setups, i.e. where we have junctions, we also have to pickle things that belong to the 'first_pass_config'.
-rw-r--r--src/buildstream/_scheduler/jobs/jobpickler.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildstream/_scheduler/jobs/jobpickler.py b/src/buildstream/_scheduler/jobs/jobpickler.py
index 82900eb5b..d514e87ae 100644
--- a/src/buildstream/_scheduler/jobs/jobpickler.py
+++ b/src/buildstream/_scheduler/jobs/jobpickler.py
@@ -84,7 +84,9 @@ def pickle_child_job(child_job, projects):
for p in projects
for factory in [
p.config.element_factory,
+ p.first_pass_config.element_factory,
p.config.source_factory,
+ p.first_pass_config.source_factory,
]
]
@@ -99,11 +101,11 @@ def pickle_child_job(child_job, projects):
pickler = pickle.Pickler(data)
pickler.dispatch_table = copyreg.dispatch_table.copy()
- def _reduce_plugin(plugin):
+ def reduce_plugin(plugin):
return _reduce_plugin_with_factory_dict(plugin, plugin_class_to_factory)
for cls in plugin_class_to_factory:
- pickler.dispatch_table[cls] = _reduce_plugin
+ pickler.dispatch_table[cls] = reduce_plugin
pickler.dispatch_table[ArtifactProto] = _reduce_proto
pickler.dispatch_table[DigestProto] = _reduce_proto
pickler.dispatch_table[Loader] = _reduce_object